Perform more C warning fixup on all C source files and headers.
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "test.h"
|
||||
|
@@ -118,8 +118,6 @@
|
||||
*
|
||||
*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
|
||||
|
||||
#include <string.h>
|
||||
#include <sys/unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <errno.h>
|
||||
@@ -128,9 +126,9 @@
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
void setup();
|
||||
void cleanup();
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
char *TCID="access01"; /* Test program identifier. */
|
||||
const char *TCID="access01"; /* Test program identifier. */
|
||||
int TST_TOTAL=4; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -102,18 +102,17 @@
|
||||
#include <signal.h>
|
||||
|
||||
|
||||
#include <unistd.h>
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
|
||||
void setup();
|
||||
void cleanup();
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
|
||||
char *get_high_address();
|
||||
|
||||
char *TCID="access03"; /* Test program identifier. */
|
||||
const char *TCID="access03"; /* Test program identifier. */
|
||||
int TST_TOTAL=8; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -66,8 +66,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@@ -83,12 +81,12 @@
|
||||
#define DIR_MODE S_IRWXU | S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP
|
||||
#define FILE_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
|
||||
|
||||
char *TCID="access01"; /* Test program identifier. */
|
||||
const char *TCID="access01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
void setup(); /* Main setup function of test */
|
||||
void cleanup(); /* cleanup function for the test */
|
||||
void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
|
@@ -76,9 +76,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
@@ -107,9 +105,9 @@ char Longpathname[PATH_MAX+2];
|
||||
char High_address_node[64];
|
||||
|
||||
struct test_case_t { /* test case structure */
|
||||
char *pathname;
|
||||
const char *pathname;
|
||||
int a_mode;
|
||||
char *desc;
|
||||
const char *desc;
|
||||
int exp_errno;
|
||||
int (*setupfunc)();
|
||||
} Test_cases[] = {
|
||||
@@ -124,21 +122,22 @@ struct test_case_t { /* test case structure */
|
||||
{ NULL, 0, NULL, 0, no_setup }
|
||||
};
|
||||
|
||||
char *TCID="access03"; /* Test program identifier. */
|
||||
const char *TCID="access03"; /* Test program identifier. */
|
||||
int TST_TOTAL=8; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
int exp_enos[]={EACCES, EFAULT, EINVAL, ENOENT, ENAMETOOLONG, 0};
|
||||
|
||||
void setup(); /* Main setup function of test */
|
||||
void cleanup(); /* cleanup function for the test */
|
||||
void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
|
||||
char *get_high_address (void);
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
int lc; /* loop counter */
|
||||
const char *msg; /* message returned from parse_opts */
|
||||
char *file_name; /* name of the testfile */
|
||||
char *test_desc; /* test specific message */
|
||||
const char *file_name; /* name of the testfile */
|
||||
const char *test_desc; /* test specific message */
|
||||
int access_mode; /* specified access mode for testfile */
|
||||
int ind; /* counter for testcase looping */
|
||||
|
||||
|
@@ -120,7 +120,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="alarm01"; /* Test program identifier. */
|
||||
const char *TCID="alarm01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -98,12 +98,12 @@
|
||||
#include "usctest.h" /* required for usctest */
|
||||
|
||||
void setup();
|
||||
void cleanup();
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
void alarm_received();
|
||||
|
||||
|
||||
|
||||
char *TCID="alarm02"; /* Test program identifier. */
|
||||
const char *TCID="alarm02"; /* Test program identifier. */
|
||||
int TST_TOTAL=3; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_ * routines */
|
||||
|
||||
@@ -122,7 +122,7 @@ main(int ac, char **av)
|
||||
const char *msg; /* message returned from parse_opts */
|
||||
|
||||
/* Parameters for alarm test */
|
||||
char *buf[] = { "-1", "ULONG_MAX", "ULONG_MAX+1"};
|
||||
const char *buf[] = { "-1", "ULONG_MAX", "ULONG_MAX+1"};
|
||||
unsigned long int sec[] = {-1, ULONG_MAX, ULONG_MAX+1};
|
||||
int exp[] = {0,0,0};
|
||||
int i;
|
||||
|
@@ -99,10 +99,10 @@
|
||||
#include "usctest.h"
|
||||
|
||||
void setup();
|
||||
void cleanup();
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
|
||||
char *TCID="alarm03"; /* Test program identifier. */
|
||||
const char *TCID="alarm03"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -62,8 +62,6 @@
|
||||
* None.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
@@ -73,13 +71,13 @@
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
char *TCID="alarm03"; /* Test program identifier. */
|
||||
const char *TCID="alarm03"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
int almreceived = 0; /* flag to indicate SIGALRM received or not */
|
||||
|
||||
void setup(); /* Main setup function of test */
|
||||
void cleanup(); /* cleanup function for the test */
|
||||
void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
|
||||
void sigproc(int sig); /* signal catching function */
|
||||
|
||||
int
|
||||
|
@@ -95,7 +95,6 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/signal.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
@@ -116,10 +115,10 @@
|
||||
char *dp; /* pointer to area of memory */
|
||||
|
||||
void setup();
|
||||
void cleanup();
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
int testrun(int flag, int bytes, int ti);
|
||||
|
||||
char *TCID="asyncio02"; /* Test program identifier. */
|
||||
const char *TCID="asyncio02"; /* Test program identifier. */
|
||||
int TST_TOTAL=6; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
extern int Tst_nobuf; /* variable used to turn off tst_res buffering */
|
||||
@@ -128,7 +127,7 @@ extern int errno;
|
||||
|
||||
int exp_enos[]={0}; /* Array of expected errnos */
|
||||
char mesg[150];
|
||||
char *filename; /* name of the temporary file */
|
||||
const char *filename; /* name of the temporary file */
|
||||
|
||||
char *Progname;
|
||||
int Open_flags;
|
||||
|
@@ -119,14 +119,13 @@ extern void setup();
|
||||
extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="chdir02"; /* Test program identifier. */
|
||||
const char *TCID="chdir02"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
int exp_enos[]={0, 0};
|
||||
|
||||
char *dirs[2] = { "/", "/tmp" };
|
||||
const char *dirs[2] = { "/", "/tmp" };
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
|
@@ -54,13 +54,12 @@
|
||||
* NONE
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
#include <test.h>
|
||||
#include <usctest.h>
|
||||
|
||||
char *TCID = "chdir02";
|
||||
const char *TCID = "chdir02";
|
||||
int TST_TOTAL = 3;
|
||||
extern int Tst_count;
|
||||
|
||||
@@ -97,14 +96,14 @@ int flag;
|
||||
#define FAILED 1
|
||||
|
||||
void setup(void);
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
int lc; /* loop counter */
|
||||
int i;
|
||||
const char *msg; /* message returned from parse_opts */
|
||||
struct stat statbuf;
|
||||
|
||||
/* parse standard options */
|
||||
if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
|
||||
|
@@ -67,7 +67,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/fcntl.h>
|
||||
@@ -81,14 +80,14 @@
|
||||
#define FILE_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
|
||||
#define TESTFILE "testfile"
|
||||
|
||||
char *TCID="chmod01"; /* Test program identifier. */
|
||||
const char *TCID="chmod01"; /* Test program identifier. */
|
||||
int TST_TOTAL=8; /* Total number of test conditions */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
int Modes[] = {0, 07, 070, 0700, 0777, 02777, 04777, 06777};
|
||||
|
||||
void setup(); /* setup function for the test */
|
||||
void cleanup(); /* cleanup function for the test */
|
||||
void cleanup() __attribute__ ((noreturn));/* cleanup function for the test */
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
|
@@ -119,16 +119,16 @@
|
||||
#include "usctest.h"
|
||||
|
||||
void setup();
|
||||
void cleanup();
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
|
||||
|
||||
char *TCID="chmod02"; /* Test program identifier. */
|
||||
const char *TCID="chmod02"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
char fname[255];
|
||||
char *buf = "file contents\n";
|
||||
const char *buf = "file contents\n";
|
||||
|
||||
int Modes[] = {0, 07, 070, 0700, 0777, 02777, 04777, 06777};
|
||||
|
||||
|
@@ -122,7 +122,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="chown01"; /* Test program identifier. */
|
||||
const char *TCID="chown01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
@@ -130,7 +130,7 @@ int exp_enos[]={0, 0};
|
||||
|
||||
char fname[255];
|
||||
int fd, uid, gid;
|
||||
char *buf = "davef";
|
||||
const char *buf = "davef";
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
|
@@ -56,15 +56,16 @@
|
||||
* None
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
void setup(void);
|
||||
|
||||
char *TCID = "close01()";
|
||||
const char *TCID = "close01()";
|
||||
int TST_TOTAL = 2;
|
||||
extern int Tst_count;
|
||||
|
||||
@@ -76,7 +77,7 @@ int pipefildes[2];
|
||||
|
||||
struct test_case_t {
|
||||
int *fd;
|
||||
char *type;
|
||||
const char *type;
|
||||
} TC[] = {
|
||||
/* file descriptor for a regular file */
|
||||
{&newfd, "file"},
|
||||
@@ -85,6 +86,7 @@ struct test_case_t {
|
||||
{&pipefildes[0], "pipe"}
|
||||
};
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
|
||||
|
@@ -53,20 +53,21 @@
|
||||
* None
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
void setup(void);
|
||||
|
||||
int exp_enos[] = {EBADF, 0};
|
||||
|
||||
char *TCID = "close02()";
|
||||
const char *TCID = "close02()";
|
||||
int TST_TOTAL = 1;
|
||||
extern int Tst_count;
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
int lc; /* loop counter */
|
||||
|
@@ -122,7 +122,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="close08"; /* Test program identifier. */
|
||||
const char *TCID="close08"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -47,18 +47,18 @@
|
||||
* None
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
void setup(void);
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
void functest1(void);
|
||||
void functest2(void);
|
||||
|
||||
char *TCID = "creat01";
|
||||
const char *TCID = "creat01";
|
||||
int TST_TOTAL = 2;
|
||||
extern int Tst_count;
|
||||
|
||||
@@ -79,6 +79,7 @@ struct test_case_t {
|
||||
{filename, MODE2, functest2}
|
||||
};
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
int i;
|
||||
|
@@ -44,13 +44,13 @@
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
char *TCID = "creat03"; /* Test program identifier */
|
||||
const char *TCID = "creat03"; /* Test program identifier */
|
||||
int TST_TOTAL = 1; /* Total number of test cases */
|
||||
extern int Tst_count; /* Test case counter */
|
||||
|
||||
@@ -58,8 +58,9 @@ char pfilname[40] = "";
|
||||
#define FMODE 0444
|
||||
|
||||
void setup(void);
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
struct stat statbuf;
|
||||
|
@@ -122,7 +122,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="creat09"; /* Test program identifier. */
|
||||
const char *TCID="creat09"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -121,7 +121,7 @@ extern void setup();
|
||||
extern void cleanup();
|
||||
|
||||
|
||||
char *TCID="dup01"; /* Test program identifier. */
|
||||
const char *TCID="dup01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -120,7 +120,7 @@ extern void setup();
|
||||
extern void cleanup();
|
||||
|
||||
|
||||
char *TCID="dup02"; /* Test program identifier. */
|
||||
const char *TCID="dup02"; /* Test program identifier. */
|
||||
int TST_TOTAL=2; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -110,14 +110,13 @@
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
void setup();
|
||||
void cleanup();
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
char *TCID="dup03"; /* Test program identifier. */
|
||||
const char *TCID="dup03"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -121,7 +121,7 @@ extern void setup();
|
||||
extern void cleanup();
|
||||
|
||||
|
||||
char *TCID="dup04"; /* Test program identifier. */
|
||||
const char *TCID="dup04"; /* Test program identifier. */
|
||||
int TST_TOTAL=2; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -121,7 +121,7 @@
|
||||
extern void setup();
|
||||
extern void cleanup();
|
||||
|
||||
char *TCID="dup05"; /* Test program identifier. */
|
||||
const char *TCID="dup05"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -124,7 +124,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="execl01"; /* Test program identifier. */
|
||||
const char *TCID="execl01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
extern int Tst_nobuf; /* used to turn off buffering in tst_ routines */
|
||||
|
@@ -124,7 +124,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="execle01"; /* Test program identifier. */
|
||||
const char *TCID="execle01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
extern int Tst_nobuf; /* used to turn off buffering in tst_ routines */
|
||||
|
@@ -124,7 +124,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="execlp01"; /* Test program identifier. */
|
||||
const char *TCID="execlp01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
extern int Tst_nobuf; /* used to turn off buffering in tst_ routines */
|
||||
|
@@ -110,7 +110,6 @@
|
||||
*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
@@ -120,11 +119,9 @@
|
||||
#include "usctest.h"
|
||||
|
||||
extern void setup();
|
||||
extern void cleanup();
|
||||
void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="execv01"; /* Test program identifier. */
|
||||
const char *TCID="execv01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
extern int Tst_nobuf; /* used to turn off buffering in tst_ routines */
|
||||
@@ -133,7 +130,7 @@ int exp_enos[]={0, 0}; /* Zero terminated list of expected errnos */
|
||||
|
||||
int pid; /* process id from fork */
|
||||
int status; /* status returned from waitpid */
|
||||
char *args[2]={"/usr/bin/test", 0}; /* argument list for execv call */
|
||||
const char * const args[2]={"/usr/bin/test", 0}; /* argument list for execv call */
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
|
@@ -124,7 +124,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="execve01"; /* Test program identifier. */
|
||||
const char *TCID="execve01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
extern int Tst_nobuf; /* used to turn off buffering in tst_ routines */
|
||||
@@ -133,7 +133,7 @@ int exp_enos[]={0, 0}; /* Zero terminated list of expected errnos */
|
||||
|
||||
int pid; /* process id from fork */
|
||||
int status; /* status returned from waitpid */
|
||||
char *args[2]={"/usr/bin/test", 0}; /* argument list for execve call */
|
||||
const char *const args[2]={"/usr/bin/test", 0}; /* argument list for execve call */
|
||||
extern char **environ; /* pointer to this processes env, to pass along */
|
||||
|
||||
int
|
||||
|
@@ -124,7 +124,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="execvp01"; /* Test program identifier. */
|
||||
const char *TCID="execvp01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
extern int Tst_nobuf; /* used to turn off buffering in tst_ routines */
|
||||
@@ -133,7 +133,7 @@ int exp_enos[]={0, 0}; /* Zero terminated list of expected errnos */
|
||||
|
||||
int pid; /* process id from fork */
|
||||
int status; /* status returned from waitpid */
|
||||
char *args[2]={"/usr/bin/test", 0}; /* argument list for execvp call */
|
||||
const char *const args[2]={"/usr/bin/test", 0}; /* argument list for execvp call */
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
|
@@ -38,19 +38,21 @@
|
||||
* None
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
void setup(void);
|
||||
|
||||
char *TCID = "exit01";
|
||||
const char *TCID = "exit01";
|
||||
int TST_TOTAL = 1;
|
||||
extern int Tst_count;
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
int pid, npid, sig, nsig, exno, nexno, status;
|
||||
|
@@ -41,17 +41,17 @@
|
||||
* None
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/wait.h>
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
void setup(void);
|
||||
|
||||
char *TCID = "exit02";
|
||||
const char *TCID = "exit02";
|
||||
int TST_TOTAL = 1;
|
||||
extern int Tst_count;
|
||||
|
||||
@@ -61,6 +61,7 @@ extern int Tst_count;
|
||||
|
||||
char filen[40];
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
int pid, npid, sig, nsig, exno, nexno, status;
|
||||
|
@@ -63,10 +63,10 @@
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
void setup(void);
|
||||
|
||||
char *TCID = "fchdir01";
|
||||
const char *TCID = "fchdir01";
|
||||
int TST_TOTAL = 1;
|
||||
extern int Tst_count;
|
||||
|
||||
@@ -77,6 +77,7 @@ const char *TEST_DIR = "alpha";
|
||||
|
||||
#define MODES S_IRWXU
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
int lc; /* loop counter */
|
||||
|
@@ -60,15 +60,16 @@
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
void setup(void);
|
||||
|
||||
char *TCID = "fchdir02";
|
||||
const char *TCID = "fchdir02";
|
||||
int TST_TOTAL = 1;
|
||||
extern int Tst_count;
|
||||
|
||||
int exp_enos[] = {9, 0}; /* 0 terminated list of expected errnos */
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
const int bad_fd = -5;
|
||||
|
@@ -119,7 +119,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="fchmod01"; /* Test program identifier. */
|
||||
const char *TCID="fchmod01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
@@ -127,7 +127,7 @@ int exp_enos[]={0, 0};
|
||||
|
||||
char fname[255];
|
||||
int fd;
|
||||
char *buf = "davef";
|
||||
const char *buf = "davef";
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
|
@@ -123,7 +123,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="fchown01"; /* Test program identifier. */
|
||||
const char *TCID="fchown01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -123,7 +123,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="fcntl02"; /* Test program identifier. */
|
||||
const char *TCID="fcntl02"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -123,7 +123,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="fcntl03"; /* Test program identifier. */
|
||||
const char *TCID="fcntl03"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -123,7 +123,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="fcntl04"; /* Test program identifier. */
|
||||
const char *TCID="fcntl04"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -123,7 +123,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="fcntl05"; /* Test program identifier. */
|
||||
const char *TCID="fcntl05"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -132,11 +132,8 @@
|
||||
*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/wait.h>
|
||||
#include <limits.h>
|
||||
@@ -146,10 +143,10 @@
|
||||
#include "search_path.h"
|
||||
|
||||
void setup();
|
||||
void cleanup();
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
void help();
|
||||
|
||||
char *TCID="fcntl07"; /* Test program identifier. */
|
||||
const char *TCID="fcntl07"; /* Test program identifier. */
|
||||
int TST_TOTAL=2; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
@@ -170,10 +167,10 @@ int stat_loc; /* for waitpid() */
|
||||
int file_fd, pipe_fds[2];
|
||||
/* file descriptors for a file and a system pipe */
|
||||
#define DEFAULT_FILE "DefaultFileName"
|
||||
char *File1 = DEFAULT_FILE;
|
||||
const char *File1 = DEFAULT_FILE;
|
||||
|
||||
#define DEFAULT_SUBPROG "test_open"
|
||||
char *openck = DEFAULT_SUBPROG; /* support program name to check for open FD */
|
||||
const char *openck = DEFAULT_SUBPROG; /* support program name to check for open FD */
|
||||
char subprog_path[_POSIX_PATH_MAX]; /* path to exec "openck" with */
|
||||
#define STRSIZE 255
|
||||
|
||||
@@ -181,13 +178,13 @@ int *testfds[] = {
|
||||
&file_fd, &pipe_fds[1], 0
|
||||
};
|
||||
|
||||
char *testfdtypes[] = {
|
||||
const char *testfdtypes[] = {
|
||||
"regular file",
|
||||
"write side of system pipe",
|
||||
};
|
||||
|
||||
int test_open(char *arg);
|
||||
int do_exec(char *prog, int fd, char *tcd);
|
||||
int test_open(const char *arg);
|
||||
int do_exec(const char *prog, int fd, const char *tcd);
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
@@ -197,7 +194,7 @@ main(int ac, char **av)
|
||||
|
||||
int exec_return; /* return from do_exec */
|
||||
int **tcp; /* testcase pointer (pointer to FD) */
|
||||
char **tcd; /* testcase description pointer */
|
||||
const char **tcd; /* testcase description pointer */
|
||||
|
||||
/***************************************************************
|
||||
* parse standard options, and exit if there is an error
|
||||
@@ -358,7 +355,7 @@ help()
|
||||
*/
|
||||
|
||||
int
|
||||
do_exec(char *prog, int fd, char *tcd)
|
||||
do_exec(const char *prog, int fd, const char *tcd)
|
||||
{
|
||||
int pid;
|
||||
char pidname[STRSIZE];
|
||||
@@ -400,7 +397,7 @@ do_exec(char *prog, int fd, char *tcd)
|
||||
* It tests if a file descriptor is open and exits accordingly.
|
||||
*/
|
||||
int
|
||||
test_open(char *arg)
|
||||
test_open(const char *arg)
|
||||
{
|
||||
int fd, rc;
|
||||
int status;
|
||||
|
@@ -134,8 +134,6 @@
|
||||
#include <signal.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/wait.h>
|
||||
#include <limits.h>
|
||||
@@ -145,10 +143,10 @@
|
||||
#include "search_path.h"
|
||||
|
||||
void setup();
|
||||
void cleanup();
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
void help();
|
||||
|
||||
char *TCID="fcntl07B"; /* Test program identifier. */
|
||||
const char *TCID="fcntl07B"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
@@ -168,11 +166,11 @@ int stat_loc; /* for waitpid() */
|
||||
int npipe_fd;
|
||||
/* file descriptors for a named pipe */
|
||||
#define DEFAULT_FILE "DefaultFileName"
|
||||
char *File1 = DEFAULT_FILE;
|
||||
const char *File1 = DEFAULT_FILE;
|
||||
|
||||
#define DEFAULT_SUBPROG "test_open"
|
||||
char *openck = DEFAULT_SUBPROG; /* support program name to check for open FD */
|
||||
char subprog_path[_POSIX_PATH_MAX]; /* path to exec "openck" with */
|
||||
const char *openck = DEFAULT_SUBPROG; /* support program name to check for open FD */
|
||||
const char subprog_path[_POSIX_PATH_MAX];/* path to exec "openck" with */
|
||||
#define STRSIZE 255
|
||||
#define FIFONAME "FiFo"
|
||||
|
||||
@@ -180,12 +178,12 @@ int *testfds[] = {
|
||||
&npipe_fd, 0
|
||||
};
|
||||
|
||||
char *testfdtypes[] = {
|
||||
const char *testfdtypes[] = {
|
||||
"named pipe"
|
||||
};
|
||||
|
||||
int test_open(char *arg);
|
||||
int do_exec(char *prog, int fd, char *tcd);
|
||||
int do_exec(const char *prog, int fd, const char *tcd);
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
@@ -195,7 +193,7 @@ main(int ac, char **av)
|
||||
|
||||
int exec_return; /* return from do_exec */
|
||||
int **tcp; /* testcase pointer (pointer to FD) */
|
||||
char **tcd; /* testcase description pointer */
|
||||
const char **tcd; /* testcase description pointer */
|
||||
|
||||
/***************************************************************
|
||||
* parse standard options, and exit if there is an error
|
||||
@@ -356,7 +354,7 @@ help()
|
||||
*/
|
||||
|
||||
int
|
||||
do_exec(char *prog, int fd, char *tcd)
|
||||
do_exec(const char *prog, int fd, const char *tcd)
|
||||
{
|
||||
int pid;
|
||||
char pidname[STRSIZE];
|
||||
@@ -403,9 +401,6 @@ test_open(char *arg)
|
||||
int fd, rc;
|
||||
int status;
|
||||
|
||||
extern char *optarg;
|
||||
extern int optind;
|
||||
|
||||
fd = atoi(arg);
|
||||
|
||||
rc = fcntl(fd, F_GETFD, &status);
|
||||
|
@@ -119,13 +119,13 @@
|
||||
#include "usctest.h"
|
||||
|
||||
void setup();
|
||||
void cleanup();
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
#ifndef O_NDELAY
|
||||
#define O_NDELAY 0
|
||||
#endif
|
||||
|
||||
char *TCID="fcntl08"; /* Test program identifier. */
|
||||
const char *TCID="fcntl08"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -123,7 +123,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="fcntl09"; /* Test program identifier. */
|
||||
const char *TCID="fcntl09"; /* Test program identifier. */
|
||||
int TST_TOTAL=2; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -123,7 +123,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="fcntl10"; /* Test program identifier. */
|
||||
const char *TCID="fcntl10"; /* Test program identifier. */
|
||||
int TST_TOTAL=2; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -119,7 +119,6 @@
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include "test.h"
|
||||
@@ -134,7 +133,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="fork01"; /* Test program identifier. */
|
||||
const char *TCID="fork01"; /* Test program identifier. */
|
||||
int TST_TOTAL=2; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -40,21 +40,18 @@
|
||||
* None
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/wait.h>
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
void setup(void);
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
char *TCID = "fork02";
|
||||
const char *TCID = "fork02";
|
||||
int TST_TOTAL = 1;
|
||||
extern int Tst_count;
|
||||
|
||||
void setup(void);
|
||||
void cleanup(void);
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
int pid1, pid2, status;
|
||||
|
@@ -39,20 +39,21 @@
|
||||
* None
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/wait.h>
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
void setup(void);
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
char *TCID = "fork03";
|
||||
const char *TCID = "fork03";
|
||||
int TST_TOTAL = 1;
|
||||
extern int Tst_count;
|
||||
|
||||
void setup(void);
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
float fl1, fl2;
|
||||
|
@@ -107,10 +107,8 @@
|
||||
*
|
||||
*
|
||||
*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <sys/param.h>
|
||||
@@ -119,7 +117,7 @@
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
char *TCID="fork04"; /* Test program identifier. */
|
||||
const char *TCID="fork04"; /* Test program identifier. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
||||
@@ -130,7 +128,7 @@ extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
#define ENV_NOT_SET "getenv() does not find variable set"
|
||||
|
||||
/* list of environment variables to test */
|
||||
char *environ_list[] = {"TERM","NoTSetzWq","TESTPROG"};
|
||||
const char *environ_list[] = {"TERM","NoTSetzWq","TESTPROG"};
|
||||
#define NUMBER_OF_ENVIRON sizeof(environ_list)/sizeof(char *)
|
||||
int TST_TOTAL=NUMBER_OF_ENVIRON; /* Total number of test cases. */
|
||||
|
||||
|
@@ -40,19 +40,20 @@
|
||||
* None
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/wait.h>
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
char *TCID = "fork06";
|
||||
const char *TCID = "fork06";
|
||||
int TST_TOTAL = 1;
|
||||
extern int Tst_count;
|
||||
|
||||
void setup(void);
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
#define NUMFORKS 1000
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
int i, pid, status, childpid, succeed, fail;
|
||||
|
@@ -38,25 +38,27 @@
|
||||
* None
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/stat.h>
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
char *TCID = "fork07";
|
||||
const char *TCID = "fork07";
|
||||
int TST_TOTAL = 1;
|
||||
extern int Tst_count;
|
||||
|
||||
void setup(void);
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
char pbuf[10];
|
||||
char fnamebuf[40];
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
int status, count, forks, pid1;
|
||||
int ch_r_stat;
|
||||
FILE *rea, *writ;
|
||||
FILE *rea = NULL, *writ = NULL;
|
||||
|
||||
int lc; /* loop counter */
|
||||
const char *msg; /* message returned from parse_opts */
|
||||
|
@@ -39,27 +39,30 @@
|
||||
* None
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h> /* for OPEN_MAX */
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
char *TCID = "fork01";
|
||||
const char *TCID = "fork01";
|
||||
int TST_TOTAL = 1;
|
||||
extern int Tst_count;
|
||||
|
||||
void setup(void);
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
char filname[40], childfile[40];
|
||||
int first;
|
||||
FILE **fildeses; /* file streams */
|
||||
int mypid, nfiles;
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
int pid, status, dtable, nf;
|
||||
int pid, status, nf;
|
||||
|
||||
int lc; /* loop counter */
|
||||
const char *msg; /* message returned from parse_opts */
|
||||
@@ -211,8 +214,6 @@ setup()
|
||||
void
|
||||
cleanup()
|
||||
{
|
||||
int nf;
|
||||
|
||||
/*
|
||||
* print timing stats if that option was specified.
|
||||
* print errno log if that option was specified.
|
||||
|
@@ -40,21 +40,23 @@
|
||||
* None
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/wait.h>
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
char *TCID = "fork04";
|
||||
const char *TCID = "fork04";
|
||||
int TST_TOTAL = 1;
|
||||
extern int Tst_count;
|
||||
|
||||
void setup(void);
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
char pidbuf[10];
|
||||
char fnamebuf[40];
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
int status, pid, fildes;
|
||||
|
@@ -37,20 +37,21 @@
|
||||
* None
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <sys/wait.h>
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
char *TCID = "fork05";
|
||||
const char *TCID = "fork05";
|
||||
int TST_TOTAL = 1;
|
||||
extern int Tst_count;
|
||||
|
||||
void setup(void);
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
#define NUMFORKS 100
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
int i, pid, cpid, status;
|
||||
|
@@ -110,7 +110,6 @@
|
||||
*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
@@ -122,7 +121,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="fpathconf01"; /* Test program identifier. */
|
||||
const char *TCID="fpathconf01"; /* Test program identifier. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
#define FILENAME "fpafile01"
|
||||
@@ -133,7 +132,7 @@ int i;
|
||||
|
||||
struct pathconf_args
|
||||
{
|
||||
char *define_tag;
|
||||
const char *define_tag;
|
||||
int value;
|
||||
int defined; /* Some of these are undefined on regular files.
|
||||
* Cancer does a slightly better job with these already,
|
||||
|
@@ -121,9 +121,7 @@
|
||||
extern void setup();
|
||||
extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="fstat01"; /* Test program identifier. */
|
||||
const char *TCID="fstat01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -66,7 +66,6 @@
|
||||
* This test should be run by 'non-super-user' only.
|
||||
*
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -83,7 +82,7 @@
|
||||
#define BUF_SIZE 256
|
||||
#define MASK 0777
|
||||
|
||||
char *TCID="fstat02"; /* Test program identifier. */
|
||||
const char *TCID="fstat02"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
uid_t User_id; /* user id/group id of test process */
|
||||
@@ -91,7 +90,7 @@ gid_t Group_id;
|
||||
int fildes; /* File descriptor of testfile */
|
||||
|
||||
void setup(); /* Setup function for the test */
|
||||
void cleanup(); /* Cleanup function for the test */
|
||||
void cleanup() __attribute__((noreturn));/* Cleanup function for the test */
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
|
@@ -46,9 +46,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
@@ -62,14 +59,14 @@
|
||||
#define FILE_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
|
||||
#define TEST_FILE "testfile"
|
||||
|
||||
char *TCID="fstat03"; /* Test program identifier. */
|
||||
const char *TCID="fstat03"; /* Test program identifier. */
|
||||
int TST_TOTAL = 1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
int exp_enos[]={EBADF, 0};
|
||||
int fildes; /* testfile descriptor */
|
||||
|
||||
void setup(); /* Main setup function for the tests */
|
||||
void cleanup(); /* cleanup function for the test */
|
||||
void cleanup() __attribute__((noreturn));/* cleanup function for the test */
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
|
@@ -65,7 +65,6 @@
|
||||
* This test should be run by 'non-super-user' only.
|
||||
*
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -82,7 +81,7 @@
|
||||
#define BUF_SIZE 256
|
||||
#define MASK 0777
|
||||
|
||||
char *TCID="fstat01"; /* Test program identifier. */
|
||||
const char *TCID="fstat01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
uid_t User_id; /* user id/group id of test process */
|
||||
@@ -90,7 +89,7 @@ gid_t Group_id;
|
||||
int fildes; /* File descriptor of testfile */
|
||||
|
||||
void setup(); /* Setup function for the test */
|
||||
void cleanup(); /* Cleanup function for the test */
|
||||
void cleanup() __attribute__((noreturn));/* Cleanup function for the test */
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
|
@@ -123,7 +123,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="fsync01"; /* Test program identifier. */
|
||||
const char *TCID="fsync01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
@@ -131,7 +131,7 @@ int exp_enos[]={0, 0};
|
||||
|
||||
char fname[255];
|
||||
int fd;
|
||||
char *buf = "davef";
|
||||
const char *buf = "davef";
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
|
@@ -82,13 +82,13 @@
|
||||
#define FILE_SIZE 1024 /* test file size */
|
||||
#define TRUNC_LEN 256 /* truncation length */
|
||||
|
||||
char *TCID="ftruncate01"; /* Test program identifier. */
|
||||
const char *TCID="ftruncate01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test conditions */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
int fildes; /* file descriptor for test file */
|
||||
|
||||
void setup(); /* setup function for the test */
|
||||
void cleanup(); /* cleanup function for the test */
|
||||
void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
|
@@ -67,7 +67,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/fcntl.h>
|
||||
@@ -85,14 +84,14 @@
|
||||
#define TRUNC_LEN1 256 /* truncation length */
|
||||
#define TRUNC_LEN2 512 /* truncation length */
|
||||
|
||||
char *TCID="ftruncate02"; /* Test program identifier. */
|
||||
const char *TCID="ftruncate02"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test conditions */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
int fd; /* file descriptor of testfile */
|
||||
char tst_buff[BUF_SIZE]; /* buffer to hold testfile contents */
|
||||
|
||||
void setup(); /* setup function for the test */
|
||||
void cleanup(); /* cleanup function for the test */
|
||||
void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
|
@@ -67,7 +67,6 @@
|
||||
* This test should be executed by 'non-super-user' only.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/fcntl.h>
|
||||
@@ -93,7 +92,7 @@ int fd2; /* File descriptor for testfile2 */
|
||||
|
||||
struct test_case_t { /* test case struct. to hold ref. test cond's*/
|
||||
int fd;
|
||||
char *desc;
|
||||
const char *desc;
|
||||
int exp_errno;
|
||||
int len;
|
||||
int (*setupfunc)();
|
||||
@@ -103,20 +102,20 @@ struct test_case_t { /* test case struct. to hold ref. test cond's*/
|
||||
{ 0, NULL, 0, 0, no_setup }
|
||||
};
|
||||
|
||||
char *TCID="ftruncate03"; /* Test program identifier. */
|
||||
const char *TCID="ftruncate03"; /* Test program identifier. */
|
||||
int TST_TOTAL=2; /* Total number of test conditions */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
int exp_enos[]={EINVAL, EBADF, 0};
|
||||
|
||||
void setup(); /* Main setup function for the test */
|
||||
void cleanup(); /* Main cleanup function for the test */
|
||||
void cleanup(void) __attribute__((noreturn)); /* Main cleanup function for the test */
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
int lc; /* loop counter */
|
||||
const char *msg; /* message returned from parse_opts */
|
||||
char *test_desc; /* test specific error message */
|
||||
const char *test_desc; /* test specific error message */
|
||||
int fildes; /* File descriptor of testfile */
|
||||
off_t trunc_len; /* truncate length */
|
||||
int ind;
|
||||
|
@@ -121,7 +121,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="getegid01"; /* Test program identifier. */
|
||||
const char *TCID="getegid01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -121,7 +121,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="geteuid01"; /* Test program identifier. */
|
||||
const char *TCID="geteuid01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -122,7 +122,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="getgid01"; /* Test program identifier. */
|
||||
const char *TCID="getgid01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -65,13 +65,14 @@
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
void setup(void);
|
||||
|
||||
char *TCID= "getgid02";
|
||||
const char *TCID= "getgid02";
|
||||
int TST_TOTAL = 1;
|
||||
extern int Tst_count;
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
int lc; /* loop counter */
|
||||
|
@@ -65,13 +65,14 @@
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
void setup(void);
|
||||
|
||||
char *TCID= "getgid01";
|
||||
const char *TCID= "getgid01";
|
||||
int TST_TOTAL = 1;
|
||||
extern int Tst_count;
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
int lc; /* loop counter */
|
||||
|
@@ -75,7 +75,6 @@ BUGS:
|
||||
|
||||
************************************************************/
|
||||
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
@@ -84,9 +83,9 @@ BUGS:
|
||||
#include "usctest.h"
|
||||
|
||||
void setup();
|
||||
void cleanup();
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
char *TCID="getgroups01"; /* Test program identifier. */
|
||||
const char *TCID="getgroups01"; /* Test program identifier. */
|
||||
int TST_TOTAL=4; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -123,7 +123,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="getgroups02"; /* Test program identifier. */
|
||||
const char *TCID="getgroups02"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -119,7 +119,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="gethostid01"; /* Test program identifier. */
|
||||
const char *TCID="gethostid01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -121,7 +121,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="gethostname01"; /* Test program identifier. */
|
||||
const char *TCID="gethostname01";/* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -50,12 +50,13 @@
|
||||
#include <usctest.h>
|
||||
|
||||
void setup(void);
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
char *TCID = "getpgid01";
|
||||
const char *TCID = "getpgid01";
|
||||
int TST_TOTAL = 1;
|
||||
extern int Tst_count;
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
int lc; /* loop counter */
|
||||
@@ -98,7 +99,6 @@ main(int ac, char **av)
|
||||
}
|
||||
|
||||
/* child */
|
||||
block1:
|
||||
tst_resm(TINFO, "Enter block 1");
|
||||
fail = 0;
|
||||
if ((pgid_0 = getpgid(0)) < 0) {
|
||||
@@ -114,7 +114,6 @@ block1:
|
||||
}
|
||||
tst_resm(TINFO, "Exit block 1");
|
||||
|
||||
block2:
|
||||
tst_resm(TINFO, "Enter block 2");
|
||||
fail = 0;
|
||||
|
||||
@@ -138,7 +137,6 @@ block2:
|
||||
}
|
||||
tst_resm(TINFO, "Exit block 2");
|
||||
|
||||
block3:
|
||||
tst_resm(TINFO, "Enter block 3");
|
||||
fail = 0;
|
||||
|
||||
@@ -164,7 +162,6 @@ block3:
|
||||
}
|
||||
tst_resm(TINFO, "Exit block 3");
|
||||
|
||||
block4:
|
||||
tst_resm(TINFO, "Enter block 4");
|
||||
fail = 0;
|
||||
|
||||
|
@@ -52,9 +52,9 @@
|
||||
#include <usctest.h>
|
||||
|
||||
void setup(void);
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
char *TCID = "getpgid01";
|
||||
const char *TCID = "getpgid01";
|
||||
int TST_TOTAL = 2;
|
||||
extern int Tst_count;
|
||||
|
||||
@@ -74,6 +74,7 @@ struct test_case_t {
|
||||
{&pgid_1, ESRCH}
|
||||
};
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
int lc; /* loop counter */
|
||||
|
@@ -122,7 +122,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="getpgrp01"; /* Test program identifier. */
|
||||
const char *TCID="getpgrp01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -120,7 +120,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="getpid01"; /* Test program identifier. */
|
||||
const char *TCID="getpid01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -62,10 +62,8 @@
|
||||
* None.
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <sys/wait.h>
|
||||
@@ -74,9 +72,9 @@
|
||||
#include "usctest.h"
|
||||
|
||||
void setup(); /* Main setup function of test */
|
||||
void cleanup(); /* cleanup function for the test */
|
||||
void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
|
||||
|
||||
char *TCID="getpid01"; /* Test program identifier. */
|
||||
const char *TCID="getpid01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -122,7 +122,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="getppid01"; /* Test program identifier. */
|
||||
const char *TCID="getppid01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -43,14 +43,16 @@
|
||||
#include <errno.h>
|
||||
#include <test.h>
|
||||
#include <usctest.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
char *TCID = "getppid01";
|
||||
const char *TCID = "getppid01";
|
||||
int TST_TOTAL = 1;
|
||||
extern int Tst_count;
|
||||
|
||||
void setup(void);
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
int pid, ppid;
|
||||
|
@@ -122,7 +122,7 @@ extern void cleanup();
|
||||
|
||||
|
||||
|
||||
char *TCID="getuid01"; /* Test program identifier. */
|
||||
const char *TCID="getuid01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -45,13 +45,14 @@
|
||||
#include <test.h>
|
||||
#include <usctest.h>
|
||||
|
||||
char *TCID = "getuid02";
|
||||
const char *TCID = "getuid02";
|
||||
int TST_TOTAL = 1;
|
||||
extern int Tst_count;
|
||||
|
||||
void setup(void);
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
int lc; /* loop counter */
|
||||
|
@@ -45,13 +45,14 @@
|
||||
#include <test.h>
|
||||
#include <usctest.h>
|
||||
|
||||
char *TCID = "getuid01";
|
||||
const char *TCID = "getuid01";
|
||||
int TST_TOTAL = 1;
|
||||
extern int Tst_count;
|
||||
|
||||
void setup(void);
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
int lc; /* loop counter */
|
||||
|
@@ -62,16 +62,17 @@
|
||||
#include <errno.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
void setup(void);
|
||||
|
||||
char *TCID= "kill01()";
|
||||
const char *TCID= "kill01()";
|
||||
int TST_TOTAL = 1;
|
||||
|
||||
extern int Tst_count;
|
||||
|
||||
#define TEST_SIG SIGKILL
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
int lc; /* loop counter */
|
||||
|
@@ -134,7 +134,6 @@
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
@@ -202,9 +201,9 @@ void chld1_kill(); /*This routine is used by child 1 to remove itself and */
|
||||
/*its children A and B. */
|
||||
|
||||
void setup();
|
||||
void cleanup();
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
char *TCID="kill02"; /* Test program identifier. */
|
||||
const char *TCID="kill02"; /* Test program identifier. */
|
||||
int TST_TOTAL=2; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
extern int Tst_nobuf; /* var. used to turn off tst_res buffering */
|
||||
@@ -657,7 +656,7 @@ void childB_rout()
|
||||
void
|
||||
setup()
|
||||
{
|
||||
int errno_buf; /*indicates the errno if pipe set up fails. */
|
||||
int errno_buf = 0; /*indicates the errno if pipe set up fails. */
|
||||
int err_flag = FALSE; /*Indicates if an error has occurred in pipe set up. */
|
||||
char mesg[MAXMESG]; /*Used to buffer messages for tst_res. */
|
||||
|
||||
|
@@ -62,10 +62,10 @@
|
||||
#include <errno.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
void setup(void);
|
||||
|
||||
char *TCID= "kill03()";
|
||||
const char *TCID= "kill03()";
|
||||
int TST_TOTAL = 1;
|
||||
|
||||
extern int Tst_count;
|
||||
@@ -74,12 +74,13 @@ int exp_enos[] = {EINVAL, 0};
|
||||
|
||||
#define TEST_SIG 2000
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
int lc; /* loop counter */
|
||||
const char *msg; /* message returned from parse_opts */
|
||||
pid_t pid;
|
||||
int exno, status, nsig;
|
||||
int exno, status;
|
||||
|
||||
/* parse standard options */
|
||||
if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
|
||||
|
@@ -62,10 +62,10 @@
|
||||
#include <errno.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
void cleanup(void);
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
void setup(void);
|
||||
|
||||
char *TCID= "kill04()";
|
||||
const char *TCID= "kill04()";
|
||||
int TST_TOTAL = 1;
|
||||
|
||||
extern int Tst_count;
|
||||
@@ -74,6 +74,7 @@ int exp_enos[] = {ESRCH, 0};
|
||||
|
||||
#define TEST_SIG SIGKILL
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
{
|
||||
int lc; /* loop counter */
|
||||
|
@@ -119,13 +119,13 @@
|
||||
#include "usctest.h"
|
||||
|
||||
void setup();
|
||||
void cleanup();
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
void alarm_handler(int sig);
|
||||
|
||||
|
||||
|
||||
|
||||
char *TCID="kill09"; /* Test program identifier. */
|
||||
const char *TCID="kill09"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -119,11 +119,11 @@
|
||||
#include "usctest.h"
|
||||
|
||||
void setup();
|
||||
void cleanup();
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
|
||||
|
||||
char *TCID="link02"; /* Test program identifier. */
|
||||
const char *TCID="link02"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -121,11 +121,11 @@
|
||||
|
||||
void setup();
|
||||
void help();
|
||||
void cleanup();
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
|
||||
|
||||
char *TCID="link03"; /* Test program identifier. */
|
||||
const char *TCID="link03"; /* Test program identifier. */
|
||||
int TST_TOTAL=2; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
extern int Tst_nobuf;
|
||||
|
@@ -121,12 +121,12 @@
|
||||
#include "usctest.h"
|
||||
|
||||
void setup();
|
||||
void cleanup();
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
|
||||
extern char *get_high_address();
|
||||
|
||||
char *TCID="link04"; /* Test program identifier. */
|
||||
const char *TCID="link04"; /* Test program identifier. */
|
||||
int TST_TOTAL=14; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
@@ -141,10 +141,10 @@ char High_address[64];
|
||||
int dir_setup();
|
||||
|
||||
struct test_case_t {
|
||||
char *file1;
|
||||
char *desc1;
|
||||
char *file2;
|
||||
char *desc2;
|
||||
const char *file1;
|
||||
const char *desc1;
|
||||
const char *file2;
|
||||
const char *desc2;
|
||||
int exp_errno;
|
||||
int (*setupfunc1)();
|
||||
int (*setupfunc2)();
|
||||
@@ -214,8 +214,8 @@ main(int ac, char **av)
|
||||
{
|
||||
int lc; /* loop counter */
|
||||
const char *msg; /* message returned from parse_opts */
|
||||
char *fname1, *fname2;
|
||||
char *desc1, *desc2;
|
||||
const char *fname1, *fname2;
|
||||
const char *desc1, *desc2;
|
||||
int ind;
|
||||
|
||||
/***************************************************************
|
||||
|
@@ -119,12 +119,12 @@
|
||||
#include "usctest.h"
|
||||
|
||||
void setup();
|
||||
void cleanup();
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
void help();
|
||||
|
||||
|
||||
|
||||
char *TCID="link05"; /* Test program identifier. */
|
||||
const char *TCID="link05"; /* Test program identifier. */
|
||||
#ifdef CRAY
|
||||
int TST_TOTAL=2; /* Total number of test cases. */
|
||||
#else
|
||||
|
@@ -114,16 +114,15 @@
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
void setup();
|
||||
void cleanup();
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
|
||||
|
||||
char *TCID="lseek01"; /* Test program identifier. */
|
||||
const char *TCID="lseek01"; /* Test program identifier. */
|
||||
int TST_TOTAL=3; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -114,16 +114,15 @@
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
void setup();
|
||||
void cleanup();
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
|
||||
|
||||
char *TCID="lseek02"; /* Test program identifier. */
|
||||
const char *TCID="lseek02"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -114,15 +114,14 @@
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
void setup();
|
||||
void cleanup();
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
void rec_sigsys(int);
|
||||
|
||||
char *TCID="lseek03"; /* Test program identifier. */
|
||||
const char *TCID="lseek03"; /* Test program identifier. */
|
||||
int TST_TOTAL=3; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -115,16 +115,15 @@
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
void setup();
|
||||
void cleanup();
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
|
||||
|
||||
char *TCID="lseek04"; /* Test program identifier. */
|
||||
const char *TCID="lseek04"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -114,16 +114,15 @@
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include "test.h"
|
||||
#include "usctest.h"
|
||||
|
||||
void setup();
|
||||
void cleanup();
|
||||
void cleanup(void) __attribute__((noreturn));
|
||||
|
||||
|
||||
|
||||
char *TCID="lseek05"; /* Test program identifier. */
|
||||
const char *TCID="lseek05"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
|
||||
|
@@ -66,8 +66,6 @@
|
||||
* None.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@@ -83,13 +81,13 @@
|
||||
#define TEMP_FILE "tmp_file"
|
||||
#define FILE_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
|
||||
|
||||
char *TCID="lseek01"; /* Test program identifier. */
|
||||
const char *TCID="lseek01"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
int fildes; /* file handle for temp file */
|
||||
|
||||
void setup(); /* Main setup function of test */
|
||||
void cleanup(); /* cleanup function for the test */
|
||||
void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
|
@@ -66,8 +66,6 @@
|
||||
* None.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@@ -82,7 +80,7 @@
|
||||
#define TEMP_FILE "tmp_file"
|
||||
#define FILE_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
|
||||
|
||||
char *TCID="lseek02"; /* Test program identifier. */
|
||||
const char *TCID="lseek02"; /* Test program identifier. */
|
||||
int TST_TOTAL=1; /* Total number of test cases. */
|
||||
extern int Tst_count; /* Test Case counter for tst_* routines */
|
||||
int fildes; /* file handle for temp file */
|
||||
@@ -91,7 +89,7 @@ char write_buf1[BUFSIZ]; /* buffer to hold data */
|
||||
char write_buf2[BUFSIZ]; /* buffer to hold data */
|
||||
|
||||
void setup(); /* Main setup function of test */
|
||||
void cleanup(); /* cleanup function for the test */
|
||||
void cleanup(void) __attribute__((noreturn)); /* cleanup function for the test */
|
||||
|
||||
int
|
||||
main(int ac, char **av)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user