summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-12-21 05:24:29 -0500
committerEric S. Raymond <esr@thyrsus.com>2010-12-21 05:24:29 -0500
commit0d6ec596b67738f52389f32bd44bd3d28c2cf1fd (patch)
treee76d18e85fb26156ef5c040e67bae71bbc59ff6f /test
parent56cde2863262b28bec0252a8d0c82b4546371c72 (diff)
downloaddeheader-0d6ec596b67738f52389f32bd44bd3d28c2cf1fd.tar.gz
deheader-0d6ec596b67738f52389f32bd44bd3d28c2cf1fd.tar.bz2
deheader-0d6ec596b67738f52389f32bd44bd3d28c2cf1fd.tar.xz
deheader-0d6ec596b67738f52389f32bd44bd3d28c2cf1fd.zip
Be rigorous and list SuS entry points.
Diffstat (limited to 'test')
-rw-r--r--test/README53
-rw-r--r--test/regress.chk46
2 files changed, 26 insertions, 73 deletions
diff --git a/test/README b/test/README
index 21012b8..5eb212e 100644
--- a/test/README
+++ b/test/README
@@ -1,55 +1,2 @@
This directory contains C sourcfiles intended to test deheader, and
a check against which to compare the output.
-
-Many of these examples are takem from the Single Unix Standard's list
-of section 2 and 3 entry points. I don't necessarily test anything in
-SuS with a structure- or pointer-to-structure type argument; that will
-fail as it should on any modern compiler because the struct is neither
-defined nor the derived pointer type forward-declared with a stub. I
-also ignore any header that declares only macros.
-
-SuS things excluded by these criteria:
-
-aio.h - aio_* entry points for asynchronous input and output
-time.h - asctime() and asctime_r()
-assert.h - assert() macro
-syslog.h - closelog(), openlog(), setlogmask(), syslog()
-rexgexp.h - advance() is tested, compile() is not.
-unistd.h - confstr(), exec*(), fchdir(), fdatasync() not tested.
-math.h - cos(), cosh(): these will need <math.h>.
-stdio.h - ctermid(), fdopen(), feof(), ferror(), fflush(), fgetc() not tested.
-time.h - ctime_r(), difftime(), and daylight are not tested, but ctime() is.
-ctype.h - not tested; all the macro defs would be unresolved.
-stdio.h - cuserid() not tested; SuS includes <stdio.h>
-ndbm.h - all functions rely on the DBM datatype
-dirent.h - all entry points depend on struct dirent.
-libgen.h - basename() tested, dirname() not.
-stdio.h - div() not tested; SuS includes <stdio.h>
-dlfcn.h - dlclose(), dlerror(), dlopen(), dlsym() not tested
-grp.h - functions not tested, getgrent() depends on <grp.h>
-pwd.h - functions not tested, getpwent() depends on <pwd.h>
-utmpx.h - functions not tested, most depend on <utmpx.h>
-math.h - erf(), erfc(), exp(), expm1(), fabs(), floor(). fmod() not tested.
-stropts.h - fattach(), fdetach() not tested
-time.h - FD_* macros are not tested
-strings.h - ffs() not tested.
-stdio.h - fgetpos(), fgets(), fileno(), f*lockfile(), fopen(), not tested.
-wchar.h - fgetwc(), fgetws(), fwide() not tested.
-fmtmsg.h - fmtmsg() not tested.
-fnmatch.h - fnmatch() not tested.
-unistd.h - fork(), fpathconf(), free(), fsnyc(), *truncate() not tested.
-stdio.h - *printf*, fputc(), fputwc(), fputws(), fread(), fwrite() not tested.
-stdio.h - freopen(), fscanf(), sscanf(), feek(), fseeko() not tested.
-stdio.h - fsetpos(), ftell(), ftello(), getc(), getchar() not tested.
-math.h - frexp(), gamma() not tested.
-sys/statvfs.h - fstatvfs(), statvfs() untested.
-sys/timeb.h - ftime() not tested.
-sys/ipc.h - ftok()
-ftw.h - ftw(), nftw() not tested.
-wchar.h - fwprintf(), wprintf(), swprintf() not tested.
-wchar.h - fwscanf(), wscanf(), swscanf() not tested.
-stdio.h - getc_unlocked(), getchar_unlocked() not tested.
-stdio.h - putc_unlocked(), putchar_unlocked() not tested.
-
-For other dependencies not tested, see the commented-out lines in deheader's
-dependency table.
diff --git a/test/regress.chk b/test/regress.chk
index 00fbafc..9519cdf 100644
--- a/test/regress.chk
+++ b/test/regress.chk
@@ -1,3 +1,4 @@
+deheader: ./chdir.c has requires <unistd.h> from chdir()
deheader: ./chdir.c includes <unistd.h>
deheader: ./string.c includes <string.h>
deheader: ./bzero.c has requires <string.h> from bzero()
@@ -9,9 +10,9 @@ deheader: ./duplicate.c includes <stdio.h>
deheader: ./duplicate.c has more than one inclusion of <stdio.h>
deheader: ./brk.c has requires <unistd.h> from brk()
deheader: ./brk.c includes <unistd.h>
+deheader: ./closedir.c has requires <sys/types.h>,<dirent.h> from closedir()
deheader: ./closedir.c includes <sys/types.h>
deheader: ./closedir.c includes <dirent.h>
-deheader: ./closedir.c has requires <sys/types.h> from <dirent.h>
deheader: ./asinh.c includes <math.h>
deheader: ./fchmod.c has requires <sys/stat,h> from fchmod()
deheader: ./fchmod.c includes <sys/types.h>
@@ -28,11 +29,14 @@ deheader: ./bcmp.c has requires <string.h> from bcmp()
deheader: ./bcmp.c includes <string.h>
deheader: ./ceil.c has requires <math.h> from ceil()
deheader: ./ceil.c includes <math.h>
+deheader: ./bcopy.c has requires <string.h> from bcopy()
deheader: ./bcopy.c includes <string.h>
+deheader: ./atexit.c has requires <stdlib.h> from atexit()
deheader: ./atexit.c includes <stdlib.h>
deheader: ./btowc.c has requires <stdio.h>,<wchar.h> from btowc()
deheader: ./btowc.c includes <stdio.h>
deheader: ./btowc.c includes <wchar.h>
+deheader: ./abs.c has requires <math.h> from abs()
deheader: ./abs.c includes <stdlib.h>
deheader: ./calloc.c has requires <stdlib.h> from calloc()
deheader: ./calloc.c includes <stdlib.h>
@@ -45,17 +49,20 @@ deheader: ./atoi.c includes <stdlib.h>
deheader: ./cfsetispeed.c has requires <termios.h> from cfsetispeed()
deheader: ./cfsetispeed.c includes <termios.h>
deheader: ./sbrk.c includes <unistd.h>
+deheader: ./ctime.c has requires <time.h> from ctime()
deheader: ./ctime.c includes <time.h>
deheader: ./fstat.c has requires <sys/types.h>,<sys/stat.h> from fstat()
deheader: ./fstat.c includes <sys/stat.h>
deheader: ./fstat.c includes <sys/types.h>
deheader: ./fclose.c has requires <stdio.h> from fclose()
deheader: ./fclose.c includes <stdio.h>
+deheader: ./alarm.c has requires <unistd.h> from alarm()
deheader: ./alarm.c includes <unistd.h>
deheader: ./cfgetospeed.c has requires <termios.h> from cfgetospeed()
deheader: ./cfgetospeed.c includes <termios.h>
deheader: ./acos.c has requires <math.h> from acos()
deheader: ./acos.c includes <math.h>
+deheader: ./clock_gettime.c has requires <time.h> from clock_gettime()
deheader: ./clock_gettime.c includes <time.h>
deheader: ./abort.c has requires <stdlib.h> from abort()
deheader: ./abort.c includes <stdlib.h>
@@ -74,6 +81,7 @@ deheader: ./clock.c has requires <time.h> from clock()
deheader: ./clock.c includes <time.h>
deheader: ./basename.c has requires <libgen.h> from basename()
deheader: ./basename.c includes <libgen.h>
+deheader: ./clearerr.c has requires <stdio.h> from clearerr()
deheader: ./clearerr.c includes <stdio.h>
deheader: ./asin.c includes <math.h>
deheader: ./bsort.c has requires <stdlib.h> from bsort()
@@ -83,6 +91,7 @@ deheader: ./bsort.c includes <string.h>
deheader: ignoring <string.h> (conditional inclusion)
deheader: ./bsort.c includes <stdlib.h>
deheader: ./bsort.c has requires <stdio.h> from scanf()
+deheader: ./chroot.c has requires <unistd.h> from chroot()
deheader: ./chroot.c includes <unistd.h>
deheader: ./catgets.c has requires <nl_types.h> from catgets()
deheader: ./catgets.c includes <nl_types.h>
@@ -91,9 +100,11 @@ deheader: ./cbrt.c includes <math.h>
deheader: ./chown.c has requires <sys/types.h>,<unistd.h> from chown()
deheader: ./chown.c includes <sys/types.h>
deheader: ./chown.c includes <unistd.h>
+deheader: ./clock_settime.c has requires <time.h> from clock_settime()
deheader: ./clock_settime.c includes <time.h>
deheader: ./crypt.c has requires <unistd.h> from crypt()
deheader: ./crypt.c includes <unistd.h>
+deheader: ./clock_getres.c has requires <time.h> from clock_getres()
deheader: ./clock_getres.c includes <time.h>
deheader: ./fchown.c includes <unistd.h>
deheader: ./advance.c has requires <regexp.h> from advance()
@@ -101,17 +112,18 @@ deheader: ./advance.c has requires <stdio.h> from getc()
deheader: ./advance.c includes <regexp.h>
deheader: ./catopen.c has requires <nl_types.h> from catopen()
deheader: ./catopen.c includes <nl_types.h>
+deheader: ./close.c has requires <unistd.h> from close()
deheader: ./close.c includes <unistd.h>
deheader: ./atan2.c has requires <math.h> from atan2()
deheader: ./atan2.c includes <math.h>
deheader: ./catclose.c has requires <nl_types.h> from catclose()
deheader: ./catclose.c includes <nl_types.h>
-deheader: ./clock_getres.c without <time.h> failed (512).
+deheader: in ./clock_getres.c, retaining required '#include <time.h>\n'
deheader: ./asin.c without <math.h> succeeded.
deheader: remove <math.h> from ./asin.c
deheader: in ./cbrt.c, retaining required '#include <math.h>\n'
deheader: in ./acos.c, retaining required '#include <math.h>\n'
-deheader: ./clock_gettime.c without <time.h> failed (512).
+deheader: in ./clock_gettime.c, retaining required '#include <time.h>\n'
deheader: in ./catopen.c, retaining required '#include <nl_types.h>\n'
deheader: in ./brk.c, retaining required '#include <unistd.h>\n'
deheader: in ./atan2.c, retaining required '#include <math.h>\n'
@@ -119,52 +131,47 @@ deheader: ./string.c without <string.h> succeeded.
deheader: remove <string.h> from ./string.c
deheader: in ./bsort.c, retaining required '#include <stdlib.h>\n'
deheader: in ./bsort.c, <stdio.h> is required for portability but not present.
-
deheader: in ./cfgetospeed.c, retaining required '#include <termios.h>\n'
deheader: in ./catclose.c, retaining required '#include <nl_types.h>\n'
deheader: in ./cfgetispeed.c, retaining required '#include <termios.h>\n'
deheader: in ./ceil.c, retaining required '#include <math.h>\n'
deheader: in ./bsd_signal.c, retaining required '#include <signal.h>\n'
deheader: ./abs.c without <stdlib.h> succeeded.
+deheader: in ./abs.c, <math.h> is required for portability but not present.
deheader: remove <stdlib.h> from ./abs.c
deheader: in ./basename.c, retaining required '#include <libgen.h>\n'
-deheader: ./ctime.c without <time.h> failed (512).
+deheader: in ./ctime.c, retaining required '#include <time.h>\n'
deheader: in ./cfsetospeed.c, retaining required '#include <termios.h>\n'
deheader: in ./abort.c, retaining required '#include <stdlib.h>\n'
deheader: in ./atan.c, retaining required '#include <math.h>\n'
-deheader: ./clock_settime.c without <time.h> failed (512).
+deheader: in ./clock_settime.c, retaining required '#include <time.h>\n'
deheader: ./duplicate.c without <stdio.h> succeeded.
deheader: ./duplicate.c without <stdio.h> succeeded.
deheader: remove <stdio.h> from ./duplicate.c
deheader: remove <stdio.h> from ./duplicate.c
-deheader: ./chdir.c without <unistd.h> succeeded.
-deheader: remove <unistd.h> from ./chdir.c
+deheader: in ./chdir.c, retaining required '#include <unistd.h>\n'
deheader: in ./atanh.c, retaining required '#include <math.h>\n'
-deheader: ./close.c without <unistd.h> succeeded.
-deheader: remove <unistd.h> from ./close.c
-deheader: ./bcopy.c without <string.h> failed (512).
+deheader: in ./close.c, retaining required '#include <unistd.h>\n'
+deheader: in ./bcopy.c, retaining required '#include <string.h>\n'
deheader: in ./crypt.c, retaining required '#include <unistd.h>\n'
deheader: in ./cfsetispeed.c, retaining required '#include <termios.h>\n'
deheader: ./fchmod.c without <sys/types.h> succeeded.
deheader: in ./fchmod.c, <sys/stat,h> is required for portability but not present.
-
deheader: remove <sys/types.h> from ./fchmod.c
deheader: in ./atof.c, retaining required '#include <stdlib.h>\n'
-deheader: ./chroot.c without <unistd.h> succeeded.
-deheader: remove <unistd.h> from ./chroot.c
+deheader: in ./chroot.c, retaining required '#include <unistd.h>\n'
deheader: in ./atol.c, retaining required '#include <stdlib.h>\n'
deheader: in ./atoi.c, retaining required '#include <stdlib.h>\n'
deheader: ./asinh.c without <math.h> succeeded.
deheader: remove <math.h> from ./asinh.c
-deheader: ./alarm.c without <unistd.h> succeeded.
-deheader: remove <unistd.h> from ./alarm.c
+deheader: in ./alarm.c, retaining required '#include <unistd.h>\n'
deheader: ./sbrk.c without <unistd.h> succeeded.
deheader: remove <unistd.h> from ./sbrk.c
deheader: in ./fclose.c, retaining required '#include <stdio.h>\n'
deheader: in ./umask.c, retaining required '#include <sys/types.h>\n'
deheader: in ./umask.c, retaining required '#include <sys/stat.h>\n'
deheader: in ./calloc.c, retaining required '#include <stdlib.h>\n'
-deheader: ./atexit.c without <stdlib.h> failed (512).
+deheader: in ./atexit.c, retaining required '#include <stdlib.h>\n'
deheader: in ./bzero.c, retaining required '#include <string.h>\n'
deheader: in ./access.c, retaining required '#include <unistd.h>\n'
deheader: in ./btowc.c, retaining required '#include <wchar.h>\n'
@@ -180,6 +187,5 @@ deheader: in ./chown.c, retaining required '#include <unistd.h>\n'
deheader: in ./chown.c, retaining required '#include <sys/types.h>\n'
deheader: in ./advance.c, retaining required '#include <regexp.h>\n'
deheader: in ./advance.c, <stdio.h> is required for portability but not present.
-
-deheader: ./clearerr.c without <stdio.h> failed (512).
-deheader: saw 57 files, 63 includes, 12 removed
+deheader: in ./clearerr.c, retaining required '#include <stdio.h>\n'
+deheader: saw 57 files, 63 includes, 8 removed