Browse Source

test: add API test

part1; Needs improvement:
Think about a sensible way to map feature sets to the mandated syms.
Our LEGACY stuff maps to OB, OBXSI for example.
A "normal" config should satisfy the BASE (i.e. $foo.SUSv4.syms)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer 14 years ago
parent
commit
d61066fcfe
100 changed files with 1085 additions and 0 deletions
  1. 7 0
      test/API/Makefile
  2. 26 0
      test/API/Makefile.in
  3. 8 0
      test/API/aio.SUSv4.syms
  4. 8 0
      test/API/arpa_inet.SUSv4.syms
  5. 66 0
      test/API/complex.SUSv4.syms
  6. 14 0
      test/API/ctype-CX.SUSv4.syms
  7. 2 0
      test/API/ctype-OBXSI.SUSv4.syms
  8. 14 0
      test/API/ctype.SUSv4.syms
  9. 2 0
      test/API/dirent-XSI.SUSv4.syms
  10. 9 0
      test/API/dirent.SUSv4.syms
  11. 4 0
      test/API/dlfcn.SUSv4.syms
  12. 2 0
      test/API/fcntl-ADV.SUSv4.syms
  13. 4 0
      test/API/fcntl.SUSv4.syms
  14. 11 0
      test/API/fenv.SUSv4.syms
  15. 1 0
      test/API/ftw-OB.SUSv4.syms
  16. 1 0
      test/API/ftw.SUSv4.syms
  17. 2 0
      test/API/glob.SUSv4.syms
  18. 1 0
      test/API/grp-XSI.SUSv4.syms
  19. 6 0
      test/API/grp.SUSv4.syms
  20. 119 0
      test/API/html2input.sh
  21. 3 0
      test/API/iconv.SUSv4.syms
  22. 6 0
      test/API/inttypes.SUSv4.syms
  23. 2 0
      test/API/libgen.SUSv4.syms
  24. 4 0
      test/API/locale-CX.SUSv4.syms
  25. 2 0
      test/API/locale.SUSv4.syms
  26. 6 0
      test/API/math-XSI.SUSv4.syms
  27. 171 0
      test/API/math.SUSv4.syms
  28. 2 0
      test/API/monetary.SUSv4.syms
  29. 10 0
      test/API/mqueue.SUSv4.syms
  30. 9 0
      test/API/ndbm.SUSv4.syms
  31. 4 0
      test/API/net_if.SUSv4.syms
  32. 22 0
      test/API/netdb.SUSv4.syms
  33. 3 0
      test/API/nl_types.SUSv4.syms
  34. 2 0
      test/API/pthread-MC1.SUSv4.syms
  35. 2 0
      test/API/pthread-OBXSI.SUSv4.syms
  36. 4 0
      test/API/pthread-RPP|TPP.SUSv4.syms
  37. 1 0
      test/API/pthread-TCT.SUSv4.syms
  38. 9 0
      test/API/pthread-TPS.SUSv4.syms
  39. 2 0
      test/API/pthread-TSATSS.SUSv4.syms
  40. 8 0
      test/API/pthread-TSH.SUSv4.syms
  41. 2 0
      test/API/pthread-TSS.SUSv4.syms
  42. 70 0
      test/API/pthread.SUSv4.syms
  43. 3 0
      test/API/pwd-XSI.SUSv4.syms
  44. 4 0
      test/API/pwd.SUSv4.syms
  45. 4 0
      test/API/regex.SUSv4.syms
  46. 4 0
      test/API/sched-PS.SUSv4.syms
  47. 3 0
      test/API/sched-PS|TPS.SUSv4.syms
  48. 1 0
      test/API/sched.SUSv4.syms
  49. 11 0
      test/API/search.SUSv4.syms
  50. 10 0
      test/API/semaphore.SUSv4.syms
  51. 48 0
      test/API/separate.awk
  52. 1 0
      test/API/setjmp-CX.SUSv4.syms
  53. 1 0
      test/API/setjmp-OBXSI.SUSv4.syms
  54. 1 0
      test/API/setjmp.SUSv4.syms
  55. 18 0
      test/API/signal-CX.SUSv4.syms
  56. 6 0
      test/API/signal-OBXSI.SUSv4.syms
  57. 2 0
      test/API/signal-XSI.SUSv4.syms
  58. 2 0
      test/API/signal.SUSv4.syms
  59. 4 0
      test/API/spawn-PS.SUSv4.syms
  60. 17 0
      test/API/spawn.SUSv4.syms
  61. 20 0
      test/API/stdio-CX.SUSv4.syms
  62. 2 0
      test/API/stdio-OB.SUSv4.syms
  63. 1 0
      test/API/stdio-OBXSI.SUSv4.syms
  64. 44 0
      test/API/stdio.SUSv4.syms
  65. 1 0
      test/API/stdlib-ADV.SUSv4.syms
  66. 4 0
      test/API/stdlib-CX.SUSv4.syms
  67. 1 0
      test/API/stdlib-OBCX.SUSv4.syms
  68. 22 0
      test/API/stdlib-XSI.SUSv4.syms
  69. 37 0
      test/API/stdlib.SUSv4.syms
  70. 11 0
      test/API/string-CX.SUSv4.syms
  71. 1 0
      test/API/string-XSI.SUSv4.syms
  72. 22 0
      test/API/string.SUSv4.syms
  73. 1 0
      test/API/strings-XSI.SUSv4.syms
  74. 4 0
      test/API/strings.SUSv4.syms
  75. 8 0
      test/API/stropts.SUSv4.syms
  76. 1 0
      test/API/sys_mman-ADV.SUSv4.syms
  77. 2 0
      test/API/sys_mman-ML.SUSv4.syms
  78. 2 0
      test/API/sys_mman-MLR.SUSv4.syms
  79. 2 0
      test/API/sys_mman-SHM.SUSv4.syms
  80. 3 0
      test/API/sys_mman-TYM.SUSv4.syms
  81. 1 0
      test/API/sys_mman-XSI|SIO.SUSv4.syms
  82. 3 0
      test/API/sys_mman.SUSv4.syms
  83. 4 0
      test/API/sys_msg.SUSv4.syms
  84. 5 0
      test/API/sys_resource.SUSv4.syms
  85. 6 0
      test/API/sys_select.SUSv4.syms
  86. 3 0
      test/API/sys_sem.SUSv4.syms
  87. 4 0
      test/API/sys_shm.SUSv4.syms
  88. 18 0
      test/API/sys_socket.SUSv4.syms
  89. 2 0
      test/API/sys_stat-XSI.SUSv4.syms
  90. 14 0
      test/API/sys_stat.SUSv4.syms
  91. 2 0
      test/API/sys_statvfs.SUSv4.syms
  92. 3 0
      test/API/sys_time-OB.SUSv4.syms
  93. 2 0
      test/API/sys_time.SUSv4.syms
  94. 2 0
      test/API/sys_uio.SUSv4.syms
  95. 3 0
      test/API/sys_wait.SUSv4.syms
  96. 4 0
      test/API/syslog.SUSv4.syms
  97. 11 0
      test/API/termios.SUSv4.syms
  98. 1 0
      test/API/time-CPT.SUSv4.syms
  99. 15 0
      test/API/time-CX.SUSv4.syms
  100. 2 0
      test/API/time-OB.SUSv4.syms

+ 7 - 0
test/API/Makefile

@@ -0,0 +1,7 @@
+# uClibc API tests
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+
+top_builddir=../../
+include ../Rules.mak
+-include Makefile.in
+include ../Test.mak

+ 26 - 0
test/API/Makefile.in

@@ -0,0 +1,26 @@
+# uClibc API tests
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+
+SHELL_TESTS := shell_tst-API
+run: $(SHELL_TESTS)
+
+define get_codes
+	$(subst .,,$(sort $(suffix $(subst -,.,$(foreach x,$(1),$(if $(findstring -,$(x)),$(x),))))))
+endef
+sym_files = $(patsubst %.syms,%,$(wildcard *.syms))
+stds = $(patsubst .%,%,$(sort $(suffix $(sym_files))))
+tests=$(foreach s,$(stds),$(patsubst %.$(s),%,$(sym_files)))
+codes=$(call get_codes,$(tests))
+
+shell_tst-API: uclibc_out=$(patsubst shell_%,%,$@).out
+shell_tst-API: glibc_out=$(patsubst shell_%,%_glibc,$@).out
+shell_tst-API:
+	@exec echo "DISABLED for now, needs improvement"
+shell_tst-API_DISABLED:
+	$(showtest)
+	$(Q)top_builddir=$(top_builddir) AWK=$(AWK) \
+	uclibc_out=$(uclibc_out) glibc_out=$(glibc_out) \
+	$(SHELL) \
+		$(patsubst shell_%,%.sh,$@) $(stds) "$(tests)"
+	$(do_showdiff) $(glibc_out) $(uclibc_out) ; \
+	exec diff -u "$(glibc_out)" "$(uclibc_out)"

+ 8 - 0
test/API/aio.SUSv4.syms

@@ -0,0 +1,8 @@
+aio_cancel
+aio_error
+aio_fsync
+aio_read
+aio_return
+aio_suspend
+aio_write
+lio_listio

+ 8 - 0
test/API/arpa_inet.SUSv4.syms

@@ -0,0 +1,8 @@
+htonl
+htons
+ntohl
+ntohs
+inet_addr
+inet_ntoa
+inet_ntop
+inet_pton

+ 66 - 0
test/API/complex.SUSv4.syms

@@ -0,0 +1,66 @@
+cabs
+cabsf
+cabsl
+cacos
+cacosf
+cacosh
+cacoshf
+cacoshl
+cacosl
+carg
+cargf
+cargl
+casin
+casinf
+casinh
+casinhf
+casinhl
+casinl
+catan
+catanf
+catanh
+catanhf
+catanhl
+catanl
+ccos
+ccosf
+ccosh
+ccoshf
+ccoshl
+ccosl
+cexp
+cexpf
+cexpl
+cimag
+cimagf
+cimagl
+clog
+clogf
+clogl
+conj
+conjf
+conjl
+cpow
+cpowf
+cpowl
+cproj
+cprojf
+cprojl
+creal
+crealf
+creall
+csin
+csinf
+csinh
+csinhf
+csinhl
+csinl
+csqrt
+csqrtf
+csqrtl
+ctan
+ctanf
+ctanh
+ctanhf
+ctanhl
+ctanl

+ 14 - 0
test/API/ctype-CX.SUSv4.syms

@@ -0,0 +1,14 @@
+isalnum_l
+isalpha_l
+isblank_l
+iscntrl_l
+isdigit_l
+isgraph_l
+islower_l
+isprint_l
+ispunct_l
+isspace_l
+isupper_l
+isxdigit_l
+tolower_l
+toupper_l

+ 2 - 0
test/API/ctype-OBXSI.SUSv4.syms

@@ -0,0 +1,2 @@
+isascii
+toascii

+ 14 - 0
test/API/ctype.SUSv4.syms

@@ -0,0 +1,14 @@
+isalnum
+isalpha
+isblank
+iscntrl
+isdigit
+isgraph
+islower
+isprint
+ispunct
+isspace
+isupper
+isxdigit
+tolower
+toupper

+ 2 - 0
test/API/dirent-XSI.SUSv4.syms

@@ -0,0 +1,2 @@
+seekdir
+telldir

+ 9 - 0
test/API/dirent.SUSv4.syms

@@ -0,0 +1,9 @@
+alphasort
+closedir
+dirfd
+fdopendir
+opendir
+readdir
+readdir_r
+rewinddir
+scandir

+ 4 - 0
test/API/dlfcn.SUSv4.syms

@@ -0,0 +1,4 @@
+dlclose
+dlerror
+dlopen
+dlsym

+ 2 - 0
test/API/fcntl-ADV.SUSv4.syms

@@ -0,0 +1,2 @@
+posix_fadvise
+posix_fallocate

+ 4 - 0
test/API/fcntl.SUSv4.syms

@@ -0,0 +1,4 @@
+creat
+fcntl
+open
+openat

+ 11 - 0
test/API/fenv.SUSv4.syms

@@ -0,0 +1,11 @@
+feclearexcept
+fegetenv
+fegetexceptflag
+fegetround
+feholdexcept
+feraiseexcept
+fesetenv
+fesetexceptflag
+fesetround
+fetestexcept
+feupdateenv

+ 1 - 0
test/API/ftw-OB.SUSv4.syms

@@ -0,0 +1 @@
+ftw

+ 1 - 0
test/API/ftw.SUSv4.syms

@@ -0,0 +1 @@
+nftw

+ 2 - 0
test/API/glob.SUSv4.syms

@@ -0,0 +1,2 @@
+glob
+globfree

+ 1 - 0
test/API/grp-XSI.SUSv4.syms

@@ -0,0 +1 @@
+setgrent

+ 6 - 0
test/API/grp.SUSv4.syms

@@ -0,0 +1,6 @@
+endgrent
+getgrent
+getgrgid
+getgrgid_r
+getgrnam
+getgrnam_r

+ 119 - 0
test/API/html2input.sh

@@ -0,0 +1,119 @@
+#!/bin/sh
+# vi: ft=awk :
+#
+# Script to extract functions and external variables off SUS html docs
+#
+# Copyright (C) 2010 Bernhard Reutner-Fischer
+# Public Domain
+
+# Usage:
+# wget http://www.opengroup.org/onlinepubs/9699919799/download/susv4.tgz
+# tar xzf susv4.tgz
+# SUS=susv4 html2input.sh -vFULL_DECLARATIONS=1
+# or
+# SUS=susv4 html2input.sh -vFULL_DECLARATIONS=0 -vSTDNAME=SUSv4
+# 
+# Bug in time.h.html of SUSv4:
+# It inconsistently reads "as variables" instead of "external variables" that
+# is used everywhere except in time.h.html
+
+test "x$SUS" = "x" && SUS="susv4"
+test "x$AWK" = "x" && AWK="AWK"
+test "x$GREP" = "x" && GREP="GREP"
+for h in \
+  $($GREP -l "shall be declared as functions" $SUS/basedefs/*.h.html) \
+  $($GREP -l "shall declare the following as variables" $SUS/basedefs/*.h.html) \
+  $($GREP -l "shall declare the following external variables" $SUS/basedefs/*.h.html)
+do
+$AWK $* '
+function get_filename () {
+	if (NR == 1) {
+		x=FILENAME
+		sub(".*/", "", x)
+		split(x, f , ".")
+		fname=f[1]
+		if (STDNAME)
+			fname=fname "." STDNAME
+		fname=fname ".in"
+		printf "" > fname
+	}
+}
+function unhtml (l) {
+	sub("<tt>", "", l)
+	sub("</tt>", "", l)
+	sub("<sup>", "", l)
+	sub("</sup>", "", l)
+	sub("<a [^>]*>", "", l)
+	sub("</a>", "", l)
+	if (l ~ /<img[^>]*Option[[:space:]][[:space:]]*Start[^>]*>/) {
+		sub("<img[^>]*>", "[Option Start]", l)
+	} else if (l ~ /<img[^>]*Option[[:space:]][[:space:]]*End[^>]*>/) {
+		sub("<img[^>]*>", "[Option End]", l)
+	}
+	sub("<.*>", "", l)
+	return l
+}
+function get_funcname (l) {
+	if (FULL_DECLARATIONS)
+		return l
+	if (l !~ /;$/)
+		return l
+	cnt = split(l, foo, " ")
+	if (cnt >= 2 && foo[2] ~ /^\(\*/) {
+		cnt = split(l, foo, "(")
+		# good enough for signal() and sigset()
+		if (cnt >= 2)
+			l=foo[2]
+	} else {
+		sub("\\(.*", "", l)
+	}
+	gsub("[[\\]\\*]", "", l)
+	i = split(l, a, " ")
+	if (i)
+		l = a[i]
+	return l
+}
+function get_varname (l) {
+	if (FULL_DECLARATIONS)
+		return l
+	if (l !~ /;$/)
+		return l
+	gsub(",[[:space:]][[:space:]]*", ",", l)
+	sub(";$", "", l)
+	i = split(l, a, " ")
+	if (i)
+		l = a[i]
+	gsub("[[\\]\\*]", "", l)
+	gsub(",", "\n", l)
+	return l
+}
+BEGIN{data=0;l=""}
+get_filename()
+/shall be declared as functions/{data=1;isvar=0;next;}
+/shall declare the following as variables/{data=1;isvar=1;next;}
+/shall declare the following external variables/{data=1;isvar=1;next;}
+/<pre>/{data++;next;}
+/<\/pre>/{data=0;next;}
+/.*/{
+	if (data == 2 && fname) {
+		tmp = $0
+		sub("^[[:space:]][[:space:]]*", " ", tmp)
+		l = l tmp
+		tmp = unhtml(l)
+		if (!tmp)
+			next
+		l = tmp
+		if (tmp !~ /;$/ && tmp !~ />$/ &&
+			tmp !~ /Option Start\]$/ && tmp !~ /Option End\]$/)
+			next
+		if (!isvar)
+			l = get_funcname(l)
+		else
+			l = get_varname(l)
+		if (l)
+			print l >> fname
+		l=""
+	}
+}
+' $h
+done

+ 3 - 0
test/API/iconv.SUSv4.syms

@@ -0,0 +1,3 @@
+iconv
+iconv_close
+iconv_open

+ 6 - 0
test/API/inttypes.SUSv4.syms

@@ -0,0 +1,6 @@
+imaxabs
+imaxdiv
+strtoimax
+strtoumax
+wcstoimax
+wcstoumax

+ 2 - 0
test/API/libgen.SUSv4.syms

@@ -0,0 +1,2 @@
+basename
+dirname

+ 4 - 0
test/API/locale-CX.SUSv4.syms

@@ -0,0 +1,4 @@
+duplocale
+freelocale
+newlocale
+uselocale

+ 2 - 0
test/API/locale.SUSv4.syms

@@ -0,0 +1,2 @@
+localeconv
+setlocale

+ 6 - 0
test/API/math-XSI.SUSv4.syms

@@ -0,0 +1,6 @@
+j0
+j1
+jn
+y0
+y1
+yn

+ 171 - 0
test/API/math.SUSv4.syms

@@ -0,0 +1,171 @@
+acos
+acosf
+acosh
+acoshf
+acoshl
+acosl
+asin
+asinf
+asinh
+asinhf
+asinhl
+asinl
+atan
+atan2
+atan2f
+atan2l
+atanf
+atanh
+atanhf
+atanhl
+atanl
+cbrt
+cbrtf
+cbrtl
+ceil
+ceilf
+ceill
+copysign
+copysignf
+copysignl
+cos
+cosf
+cosh
+coshf
+coshl
+cosl
+erf
+erfc
+erfcf
+erfcl
+erff
+erfl
+exp
+exp2
+exp2f
+exp2l
+expf
+expl
+expm1
+expm1f
+expm1l
+fabs
+fabsf
+fabsl
+fdim
+fdimf
+fdiml
+floor
+floorf
+floorl
+fma
+fmaf
+fmal
+fmax
+fmaxf
+fmaxl
+fmin
+fminf
+fminl
+fmod
+fmodf
+fmodl
+frexp
+frexpf
+frexpl
+hypot
+hypotf
+hypotl
+ilogb
+ilogbf
+ilogbl
+ldexp
+ldexpf
+ldexpl
+lgamma
+lgammaf
+lgammal
+llrint
+llrintf
+llrintl
+llround
+llroundf
+llroundl
+log
+log10
+log10f
+log10l
+log1p
+log1pf
+log1pl
+log2
+log2f
+log2l
+logb
+logbf
+logbl
+logf
+logl
+lrint
+lrintf
+lrintl
+lround
+lroundf
+lroundl
+modf
+modff
+modfl
+nan
+nanf
+nanl
+nearbyint
+nearbyintf
+nearbyintl
+nextafter
+nextafterf
+nextafterl
+nexttoward
+nexttowardf
+nexttowardl
+pow
+powf
+powl
+remainder
+remainderf
+remainderl
+remquo
+remquof
+remquol
+rint
+rintf
+rintl
+round
+roundf
+roundl
+scalbln
+scalblnf
+scalblnl
+scalbn
+scalbnf
+scalbnl
+sin
+sinf
+sinh
+sinhf
+sinhl
+sinl
+sqrt
+sqrtf
+sqrtl
+tan
+tanf
+tanh
+tanhf
+tanhl
+tanl
+tgamma
+tgammaf
+tgammal
+trunc
+truncf
+truncl

+ 2 - 0
test/API/monetary.SUSv4.syms

@@ -0,0 +1,2 @@
+strfmon
+strfmon_l

+ 10 - 0
test/API/mqueue.SUSv4.syms

@@ -0,0 +1,10 @@
+mq_close
+mq_getattr
+mq_notify
+mq_open
+mq_receive
+mq_send
+mq_setattr
+mq_timedreceive
+mq_timedsend
+mq_unlink

+ 9 - 0
test/API/ndbm.SUSv4.syms

@@ -0,0 +1,9 @@
+dbm_clearerr
+dbm_close
+dbm_delete
+dbm_error
+dbm_fetch
+dbm_firstkey
+dbm_nextkey
+dbm_open
+dbm_store

+ 4 - 0
test/API/net_if.SUSv4.syms

@@ -0,0 +1,4 @@
+if_freenameindex
+if_indextoname
+if_nameindex
+if_nametoindex

+ 22 - 0
test/API/netdb.SUSv4.syms

@@ -0,0 +1,22 @@
+endhostent
+endnetent
+endprotoent
+endservent
+freeaddrinfo
+gai_strerror
+getaddrinfo
+gethostent
+getnameinfo
+getnetbyaddr
+getnetbyname
+getnetent
+getprotobyname
+getprotobynumber
+getprotoent
+getservbyname
+getservbyport
+getservent
+sethostent
+setnetent
+setprotoent
+setservent

+ 3 - 0
test/API/nl_types.SUSv4.syms

@@ -0,0 +1,3 @@
+catclose
+catgets
+catopen

+ 2 - 0
test/API/pthread-MC1.SUSv4.syms

@@ -0,0 +1,2 @@
+pthread_mutexattr_getprotocol
+pthread_mutexattr_setprotocol

+ 2 - 0
test/API/pthread-OBXSI.SUSv4.syms

@@ -0,0 +1,2 @@
+pthread_getconcurrency
+pthread_setconcurrency

+ 4 - 0
test/API/pthread-RPP|TPP.SUSv4.syms

@@ -0,0 +1,4 @@
+pthread_mutex_getprioceiling
+pthread_mutex_setprioceiling
+pthread_mutexattr_getprioceiling
+pthread_mutexattr_setprioceiling

+ 1 - 0
test/API/pthread-TCT.SUSv4.syms

@@ -0,0 +1 @@
+pthread_getcpuclockid

+ 9 - 0
test/API/pthread-TPS.SUSv4.syms

@@ -0,0 +1,9 @@
+pthread_attr_getinheritsched
+pthread_attr_getschedpolicy
+pthread_attr_getscope
+pthread_attr_setinheritsched
+pthread_attr_setschedpolicy
+pthread_attr_setscope
+pthread_getschedparam
+pthread_setschedparam
+pthread_setschedprio

+ 2 - 0
test/API/pthread-TSATSS.SUSv4.syms

@@ -0,0 +1,2 @@
+pthread_attr_getstack
+pthread_attr_setstack

+ 8 - 0
test/API/pthread-TSH.SUSv4.syms

@@ -0,0 +1,8 @@
+pthread_barrierattr_getpshared
+pthread_barrierattr_setpshared
+pthread_condattr_getpshared
+pthread_condattr_setpshared
+pthread_mutexattr_getpshared
+pthread_mutexattr_setpshared
+pthread_rwlockattr_getpshared
+pthread_rwlockattr_setpshared

+ 2 - 0
test/API/pthread-TSS.SUSv4.syms

@@ -0,0 +1,2 @@
+pthread_attr_getstacksize
+pthread_attr_setstacksize

+ 70 - 0
test/API/pthread.SUSv4.syms

@@ -0,0 +1,70 @@
+pthread_atfork
+pthread_attr_destroy
+pthread_attr_getdetachstate
+pthread_attr_getguardsize
+pthread_attr_getschedparam
+pthread_attr_init
+pthread_attr_setdetachstate
+pthread_attr_setguardsize
+pthread_attr_setschedparam
+pthread_barrier_destroy
+pthread_barrier_init
+pthread_barrier_wait
+pthread_barrierattr_destroy
+pthread_barrierattr_init
+pthread_cancel
+pthread_cleanup_pop
+pthread_cleanup_push
+pthread_cond_broadcast
+pthread_cond_destroy
+pthread_cond_init
+pthread_cond_signal
+pthread_cond_timedwait
+pthread_cond_wait
+pthread_condattr_destroy
+pthread_condattr_getclock
+pthread_condattr_init
+pthread_condattr_setclock
+pthread_create
+pthread_detach
+pthread_equal
+pthread_exit
+pthread_getspecific
+pthread_join
+pthread_key_create
+pthread_key_delete
+pthread_mutex_consistent
+pthread_mutex_destroy
+pthread_mutex_init
+pthread_mutex_lock
+pthread_mutex_timedlock
+pthread_mutex_trylock
+pthread_mutex_unlock
+pthread_mutexattr_destroy
+pthread_mutexattr_getrobust
+pthread_mutexattr_gettype
+pthread_mutexattr_init
+pthread_mutexattr_setrobust
+pthread_mutexattr_settype
+pthread_once
+pthread_rwlock_destroy
+pthread_rwlock_init
+pthread_rwlock_rdlock
+pthread_rwlock_timedrdlock
+pthread_rwlock_timedwrlock
+pthread_rwlock_tryrdlock
+pthread_rwlock_trywrlock
+pthread_rwlock_unlock
+pthread_rwlock_wrlock
+pthread_rwlockattr_destroy
+pthread_rwlockattr_init
+pthread_self
+pthread_setcancelstate
+pthread_setcanceltype
+pthread_setspecific
+pthread_spin_destroy
+pthread_spin_init
+pthread_spin_lock
+pthread_spin_trylock
+pthread_spin_unlock
+pthread_testcancel

+ 3 - 0
test/API/pwd-XSI.SUSv4.syms

@@ -0,0 +1,3 @@
+endpwent
+getpwent
+setpwent

+ 4 - 0
test/API/pwd.SUSv4.syms

@@ -0,0 +1,4 @@
+getpwnam
+getpwnam_r
+getpwuid
+getpwuid_r

+ 4 - 0
test/API/regex.SUSv4.syms

@@ -0,0 +1,4 @@
+regcomp
+regerror
+regexec
+regfree

+ 4 - 0
test/API/sched-PS.SUSv4.syms

@@ -0,0 +1,4 @@
+sched_getparam
+sched_getscheduler
+sched_setparam
+sched_setscheduler

+ 3 - 0
test/API/sched-PS|TPS.SUSv4.syms

@@ -0,0 +1,3 @@
+sched_get_priority_max
+sched_get_priority_min
+sched_rr_get_interval

+ 1 - 0
test/API/sched.SUSv4.syms

@@ -0,0 +1 @@
+sched_yield

+ 11 - 0
test/API/search.SUSv4.syms

@@ -0,0 +1,11 @@
+hcreate
+hdestroy
+hsearch
+insque
+lfind
+lsearch
+remque
+tdelete
+tfind
+tsearch
+twalk

+ 10 - 0
test/API/semaphore.SUSv4.syms

@@ -0,0 +1,10 @@
+sem_close
+sem_destroy
+sem_getvalue
+sem_init
+sem_open
+sem_post
+sem_timedwait
+sem_trywait
+sem_unlink
+sem_wait

+ 48 - 0
test/API/separate.awk

@@ -0,0 +1,48 @@
+#!/usr/bin/awk -f
+# 
+# Usage: awk -f separate.awk foo.SUSv4.in
+# Input: http://www.opengroup.org/onlinepubs/9699919799/basedefs/unistd.h.html#tag_13_77_03_06
+# Output: foo-$CODE.SUSv4.syms, foo.SUSv4.syms
+#
+# Copyright (C) 2010 Bernhard Reutner-Fischer
+# Public domain
+
+function get_code(line)
+{
+	sub("\\]\\[.*", "", line)
+	sub("\\[", "", line)
+	sub(" ", "", line)
+	return line
+}
+BEGIN{
+	code="";# feature set; XSI, OB XSI, CX, etc
+
+}
+/\[Option Start\]/{
+	code = get_code($0)
+	next
+}
+/\[Option End\]/{ code = ""; next; }
+/.*/ {
+	if (!hdrname) {
+		split(FILENAME, fparts, ".")
+		hdrname = fparts[1]
+		stdname = fparts[2]
+		if (fparts[3] != "in") {
+			print "inputfilename may not be ok, exiting."
+			exit(1)
+		}
+	}
+	if (code) {
+		fname = hdrname "-" code "." stdname ".syms"
+	} else {
+		fname = hdrname "." stdname ".syms"
+	}
+	sub("^*", "", $0)
+	if (file[code]) {
+		print $0 >> fname
+	} else {
+		print $0 > fname
+		file[code] = 1
+	}
+}

+ 1 - 0
test/API/setjmp-CX.SUSv4.syms

@@ -0,0 +1 @@
+siglongjmp

+ 1 - 0
test/API/setjmp-OBXSI.SUSv4.syms

@@ -0,0 +1 @@
+_longjmp

+ 1 - 0
test/API/setjmp.SUSv4.syms

@@ -0,0 +1 @@
+longjmp

+ 18 - 0
test/API/signal-CX.SUSv4.syms

@@ -0,0 +1,18 @@
+kill
+psiginfo
+psignal
+pthread_kill
+pthread_sigmask
+sigaction
+sigaddset
+sigdelset
+sigemptyset
+sigfillset
+sigismember
+sigpending
+sigprocmask
+sigqueue
+sigsuspend
+sigtimedwait
+sigwait
+sigwaitinfo

+ 6 - 0
test/API/signal-OBXSI.SUSv4.syms

@@ -0,0 +1,6 @@
+sighold
+sigignore
+siginterrupt
+sigpause
+sigrelse
+void

+ 2 - 0
test/API/signal-XSI.SUSv4.syms

@@ -0,0 +1,2 @@
+killpg
+sigaltstack

+ 2 - 0
test/API/signal.SUSv4.syms

@@ -0,0 +1,2 @@
+raise
+void

+ 4 - 0
test/API/spawn-PS.SUSv4.syms

@@ -0,0 +1,4 @@
+posix_spawnattr_getschedparam
+posix_spawnattr_getschedpolicy
+posix_spawnattr_setschedparam
+posix_spawnattr_setschedpolicy

+ 17 - 0
test/API/spawn.SUSv4.syms

@@ -0,0 +1,17 @@
+posix_spawn
+posix_spawn_file_actions_addclose
+posix_spawn_file_actions_adddup2
+posix_spawn_file_actions_addopen
+posix_spawn_file_actions_destroy
+posix_spawn_file_actions_init
+posix_spawnattr_destroy
+posix_spawnattr_getflags
+posix_spawnattr_getpgroup
+posix_spawnattr_getsigdefault
+posix_spawnattr_getsigmask
+posix_spawnattr_init
+posix_spawnattr_setflags
+posix_spawnattr_setpgroup
+posix_spawnattr_setsigdefault
+posix_spawnattr_setsigmask
+posix_spawnp

+ 20 - 0
test/API/stdio-CX.SUSv4.syms

@@ -0,0 +1,20 @@
+ctermid
+fdopen
+fileno
+flockfile
+fmemopen
+fseeko
+ftello
+ftrylockfile
+funlockfile
+getc_unlocked
+getchar_unlocked
+getdelim
+getline
+open_memstream
+pclose
+popen
+putc_unlocked
+putchar_unlocked
+renameat
+vdprintf

+ 2 - 0
test/API/stdio-OB.SUSv4.syms

@@ -0,0 +1,2 @@
+gets
+tmpnam

+ 1 - 0
test/API/stdio-OBXSI.SUSv4.syms

@@ -0,0 +1 @@
+tempnam

+ 44 - 0
test/API/stdio.SUSv4.syms

@@ -0,0 +1,44 @@
+clearerr
+fclose
+feof
+ferror
+fflush
+fgetc
+fgetpos
+fgets
+fopen
+fprintf
+fputc
+fputs
+fread
+freopen
+fscanf
+fseek
+fsetpos
+ftell
+fwrite
+getc
+getchar
+perror
+printf
+putc
+putchar
+puts
+remove
+rename
+rewind
+scanf
+setbuf
+setvbuf
+snprintf
+sprintf
+sscanf
+tmpfile
+ungetc
+vfprintf
+vfscanf
+vprintf
+vscanf
+vsnprintf
+vsprintf
+vsscanf

+ 1 - 0
test/API/stdlib-ADV.SUSv4.syms

@@ -0,0 +1 @@
+posix_memalign

+ 4 - 0
test/API/stdlib-CX.SUSv4.syms

@@ -0,0 +1,4 @@
+mkdtemp
+mkstemp
+setenv
+unsetenv

+ 1 - 0
test/API/stdlib-OBCX.SUSv4.syms

@@ -0,0 +1 @@
+rand_r

+ 22 - 0
test/API/stdlib-XSI.SUSv4.syms

@@ -0,0 +1,22 @@
+a64l
+drand48
+erand48
+grantpt
+initstate
+jrand48
+l64a
+lcong48
+lrand48
+mrand48
+nrand48
+posix_openpt
+ptsname
+putenv
+random
+realpath
+seed48
+setkey
+setstate
+srand48
+srandom
+unlockpt

+ 37 - 0
test/API/stdlib.SUSv4.syms

@@ -0,0 +1,37 @@
+_Exit
+abort
+abs
+atexit
+atof
+atoi
+atol
+atoll
+bsearch
+calloc
+div
+exit
+free
+getenv
+getsubopt
+labs
+ldiv
+llabs
+lldiv
+malloc
+mblen
+mbstowcs
+mbtowc
+qsort
+rand
+realloc
+srand
+strtod
+strtof
+strtol
+strtold
+strtoll
+strtoul
+strtoull
+system
+wcstombs
+wctomb

+ 11 - 0
test/API/string-CX.SUSv4.syms

@@ -0,0 +1,11 @@
+stpcpy
+stpncpy
+strcoll_l
+strdup
+strerror_l
+strerror_r
+strndup
+strnlen
+strsignal
+strtok_r
+strxfrm_l

+ 1 - 0
test/API/string-XSI.SUSv4.syms

@@ -0,0 +1 @@
+memccpy

+ 22 - 0
test/API/string.SUSv4.syms

@@ -0,0 +1,22 @@
+memchr
+memcmp
+memcpy
+memmove
+memset
+strcat
+strchr
+strcmp
+strcoll
+strcpy
+strcspn
+strerror
+strlen
+strncat
+strncmp
+strncpy
+strpbrk
+strrchr
+strspn
+strstr
+strtok
+strxfrm

+ 1 - 0
test/API/strings-XSI.SUSv4.syms

@@ -0,0 +1 @@
+ffs

+ 4 - 0
test/API/strings.SUSv4.syms

@@ -0,0 +1,4 @@
+strcasecmp
+strcasecmp_l
+strncasecmp
+strncasecmp_l

+ 8 - 0
test/API/stropts.SUSv4.syms

@@ -0,0 +1,8 @@
+fattach
+fdetach
+getmsg
+getpmsg
+ioctl
+isastream
+putmsg
+putpmsg

+ 1 - 0
test/API/sys_mman-ADV.SUSv4.syms

@@ -0,0 +1 @@
+posix_madvise

+ 2 - 0
test/API/sys_mman-ML.SUSv4.syms

@@ -0,0 +1,2 @@
+mlockall
+munlockall

+ 2 - 0
test/API/sys_mman-MLR.SUSv4.syms

@@ -0,0 +1,2 @@
+mlock
+munlock

+ 2 - 0
test/API/sys_mman-SHM.SUSv4.syms

@@ -0,0 +1,2 @@
+shm_open
+shm_unlink

+ 3 - 0
test/API/sys_mman-TYM.SUSv4.syms

@@ -0,0 +1,3 @@
+posix_mem_offset
+posix_typed_mem_get_info
+posix_typed_mem_open

+ 1 - 0
test/API/sys_mman-XSI|SIO.SUSv4.syms

@@ -0,0 +1 @@
+msync

+ 3 - 0
test/API/sys_mman.SUSv4.syms

@@ -0,0 +1,3 @@
+mmap
+mprotect
+munmap

+ 4 - 0
test/API/sys_msg.SUSv4.syms

@@ -0,0 +1,4 @@
+msgctl
+msgget
+msgrcv
+msgsnd

+ 5 - 0
test/API/sys_resource.SUSv4.syms

@@ -0,0 +1,5 @@
+getpriority
+getrlimit
+getrusage
+setpriority
+setrlimit

+ 6 - 0
test/API/sys_select.SUSv4.syms

@@ -0,0 +1,6 @@
+FD_CLR
+FD_ISSET
+FD_SET
+FD_ZERO
+pselect
+select

+ 3 - 0
test/API/sys_sem.SUSv4.syms

@@ -0,0 +1,3 @@
+semctl
+semget
+semop

+ 4 - 0
test/API/sys_shm.SUSv4.syms

@@ -0,0 +1,4 @@
+shmat
+shmctl
+shmdt
+shmget

+ 18 - 0
test/API/sys_socket.SUSv4.syms

@@ -0,0 +1,18 @@
+accept
+bind
+connect
+getpeername
+getsockname
+getsockopt
+listen
+recv
+recvfrom
+recvmsg
+send
+sendmsg
+sendto
+setsockopt
+shutdown
+sockatmark
+socket
+socketpair

+ 2 - 0
test/API/sys_stat-XSI.SUSv4.syms

@@ -0,0 +1,2 @@
+mknod
+mknodat

+ 14 - 0
test/API/sys_stat.SUSv4.syms

@@ -0,0 +1,14 @@
+chmod
+fchmod
+fchmodat
+fstat
+fstatat
+futimens
+lstat
+mkdir
+mkdirat
+mkfifo
+mkfifoat
+stat
+umask
+utimensat

+ 2 - 0
test/API/sys_statvfs.SUSv4.syms

@@ -0,0 +1,2 @@
+fstatvfs
+statvfs

+ 3 - 0
test/API/sys_time-OB.SUSv4.syms

@@ -0,0 +1,3 @@
+getitimer
+gettimeofday
+setitimer

+ 2 - 0
test/API/sys_time.SUSv4.syms

@@ -0,0 +1,2 @@
+select
+utimes

+ 2 - 0
test/API/sys_uio.SUSv4.syms

@@ -0,0 +1,2 @@
+readv
+writev

+ 3 - 0
test/API/sys_wait.SUSv4.syms

@@ -0,0 +1,3 @@
+wait
+waitid
+waitpid

+ 4 - 0
test/API/syslog.SUSv4.syms

@@ -0,0 +1,4 @@
+closelog
+openlog
+setlogmask
+syslog

+ 11 - 0
test/API/termios.SUSv4.syms

@@ -0,0 +1,11 @@
+cfgetispeed
+cfgetospeed
+cfsetispeed
+cfsetospeed
+tcdrain
+tcflow
+tcflush
+tcgetattr
+tcgetsid
+tcsendbreak
+tcsetattr

+ 1 - 0
test/API/time-CPT.SUSv4.syms

@@ -0,0 +1 @@
+clock_getcpuclockid

+ 15 - 0
test/API/time-CX.SUSv4.syms

@@ -0,0 +1,15 @@
+clock_getres
+clock_gettime
+clock_nanosleep
+clock_settime
+gmtime_r
+localtime_r
+nanosleep
+strftime_l
+timer_create
+timer_delete
+timer_getoverrun
+timer_gettime
+timer_settime
+tzset
+tzname

+ 2 - 0
test/API/time-OB.SUSv4.syms

@@ -0,0 +1,2 @@
+asctime
+ctime

Some files were not shown because too many files changed in this diff