Replaced DOS newlines with "real" ones :-)
This lets the files compile again. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18526 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -122,8 +122,7 @@ int main(int argc, char * argv[])
|
|||||||
output("Kill returned %d (%d: %s)\n", ret, errno, strerror(errno));
|
output("Kill returned %d (%d: %s)\n", ret, errno, strerror(errno));
|
||||||
FAILED("A process group with the same PID as the child exists");
|
FAILED("A process group with the same PID as the child exists");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Test passed */
|
/* Test passed */
|
||||||
#if VERBOSE > 0
|
#if VERBOSE > 0
|
||||||
output("Test passed\n");
|
output("Test passed\n");
|
||||||
@@ -132,4 +131,3 @@ int main(int argc, char * argv[])
|
|||||||
PASSED;
|
PASSED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -124,4 +124,3 @@ int main(int argc, char * argv[])
|
|||||||
PASSED;
|
PASSED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+70
-71
@@ -1,71 +1,70 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004, Bull S.A.. All rights reserved.
|
* Copyright (c) 2004, Bull S.A.. All rights reserved.
|
||||||
* Created by: Sebastien Decugis
|
* Created by: Sebastien Decugis
|
||||||
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of version 2 of the GNU General Public License as
|
* under the terms of version 2 of the GNU General Public License as
|
||||||
* published by the Free Software Foundation.
|
* published by the Free Software Foundation.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it would be useful, but
|
* This program is distributed in the hope that it would be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program; if not, write the Free Software Foundation, Inc., 59
|
* with this program; if not, write the Free Software Foundation, Inc., 59
|
||||||
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
|
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
|
|
||||||
|
|
||||||
* This file is a wrapper to use the tests from the NPTL Test & Trace Project
|
* This file is a wrapper to use the tests from the NPTL Test & Trace Project
|
||||||
* with either the Linux Test Project or the Open POSIX Test Suite.
|
* with either the Linux Test Project or the Open POSIX Test Suite.
|
||||||
|
|
||||||
* The following function are defined:
|
* The following function are defined:
|
||||||
* void output_init()
|
* void output_init()
|
||||||
* void output_fini()
|
* void output_fini()
|
||||||
* void output(char * string, ...)
|
* void output(char * string, ...)
|
||||||
*
|
*
|
||||||
* The are used to output informative text (as a printf).
|
* The are used to output informative text (as a printf).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
/* We use a mutex to avoid conflicts in traces */
|
/* We use a mutex to avoid conflicts in traces */
|
||||||
static pthread_mutex_t m_trace = PTHREAD_MUTEX_INITIALIZER;
|
static pthread_mutex_t m_trace = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
|
||||||
/*****************************************************************************************/
|
/*****************************************************************************************/
|
||||||
/******************************* stdout module *****************************************/
|
/******************************* stdout module *****************************************/
|
||||||
/*****************************************************************************************/
|
/*****************************************************************************************/
|
||||||
/* The following functions will output to stdout */
|
/* The following functions will output to stdout */
|
||||||
#if (1)
|
#if (1)
|
||||||
void output_init()
|
void output_init()
|
||||||
{
|
{
|
||||||
/* do nothing */
|
/* do nothing */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
void output( char * string, ... )
|
void output( char * string, ... )
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
char *ts="[??:??:??]";
|
char *ts="[??:??:??]";
|
||||||
struct tm * now;
|
struct tm * now;
|
||||||
time_t nw;
|
time_t nw;
|
||||||
|
|
||||||
pthread_mutex_lock(&m_trace);
|
pthread_mutex_lock(&m_trace);
|
||||||
nw = time(NULL);
|
nw = time(NULL);
|
||||||
now = localtime(&nw);
|
now = localtime(&nw);
|
||||||
if (now == NULL)
|
if (now == NULL)
|
||||||
printf(ts);
|
printf(ts);
|
||||||
else
|
else
|
||||||
printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
|
printf("[%2.2d:%2.2d:%2.2d]", now->tm_hour, now->tm_min, now->tm_sec);
|
||||||
va_start( ap, string);
|
va_start( ap, string);
|
||||||
vprintf(string, ap);
|
vprintf(string, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
pthread_mutex_unlock(&m_trace);
|
pthread_mutex_unlock(&m_trace);
|
||||||
}
|
}
|
||||||
void output_fini()
|
void output_fini()
|
||||||
{
|
{
|
||||||
/*do nothing */
|
/*do nothing */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
+84
-85
@@ -1,85 +1,84 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004, Bull S.A.. All rights reserved.
|
* Copyright (c) 2004, Bull S.A.. All rights reserved.
|
||||||
* Created by: Sebastien Decugis
|
* Created by: Sebastien Decugis
|
||||||
|
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of version 2 of the GNU General Public License as
|
* under the terms of version 2 of the GNU General Public License as
|
||||||
* published by the Free Software Foundation.
|
* published by the Free Software Foundation.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it would be useful, but
|
* This program is distributed in the hope that it would be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along
|
* You should have received a copy of the GNU General Public License along
|
||||||
* with this program; if not, write the Free Software Foundation, Inc., 59
|
* with this program; if not, write the Free Software Foundation, Inc., 59
|
||||||
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
|
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
|
||||||
*
|
*
|
||||||
|
|
||||||
|
|
||||||
* This file is a wrapper to use the tests from the NPTL Test & Trace Project
|
* This file is a wrapper to use the tests from the NPTL Test & Trace Project
|
||||||
* with either the Linux Test Project or the Open POSIX Test Suite.
|
* with either the Linux Test Project or the Open POSIX Test Suite.
|
||||||
|
|
||||||
* The following macros are defined here:
|
* The following macros are defined here:
|
||||||
* UNRESOLVED(ret, descr);
|
* UNRESOLVED(ret, descr);
|
||||||
* where descr is a description of the error and ret is an int (error code for example)
|
* where descr is a description of the error and ret is an int (error code for example)
|
||||||
* FAILED(descr);
|
* FAILED(descr);
|
||||||
* where descr is a short text saying why the test has failed.
|
* where descr is a short text saying why the test has failed.
|
||||||
* PASSED();
|
* PASSED();
|
||||||
* No parameter.
|
* No parameter.
|
||||||
*
|
*
|
||||||
* Both three macros shall terminate the calling process.
|
* Both three macros shall terminate the calling process.
|
||||||
* The testcase shall not terminate without calling one of those macros.
|
* The testcase shall not terminate without calling one of those macros.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "posixtest.h"
|
#include "posixtest.h"
|
||||||
#include <string.h> /* for the strerror() routine */
|
#include <string.h> /* for the strerror() routine */
|
||||||
|
|
||||||
|
|
||||||
#ifdef __GNUC__ /* We are using GCC */
|
#ifdef __GNUC__ /* We are using GCC */
|
||||||
|
|
||||||
#define UNRESOLVED(x, s) \
|
#define UNRESOLVED(x, s) \
|
||||||
{ output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
|
{ output("Test %s unresolved: got %i (%s) on line %i (%s)\n", __FILE__, x, strerror(x), __LINE__, s); \
|
||||||
output_fini(); \
|
output_fini(); \
|
||||||
exit(PTS_UNRESOLVED); }
|
exit(PTS_UNRESOLVED); }
|
||||||
|
|
||||||
#define FAILED(s) \
|
#define FAILED(s) \
|
||||||
{ output("Test %s FAILED: %s\n", __FILE__, s); \
|
{ output("Test %s FAILED: %s\n", __FILE__, s); \
|
||||||
output_fini(); \
|
output_fini(); \
|
||||||
exit(PTS_FAIL); }
|
exit(PTS_FAIL); }
|
||||||
|
|
||||||
#define PASSED \
|
#define PASSED \
|
||||||
output_fini(); \
|
output_fini(); \
|
||||||
exit(PTS_PASS);
|
exit(PTS_PASS);
|
||||||
|
|
||||||
#define UNTESTED(s) \
|
#define UNTESTED(s) \
|
||||||
{ output("File %s cannot test: %s\n", __FILE__, s); \
|
{ output("File %s cannot test: %s\n", __FILE__, s); \
|
||||||
output_fini(); \
|
output_fini(); \
|
||||||
exit(PTS_UNTESTED); \
|
exit(PTS_UNTESTED); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* not using GCC */
|
#else /* not using GCC */
|
||||||
|
|
||||||
#define UNRESOLVED(x, s) \
|
#define UNRESOLVED(x, s) \
|
||||||
{ output("Test unresolved: got %i (%s) on line %i (%s)\n", x, strerror(x), __LINE__, s); \
|
{ output("Test unresolved: got %i (%s) on line %i (%s)\n", x, strerror(x), __LINE__, s); \
|
||||||
output_fini(); \
|
output_fini(); \
|
||||||
exit(PTS_UNRESOLVED); }
|
exit(PTS_UNRESOLVED); }
|
||||||
|
|
||||||
#define FAILED(s) \
|
#define FAILED(s) \
|
||||||
{ output("Test FAILED: %s\n", s); \
|
{ output("Test FAILED: %s\n", s); \
|
||||||
output_fini(); \
|
output_fini(); \
|
||||||
exit(PTS_FAIL); }
|
exit(PTS_FAIL); }
|
||||||
|
|
||||||
#define PASSED \
|
#define PASSED \
|
||||||
output_fini(); \
|
output_fini(); \
|
||||||
exit(PTS_PASS);
|
exit(PTS_PASS);
|
||||||
|
|
||||||
#define UNTESTED(s) \
|
#define UNTESTED(s) \
|
||||||
{ output("Unable to test: %s\n", s); \
|
{ output("Unable to test: %s\n", s); \
|
||||||
output_fini(); \
|
output_fini(); \
|
||||||
exit(PTS_UNTESTED); \
|
exit(PTS_UNTESTED); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user