From 555f33504cc04a92a1749b54256457fc7be74bb6 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 12 Dec 2010 13:24:19 -0500 Subject: Add tests for chdir(2), chown(2), chmod(2). Fix some earlier ones. --- test/cfgetispeed.c | 2 +- test/cfgetospeed.c | 2 +- test/cfsetispeed.c | 2 +- test/cfsetospeed.c | 2 +- test/chdir.c | 12 ++++++++++++ test/chmod.c | 13 +++++++++++++ test/chown.c | 13 +++++++++++++ test/regress.chk | 16 +++++++++++++++- 8 files changed, 57 insertions(+), 5 deletions(-) create mode 100644 test/chdir.c create mode 100644 test/chmod.c create mode 100644 test/chown.c (limited to 'test') diff --git a/test/cfgetispeed.c b/test/cfgetispeed.c index 3002759..9ca40cf 100644 --- a/test/cfgetispeed.c +++ b/test/cfgetispeed.c @@ -8,6 +8,6 @@ main(int arg, char **argv) { - struct termios *t; + struct termios t; cfgetispeed(&t); } diff --git a/test/cfgetospeed.c b/test/cfgetospeed.c index c5fc1f1..c448ff0 100644 --- a/test/cfgetospeed.c +++ b/test/cfgetospeed.c @@ -8,6 +8,6 @@ main(int arg, char **argv) { - struct termios *t; + struct termios t; cfgetospeed(&t); } diff --git a/test/cfsetispeed.c b/test/cfsetispeed.c index 4071186..2cdd37f 100644 --- a/test/cfsetispeed.c +++ b/test/cfsetispeed.c @@ -8,6 +8,6 @@ main(int arg, char **argv) { - struct termios *t; + struct termios t; cfsetispeed(&t, 0); } diff --git a/test/cfsetospeed.c b/test/cfsetospeed.c index 41c8679..92392c2 100644 --- a/test/cfsetospeed.c +++ b/test/cfsetospeed.c @@ -8,6 +8,6 @@ main(int arg, char **argv) { - struct termios *t; + struct termios t; cfsetospeed(&t, 0); } diff --git a/test/chdir.c b/test/chdir.c new file mode 100644 index 0000000..42dbf54 --- /dev/null +++ b/test/chdir.c @@ -0,0 +1,12 @@ +/* + * Items: chdir( + * Standardized-By: SuS + * Not-Detected-by: gcc-4.4.3 + Linux + */ + +#include + +main(int arg, char **argv) +{ + (void)chdir("/"); +} diff --git a/test/chmod.c b/test/chmod.c new file mode 100644 index 0000000..51e866f --- /dev/null +++ b/test/chmod.c @@ -0,0 +1,13 @@ +/* + * Items: chmod( + * Standardized-By: SuS + * Not-Detected-by: gcc-4.4.3 + Linux + */ + +#include +#include + +main(int arg, char **argv) +{ + (void)chmod("/", 0); +} diff --git a/test/chown.c b/test/chown.c new file mode 100644 index 0000000..1b46960 --- /dev/null +++ b/test/chown.c @@ -0,0 +1,13 @@ +/* + * Items: chown( + * Standardized-By: SuS + * Not-Detected-by: gcc-4.4.3 + Linux + */ + +#include +#include + +main(int arg, char **argv) +{ + (void)chown("/", 0, 0); +} diff --git a/test/regress.chk b/test/regress.chk index 4be1bf5..cd09724 100644 --- a/test/regress.chk +++ b/test/regress.chk @@ -1,3 +1,5 @@ +deheader: ./chdir.c has requires from \Wchdir\s*\( +deheader: ./chdir.c includes deheader: ./string.c includes deheader: ./bzero.c has requires from \Wbzero\s*\( deheader: ./bzero.c includes @@ -48,6 +50,9 @@ deheader: ./abort.c has requires from \Wabort\s*\( deheader: ./abort.c includes deheader: ./atanh.c has requires from \Watanh\s*\( deheader: ./atanh.c includes +deheader: ./chmod.c has requires , from \Wchmod\s*\( +deheader: ./chmod.c includes +deheader: ./chmod.c includes deheader: ./atof.c has requires from \Wl64a\s*\( deheader: ./atof.c includes deheader: ./acosh.c has requires from \Wacosh\s*\( @@ -67,6 +72,8 @@ deheader: ./catgets.c has requires from \Wcatgets\s*\( deheader: ./catgets.c includes deheader: ./cbrt.c has requires from \Wcbrt\s*\( deheader: ./cbrt.c includes +deheader: ./chown.c includes +deheader: ./chown.c includes deheader: ./advance.c has requires from \Wadvance\s*\( deheader: ./advance.c includes deheader: ./catopen.c has requires from \Wcatopen\s*\( @@ -100,6 +107,7 @@ deheader: ./duplicate.c without succeeded. deheader: ./duplicate.c without succeeded. deheader: remove from ./duplicate.c deheader: remove from ./duplicate.c +deheader: in ./chdir.c, retaining required '#include \n' deheader: in ./atanh.c, retaining required '#include \n' deheader: ./bcopy.c without failed (512). deheader: in ./cfsetispeed.c, retaining required '#include \n' @@ -124,5 +132,11 @@ deheader: in ./acosh.c, retaining required '#include \n' deheader: in ./catgets.c, retaining required '#include \n' deheader: in ./bcmp.c, retaining required '#include \n' deheader: in ./a64l.c, retaining required '#include \n' +deheader: in ./chmod.c, retaining required '#include \n' +deheader: in ./chmod.c, retaining required '#include \n' +deheader: ./chown.c without succeeded. +deheader: ./chown.c without succeeded. +deheader: remove from ./chown.c +deheader: remove from ./chown.c deheader: in ./advance.c, retaining required '#include \n' -deheader: saw 40 files, 42 includes, 8 removed +deheader: saw 43 files, 47 includes, 10 removed -- cgit v1.2.3-70-g09d2