Browse Source

test: remove test suite

The test suite is now a developed in a separate git repository.
See here:
http://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng-test.git

The test suite should be just like every other software compiled
with the cross-toolchain. In the past strange problems where found
when the test suite got build in the toolchain creation step.
Waldemar Brodkorb 3 years ago
parent
commit
99ef2719fb
100 changed files with 2 additions and 6067 deletions
  1. 0 2
      Makefile.help
  2. 0 13
      Makefile.in
  3. 1 1
      Makerules
  4. 1 1
      docs/PORTING
  5. 0 334
      test/.gitignore
  6. 0 91
      test/Makefile
  7. 0 87
      test/README
  8. 0 165
      test/Rules.mak
  9. 0 155
      test/Test.mak
  10. 0 8
      test/argp/Makefile
  11. 0 10
      test/argp/Makefile.in
  12. 0 15
      test/argp/argp-ex1.c
  13. 0 45
      test/argp/argp-ex2.c
  14. 0 153
      test/argp/argp-ex3.c
  15. 0 167
      test/argp/argp-ex4.c
  16. 0 208
      test/argp/argp-test.c
  17. 0 26
      test/argp/bug-argp1.c
  18. 0 117
      test/argp/tst-argp1.c
  19. 0 100
      test/argp/tst-argp2.c
  20. 0 8
      test/args/Makefile
  21. 0 9
      test/args/Makefile.in
  22. 0 40
      test/args/arg_test.c
  23. 0 13
      test/args/arg_test.out.good
  24. 0 13
      test/args/arg_test_glibc.out.good
  25. 0 8
      test/assert/Makefile
  26. 0 5
      test/assert/Makefile.in
  27. 0 47
      test/assert/assert.c
  28. 0 8
      test/build/Makefile
  29. 0 21
      test/build/check_config_options.sh
  30. 0 8
      test/crypt/Makefile
  31. 0 15
      test/crypt/Makefile.in
  32. 0 103
      test/crypt/crypt.c
  33. 0 171
      test/crypt/crypt.input
  34. 0 172
      test/crypt/crypt.out.good
  35. 0 19
      test/crypt/md5c-test.c
  36. 0 62
      test/crypt/sha256c-test.c
  37. 0 63
      test/crypt/sha512c-test.c
  38. 0 8
      test/ctype/Makefile
  39. 0 4
      test/ctype/Makefile.in
  40. 0 250
      test/ctype/ctype.c
  41. 0 8
      test/dlopen/Makefile
  42. 0 84
      test/dlopen/Makefile.in
  43. 0 25
      test/dlopen/dladdr.c
  44. 0 36
      test/dlopen/dlafk.c
  45. 0 43
      test/dlopen/dlstatic.c
  46. 0 41
      test/dlopen/dltest.c
  47. 0 1
      test/dlopen/dltest2.c
  48. 0 29
      test/dlopen/dlundef.c
  49. 0 7
      test/dlopen/libA.c
  50. 0 7
      test/dlopen/libB.c
  51. 0 30
      test/dlopen/libC.c
  52. 0 1
      test/dlopen/libafk-temp.c
  53. 0 1
      test/dlopen/libafk.c
  54. 0 15
      test/dlopen/libstatic.c
  55. 0 11
      test/dlopen/libtest.c
  56. 0 40
      test/dlopen/libtest1.c
  57. 0 38
      test/dlopen/libtest2.c
  58. 0 1
      test/dlopen/libtest3.c
  59. 0 1
      test/dlopen/libundef.c
  60. 0 205
      test/dlopen/nodelete.c
  61. 0 59
      test/dlopen/nodelete1.c
  62. 0 10
      test/dlopen/nodelmod1.c
  63. 0 10
      test/dlopen/nodelmod2.c
  64. 0 8
      test/dlopen/nodelmod3.c
  65. 0 10
      test/dlopen/nodelmod4.c
  66. 0 33
      test/dlopen/test1.c
  67. 0 39
      test/dlopen/test2.c
  68. 0 13
      test/dlopen/test3.c
  69. 0 29
      test/dlopen/testscope.c
  70. 0 37
      test/dlopen/tst-origin.c
  71. 0 8
      test/inet/Makefile
  72. 0 17
      test/inet/Makefile.in
  73. 0 53
      test/inet/bug-if1.c
  74. 0 40
      test/inet/gethost.c
  75. 0 50
      test/inet/gethost_r-align.c
  76. 0 6
      test/inet/gethostid.c
  77. 0 17
      test/inet/getnetent.c
  78. 0 61
      test/inet/if_nameindex.c
  79. 0 80
      test/inet/tst-aton.c
  80. 0 46
      test/inet/tst-ether_aton.c
  81. 0 55
      test/inet/tst-ethers-line.c
  82. 0 37
      test/inet/tst-ethers.c
  83. 0 99
      test/inet/tst-ifaddrs.c
  84. 0 104
      test/inet/tst-network.c
  85. 0 36
      test/inet/tst-ntoa.c
  86. 0 44
      test/inet/tst-res.c
  87. 0 53
      test/inet/tst-sock-nonblock.c
  88. 0 8
      test/librt/Makefile
  89. 0 8
      test/librt/Makefile.in
  90. 0 104
      test/librt/shmtest.c
  91. 0 8
      test/locale-mbwc/Makefile
  92. 0 30
      test/locale-mbwc/Makefile.in
  93. 0 37
      test/locale-mbwc/dat_isw-funcs.h
  94. 0 196
      test/locale-mbwc/dat_iswalnum.c
  95. 0 169
      test/locale-mbwc/dat_iswalpha.c
  96. 0 125
      test/locale-mbwc/dat_iswcntrl.c
  97. 0 667
      test/locale-mbwc/dat_iswctype.c
  98. 0 125
      test/locale-mbwc/dat_iswdigit.c
  99. 0 167
      test/locale-mbwc/dat_iswgraph.c
  100. 0 0
      test/locale-mbwc/dat_iswlower.c

+ 0 - 2
Makefile.help

@@ -46,8 +46,6 @@ help:
 	@echo '  install_hostutils	- install host utilities'
 	@echo
 	@echo 'Development:'
-	@echo '  check			- run testsuite'
-	@echo '  test_compile		- compile testsuite binaries'
 	@echo '  release		- create a distribution tarball'
 	@echo
 	@echo 'Environment variables:'

+ 0 - 13
Makefile.in

@@ -539,7 +539,6 @@ include_clean:
 clean: include_clean
 	$(Q)$(RM) -r $(top_builddir)lib
 	@$(MAKE) -C utils CLEAN_utils
-	+$(MAKE) -s -C test clean
 	$(Q)$(RM) $(top_builddir)extra/scripts/unifdef
 	$(Q)$(RM) -r $(LOCAL_INSTALL_PATH)
 
@@ -556,15 +555,3 @@ dist release:
 	cat ../uClibc-$(VERSION).tar | bzip2 -c9 > ../uClibc-$(VERSION).tar.bz2
 	cat ../uClibc-$(VERSION).tar | xz -e -c8 > ../uClibc-$(VERSION).tar.xz
 	du -b ../uClibc-$(VERSION).tar.{bz2,xz}
-
-test check: test_compile
-	$(Q)$(MAKE) -C test \
-		$(if $(O),top_builddir=$(O)/)
-
-test_compile: $(LOCAL_INSTALL_PATH)
-	$(Q)$(MAKE) -C test compile \
-		$(if $(O),top_builddir=$(O)/)
-
-test_gen: $(LOCAL_INSTALL_PATH)
-	$(Q)$(MAKE) -C test gen \
-		$(if $(O),top_builddir=$(O)/)

+ 1 - 1
Makerules

@@ -7,7 +7,7 @@
 PHONY := FORCE
 
 .PHONY: dummy $(PHONY) subdirs \
-	all check test $(clean_targets) \
+	all $(clean_targets) \
 	config dist menuconfig oldconfig release \
 	utils help
 

+ 1 - 1
docs/PORTING

@@ -45,7 +45,7 @@ you are hacking on.
   version) if you wish to properly support shared libraries.
 
 - at this point, you should have enough to generate a working HELLO WORLD
-  static binary (see test/silly/*.c files)
+  static binary
 
 - if you want UCLIBC_CTOR_DTOR support, you will need to create crti.S and
   crtn.S files which define function prologues/epilogues.

+ 0 - 334
test/.gitignore

@@ -1,334 +0,0 @@
-#
-# Never ignore these
-#
-!.gitignore
-#
-# Generated files
-#
-*.out
-#
-# Executable test
-#
-*_glibc
-argp/argp-ex[1-4]
-argp/argp-test
-argp/bug-argp1
-argp/tst-argp[12]
-args/arg_test
-assert/assert
-crypt/crypt
-crypt/md5c-test
-crypt/sha256c-test
-crypt/sha512c-test
-ctype/ctype
-dlopen/dladdr
-dlopen/dlafk
-dlopen/dlstatic
-dlopen/dltest
-dlopen/dltest2
-dlopen/dlundef
-dlopen/libafk.so
-dlopen/libafk-temp.so
-dlopen/libA.so
-dlopen/libB.so
-dlopen/libC.so
-dlopen/libstatic.so
-dlopen/libtest[123].so
-dlopen/libtest.so
-dlopen/libundef.so
-dlopen/test[1-3]
-dlopen/testscope
-inet/bug-if1
-inet/gethost_r-align
-inet/gethostid
-inet/getnetent
-inet/if_nameindex
-inet/tst-aton
-inet/tst-ether_aton
-inet/tst-ethers
-inet/tst-ethers-line
-inet/tst-network
-inet/tst-ntoa
-inet/tst-res
-inet/tst-sock-nonblock
-librt/shmtest
-locale/bug-iconv-trans
-locale/bug-usesetlocale
-locale/C
-locale/collate-test
-locale/dump-ctype
-locale/gen-unicode-ctype
-locale/show-ucs-data
-locale/tst-digits
-locale/tst-langinfo
-locale/tst-mbswcs[1-6]
-locale/tst_nl_langinfo
-locale/tst-numeric
-locale/tst-setlocale
-locale/tst-sscanf
-locale/tst-trans
-locale/tst-wctype
-locale/tst-xlocale1
-locale/tst-xlocale2
-locale/xfrm-test
-locale-mbwc/tst_iswalnum
-locale-mbwc/tst_iswalpha
-locale-mbwc/tst_iswcntrl
-locale-mbwc/tst_iswctype
-locale-mbwc/tst_iswdigit
-locale-mbwc/tst_iswgraph
-locale-mbwc/tst_iswlower
-locale-mbwc/tst_iswprint
-locale-mbwc/tst_iswpunct
-locale-mbwc/tst_iswspace
-locale-mbwc/tst_iswupper
-locale-mbwc/tst_iswxdigit
-locale-mbwc/tst_mblen
-locale-mbwc/tst_mbrlen
-locale-mbwc/tst_mbrtowc
-locale-mbwc/tst_mbsrtowcs
-locale-mbwc/tst_mbstowcs
-locale-mbwc/tst_mbtowc
-locale-mbwc/tst_strcoll
-locale-mbwc/tst_strxfrm
-locale-mbwc/tst_swscanf
-locale-mbwc/tst_towctrans
-locale-mbwc/tst_towlower
-locale-mbwc/tst_towupper
-locale-mbwc/tst_wcrtomb
-locale-mbwc/tst_wcscat
-locale-mbwc/tst_wcschr
-locale-mbwc/tst_wcscmp
-locale-mbwc/tst_wcscoll
-locale-mbwc/tst_wcscpy
-locale-mbwc/tst_wcscspn
-locale-mbwc/tst_wcslen
-locale-mbwc/tst_wcsncat
-locale-mbwc/tst_wcsncmp
-locale-mbwc/tst_wcsncpy
-locale-mbwc/tst_wcspbrk
-locale-mbwc/tst_wcsrtombs
-locale-mbwc/tst_wcsspn
-locale-mbwc/tst_wcsstr
-locale-mbwc/tst_wcstod
-locale-mbwc/tst_wcstok
-locale-mbwc/tst_wcstombs
-locale-mbwc/tst_wcswidth
-locale-mbwc/tst_wcsxfrm
-locale-mbwc/tst_wctob
-locale-mbwc/tst_wctomb
-locale-mbwc/tst_wctrans
-locale-mbwc/tst_wctype
-locale-mbwc/tst_wcwidth
-locale-mbwc/tst2_mbrtowc
-malloc/malloc
-malloc/mallocbug
-malloc/malloc-standard-alignment
-malloc/realloc0
-malloc/realloc-can-shrink
-malloc/testmalloc
-malloc/tst-[cmv]alloc
-malloc/tst-mallocfork
-malloc/tst-mcheck
-malloc/tst-obstack
-math/basic-test
-math/compile_test
-math/c99_test
-math/ilogb
-math/libm-test-ulps.h
-math/libm-test.c
-math/rint
-math/signgam
-math/test-double
-math/test-ildoubl
-math/test-ldouble
-math/test-float
-math/test-fpucw
-math/test-idouble
-math/test-ifloat
-math/tst-definitions
-misc/bug-glob2
-misc/bug-readdir1
-misc/dirent
-misc/dirent64
-misc/fdopen
-misc/opendir-tst1
-misc/popen
-misc/seek
-misc/sem
-misc/stdarg
-misc/tst-inotify
-misc/tst-scandir
-misc/tst-seekdir
-misc/tst-statfs
-misc/tst-statvfs
-misc/tst-utmp
-misc/tst-utmpx
-mmap/mmap
-mmap/mmap2
-mmap/mmap64
-nptl/tst-align
-nptl/tst-align2
-nptl/tst-align3
-nptl/tst-atfork1
-nptl/tst-attr[1-3]
-nptl/tst-barrier[1-4]
-nptl/tst-basic[1-7]
-nptl/tst-cancel[1-9]
-nptl/tst-cancelx[2-4]
-nptl/tst-cancelx[6-9]
-nptl/tst-cancelx1[0-8]
-nptl/tst-cancelx2[0-1]
-nptl/tst-cancel[1-3][0-9]
-nptl/tst-cleanup[0-4]
-nptl/tst-cleanupx[0-4]
-nptl/tst-clock
-nptl/tst-clock[12]
-nptl/tst-clock_nanosleep
-nptl/tst-cond[1-9]
-nptl/tst-cond[1-2][0-9]
-nptl/tst-cpuclock[12]
-nptl/tst-cputimer[1-3]
-nptl/tst-detach1
-nptl/tst-dlsym1
-nptl/tst-eintr[1-5]
-nptl/tst-exec[2-4]
-nptl/tst-exit[1-3]
-nptl/tst-fini1
-nptl/tst-fini1mod.so
-nptl/tst-flock[1-2]
-nptl/tst-fork[1-4]
-nptl/tst-getpid[1-3]
-nptl/tst-initializers1
-nptl/tst-initializers1-c[89]9
-nptl/tst-initializers1-gnu[89]9
-nptl/tst-join[1-6]
-nptl/tst-key[1-4]
-nptl/tst-kill[1-6]
-nptl/tst-mqueue[1-9]
-nptl/tst-mutex[1-9]
-nptl/tst-mutex[57]a
-nptl/tst-once[1-4]
-nptl/tst-oncex[3-4]
-nptl/tst-popen1
-nptl/tst-oddstacklimit
-nptl/tst-raise1
-nptl/tst-rwlock[1-9]
-nptl/tst-rwlock1[0-4]
-nptl/tst-rwlock2a
-nptl/tst-sched1
-nptl/tst-sem[1-9]
-nptl/tst-sem1[0-2]
-nptl/tst-signal[1-7]
-nptl/tst-spin[1-3]
-nptl/tst-stack[12]
-nptl/tst-stdio[12]
-nptl/tst-sysconf
-nptl/tst-timer[2-5]
-nptl/tst-tls[1-5]
-nptl/tst-tls4mod.so
-nptl/tst-tls?mod[a-f].so
-nptl/tst-tls4modb.so
-nptl/tst-tls[35]mod.so
-nptl/tst-tls6.sh
-nptl/tst-tsd[1-6]
-nptl/tst-typesizes
-nptl/tst-umask1
-nptl/tst-unload
-nptl/tst-vfork[12]x
-pthread/cancellation-points
-pthread/ex[1-7]
-pthread/tst-too-many-cleanups
-pwd_grp/getgroups
-pwd_grp/grcat
-pwd_grp/pwcat
-pwd_grp/test_grp
-pwd_grp/test_pwd
-regex/testregex
-regex/tst-regex2
-regex/tst-regexloc
-rpc/getrpcent
-rpc/getrpcent_r
-setjmp/bug269-setjmp
-setjmp/jmpbug
-setjmp/sigjmpbug
-setjmp/tst-setjmp
-setjmp/tst-vfork-longjmp
-signal/sigchld
-signal/signal
-signal/tst-raise
-signal/tst-signal
-signal/tst-signalfd
-signal/tst-sigset
-signal/tst-sigsimple
-silly/hello
-silly/tiny
-silly/tst-atomic
-silly/tst-atomic-long
-stat/memcmp-stat
-stat/stat
-stat/stat64
-stat/stat-loop256
-stdio/64bit
-stdio/fclose-loop
-stdlib/ptytest
-stdlib/qsort
-stdlib/testarc4random
-stdlib/testatexit
-stdlib/test-canon
-stdlib/test-canon2
-stdlib/test-mkostemp-O_CLOEXEC
-stdlib/test-mkostemp-child
-stdlib/teston_exit
-stdlib/teststrtol
-stdlib/teststrtoq
-string/bug-strcoll1
-string/bug-strncat1
-string/bug-strpbrk1
-string/bug-strspn1
-string/stratcliff
-string/testcopy
-string/tester
-string/test-ffs
-string/tst-bswap
-string/tst-inlcall
-string/tst-strlen
-string/tst-strtok
-string/tst-strxfrm
-termios/termios
-time/clocktest
-time/test_time
-time/tst-ctime
-time/tst-ftime_l
-time/tst-futimens1
-time/tst-mktime
-time/tst-mktime3
-time/tst-strptime2
-time/tst-timerfd
-time/tst_wcsftime
-tls/tst-tls[1-9]
-tls/tst-tls1[0-8]
-tls/tst-tls-at-ctor
-tls/tst-tlsmod[1-9].so
-tls/tst-tlsmod1[0-9].so
-tls/tst-tlsmod1[0-9][ab].so
-tls/tst-tlsmod1[78]a[0-9].so
-tls/tst-tlsmod1[78]a1[0-9].so
-tls/tst-tlsmod-at-ctor.so
-unistd/clone
-unistd/errno
-unistd/exec-null
-unistd/fork
-unistd/getconf
-unistd/getconf.c
-unistd/getcwd
-unistd/getopt
-unistd/getopt_long
-unistd/tstgetopt
-unistd/tst-fallocate
-unistd/tst-fallocate64
-unistd/tst-posix_fallocate
-unistd/tst-posix_fallocate64
-unistd/tst-preadwrite
-unistd/tst-preadwrite64
-unistd/vfork

+ 0 - 91
test/Makefile

@@ -1,91 +0,0 @@
-# Makefile for uClibc
-#
-# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
-#
-# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-#
-
-top_srcdir=../
-top_builddir=../
-include Rules.mak
-
-ALL_SUBDIRS := $(patsubst %/Makefile,%,$(wildcard */Makefile))
-
-DIRS := $(ALL_SUBDIRS)
-ifneq ($(HAVE_SHARED)$(UCLIBC_HAS_THREADS),yy)
-	DIRS := $(filter-out dlopen,$(DIRS))
-endif
-ifneq ($(findstring -static,$(LDFLAGS)),)
-	DIRS := $(filter-out dlopen,$(DIRS))
-endif
-ifneq ($(UCLIBC_HAS_THREADS)$(ARCH_USE_MMU),yy)
-	DIRS := $(filter-out pthread,$(DIRS))
-endif
-ifneq ($(UCLIBC_HAS_FLOATS),y)
-	DIRS := $(filter-out math,$(DIRS))
-endif
-ifneq ($(UCLIBC_HAS_FULL_RPC),y)
-	DIRS := $(filter-out rpc,$(DIRS))
-endif
-ifneq ($(UCLIBC_HAS_REGEX),y)
-	DIRS := $(filter-out regex,$(DIRS))
-endif
-ifneq ($(HAVE_SHARED)$(UCLIBC_HAS_THREADS_NATIVE),yy)
-	DIRS := $(filter-out tls nptl,$(DIRS))
-endif
-ifneq ($(UCLIBC_HAS_WCHAR),y)
-	DIRS := $(filter-out locale-mbwc,$(DIRS))
-endif
-ifneq ($(UCLIBC_HAS_LOCALE),y)
-	DIRS := $(filter-out locale,$(DIRS))
-endif
-ifneq ($(UCLIBC_HAS_CRYPT_IMPL),y)
-	DIRS := $(filter-out crypt,$(DIRS))
-endif
-ifeq ($(HAS_NO_THREADS),y)
-	DIRS := $(filter-out pthread,$(DIRS))
-endif
-ifneq ($(UCLIBC_HAS_ARGP),y)
-	DIRS := $(filter-out argp,$(DIRS))
-endif
-
-test check all: run
-
-run: subdirs_run
-
-gen:
-	-rm -f $(top_builddir)/test/uclibcng-testrunner.in
-	$(MAKE) run UCLIBCNG_GENERATE_TESTRUNNER=1
-
-compile: $(top_builddir)$(LOCAL_INSTALL_PATH) subdirs_compile
-
-$(top_builddir)$(LOCAL_INSTALL_PATH):
-	$(Q)$(MAKE) -C $(top_builddir) $(LOCAL_INSTALL_PATH)
-
-tags:
-	ctags -R
-
-clean: subdirs_clean
-
-subdirs: $(patsubst %, _dir_%, $(DIRS))
-subdirs_compile: $(patsubst %, _dircompile_%, $(DIRS))
-subdirs_run: $(patsubst %, _dirrun_%, $(DIRS))
-subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))
-
-$(patsubst %, _dir_%, $(DIRS)) : dummy
-	$(Q)$(MAKE) -C $(patsubst _dir_%, %, $@) \
-		KCONFIG_CONFIG=$(KCONFIG_CONFIG)
-
-$(patsubst %, _dirrun_%, $(DIRS)) : dummy
-	$(Q)$(MAKE) -C $(patsubst _dirrun_%, %, $@) run \
-		UCLIBCNG_TEST_SUBDIR=$(strip $(patsubst _dirrun_%, %, $@)) \
-		KCONFIG_CONFIG=$(KCONFIG_CONFIG)
-
-$(patsubst %, _dircompile_%, $(DIRS)) : dummy
-	$(Q)$(MAKE) -C $(patsubst _dircompile_%, %, $@) compile \
-		KCONFIG_CONFIG=$(KCONFIG_CONFIG)
-
-$(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
-	$(Q)$(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
-
-.PHONY: all check clean dummy subdirs_compile subdirs_run subdirs subdirs_clean test run compile

+ 0 - 87
test/README

@@ -1,87 +0,0 @@
------------
- For: User
------------
-Following make targets are avaialable
-
-make compile
-
-This will compile and link the tests.
-
-make run
-
-This will execute all the tests.
-
-make check
-make all
-
-This will build and run tests.
-
-The following make variables may help you in testing:
-
- - UCLIBC_ONLY  - only run tests against uClibc
- - GLIBC_ONLY   - only run tests against glibc
- - V / VERBOSE  - run tests with a lot of output
- - TEST_INSTALLED_UCLIBC - Test installed libraries
-                           under /lib and /usr/lib.
- - TIMEOUTFACTOR=nn - increase test timeout nn times.
-                  At least REGEX_OLD + regex/tst-regex2 needs it increased.
-
-So, to just run the uClibc tests, try this:
-make check UCLIBC_ONLY=1
-
-You can pass the following 2 environment variables to "make run":
- - make run SIMULATOR_uclibc=qemu-sh4 SIMULATOR_glibc=qemu-x86_64
-
-If you need to test just a subset of all test, delete subdirectories
-you do not need.
-
-As of 2009-07, build machinery does not track dependencies on uclibc.
-If you edit a header and re-run "make compile", it does not re-install it
-into ../install_dir. If you delete ../install_dir, "make compile"
-rebuilds uclibc as needed and re-installs ../install_dir,
-but still does not rebuild testcases.
-(You can work around it by "touch */*.c" for now).
-
-----------------
- For: Developer
-----------------
-
-The structure of this test system is:
- test/                    toplevel dir containing common test code
- test/Rules.mak           Common build code
- test/Test.mak            Runtime test make code
- test/subdir/             code specific to a subsystem is stored in a subdir
- test/subdir/Makefile.in  describe the tests to run
- test/subdir/Makefile     test entry point, includes needed upper-level
-                          makefiles plus Makefile.in
- test/subdir/*.c          the tests
-
-Each subdir has a Makefile (same for any subdir) that must include in strict order:
-  - the upper-level Rules.mak file
-  - the Makefile.in
-  - the upper-level Test.mak file
-Makefile.in may be used to define the TESTS and TESTS_DISABLED variables.
-If you do not, TESTS is built automatically based upon all the .c files in the subdir.
-TESTS := foo
-TESTS_DISABLED := bar
-Each test must use a similar .c name; so the "foo" test needs a "foo.c".
-
-Additionally, the following options further control specific test behavior:
-CFLAGS_foo    := extra cflags to use to compile test
-DODIFF_foo    := compare the output of the glibc and uClibc tests (see below)
-LDFLAGS_foo   := extra ldflags to use to link test
-OPTS_foo      := extra options to pass to test
-RET_foo       := expected exit code of test; default is 0
-WRAPPER_foo   := execute stuff just before test
-
-Or to control all tests in a subdir:
-EXTRA_CLEAN   := extra files to remove in the clean target
-EXTRA_DIRS    := extra directories to remove in the clean target
-EXTRA_CFLAGS  := -DFOO
-EXTRA_LDFLAGS := -lpthread
-OPTS          :=
-WRAPPER       :=
-
-If you want to compare the output of a test with known good output, then just
-create a local file named "foo.out.good" and the output generated by the test
-"foo" will be automatically stored in "foo.out" and compared to "foo.out.good".

+ 0 - 165
test/Rules.mak

@@ -1,165 +0,0 @@
-# Rules.mak for uClibc test subdirs
-#
-# Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
-#
-# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-#
-
-.SUFFIXES:
-
-top_builddir ?= ../
-abs_top_builddir ?= $(shell cd $(top_builddir); pwd)/
-
-TESTDIR=$(top_builddir)test/
-
-include $(top_srcdir)Rules.mak
-ifeq ($(filter $(clean_targets) CLEAN_%,$(MAKECMDGOALS)),)
-ifeq ($(HAVE_DOT_CONFIG),)
-$(error no HAVE_DOT_CONFIG, failed to read .config)
-endif
-endif
-
-ifdef UCLIBC_LDSO
-ifeq (,$(findstring /,$(UCLIBC_LDSO)))
-UCLIBC_LDSO := $(UCLIBC_LDSO)
-else
-UCLIBC_LDSO := $(notdir $(UCLIBC_LDSO))
-endif
-else
-UCLIBC_LDSO := $(notdir $(firstword $(wildcard $(top_builddir)lib/ld*)))
-endif
-ifndef TEST_INSTALLED_UCLIBC
-ifeq ($(LDSO_SAFE_RUNPATH),y)
-UCLIBC_PATH := $(abs_top_builddir)lib
-else
-UCLIBC_PATH := $(top_builddir)lib
-endif
-else
-UCLIBC_PATH := $(RUNTIME_PREFIX)$(MULTILIB_DIR)
-endif
-#--------------------------------------------------------
-# Ensure consistent sort order, 'gcc -print-search-dirs' behavior, etc.
-LC_ALL:= C
-export LC_ALL
-
-ifeq ($(strip $(TARGET_ARCH)),)
-TARGET_ARCH:=$(shell $(CC) -dumpmachine | sed -e s'/-.*//' \
-	-e 's/i.86/i386/' \
-	-e 's/sun.*/sparc/' -e 's/sparc.*/sparc/' \
-	-e 's/sa110/arm/' -e 's/arm.*/arm/g' \
-	-e 's/m68k.*/m68k/' \
-	-e 's/parisc.*/hppa/' \
-	-e 's/ppc/powerpc/g' \
-	-e 's/sh[234]/sh/' \
-	-e 's/mips.*/mips/' \
-	-e 's/cris.*/cris/' \
-	-e 's/xtensa.*/xtensa/' \
-	)
-endif
-export TARGET_ARCH
-
-RM_R = $(Q)$(RM) -r
-LN_S = $(Q)$(LN) -fs
-
-ifneq ($(KERNEL_HEADERS),)
-ifeq ($(patsubst /%,/,$(KERNEL_HEADERS)),/)
-# Absolute path in KERNEL_HEADERS
-KERNEL_INCLUDES += -I$(KERNEL_HEADERS)
-else
-# Relative path in KERNEL_HEADERS
-KERNEL_INCLUDES += -I$(top_builddir)$(KERNEL_HEADERS)
-endif
-endif
-
-XCOMMON_CFLAGS := -I$(top_builddir)test -D_GNU_SOURCE
-XWARNINGS      += $(CFLAG_-Wstrict-prototypes)
-CFLAGS         := -nostdinc -I$(top_builddir)$(LOCAL_INSTALL_PATH)/usr/include
-CFLAGS         += $(XCOMMON_CFLAGS) $(KERNEL_INCLUDES) $(CC_INC)
-CFLAGS         += $(OPTIMIZATION) $(CPU_CFLAGS) $(XWARNINGS)
-
-$(eval $(call check-gcc-var,-Wno-missing-field-initializers))
-CFLAGS         += $(CFLAG_-Wno-missing-field-initializers)
-
-# Can't add $(OPTIMIZATION) here, it may be target-specific.
-# Just adding -Os for now.
-HOST_CFLAGS    += $(XCOMMON_CFLAGS) -Os $(XWARNINGS) -std=gnu99
-
-LDFLAGS        := $(CPU_LDFLAGS-y) -Wl,-z,now
-ifeq ($(DODEBUG),y)
-	CFLAGS        += -g
-	HOST_CFLAGS   += -g
-	LDFLAGS       += -Wl,-g
-	HOST_LDFLAGS  += -Wl,-g
-endif
-
-ifeq ($(DOSTRIP),y)
-	LDFLAGS       += -Wl,-s
-	HOST_LDFLAGS  += -Wl,-s
-endif
-
-ifneq ($(HAVE_SHARED),y)
-	LDFLAGS       += -Wl,-static -static-libgcc
-endif
-
-ifndef TEST_INSTALLED_UCLIBC
-LDFLAGS += -B$(UCLIBC_PATH) -Wl,-rpath,$(UCLIBC_PATH):$(shell pwd) -Wl,-rpath-link,$(UCLIBC_PATH):$(shell pwd)
-else
-LDFLAGS += -Wl,-rpath,$(shell pwd)
-endif
-
-ifeq ($(findstring -static,$(LDFLAGS)),)
-LDFLAGS += -Wl,--dynamic-linker,$(UCLIBC_PATH)/$(UCLIBC_LDSO)
-endif
-
-ifeq ($(LDSO_GNU_HASH_SUPPORT),y)
-# Check for binutils support is done on root Rules.mak
-LDFLAGS += $(CFLAG_-Wl--hash-style=gnu)
-endif
-
-ifneq ($(strip $(UCLIBC_EXTRA_CFLAGS)),"")
-CFLAGS += $(call qstrip,$(UCLIBC_EXTRA_CFLAGS))
-endif
-ifneq ($(strip $(UCLIBC_EXTRA_LDFLAGS)),"")
-LDFLAGS += $(call qstrip,$(UCLIBC_EXTRA_LDFLAGS))
-endif
-
-ifneq ($(findstring -s,$(MAKEFLAGS)),)
-DISP := sil
-Q    := @
-SCAT := -@true
-else
-ifneq ($(V)$(VERBOSE),)
-DISP := ver
-Q    :=
-SCAT := cat
-else
-DISP := pur
-Q    := @
-SCAT := -@true
-endif
-endif
-ifneq ($(Q),)
-MAKEFLAGS += --no-print-directory
-endif
-
-banner := ---------------------------------
-pur_showclean = echo "  "CLEAN $(notdir $(CURDIR))
-pur_showdiff  = echo "  "TEST_DIFF $(notdir $(CURDIR))/
-pur_showlink  = echo "  "TEST_LINK $(notdir $(CURDIR))/ $@
-pur_showtest  = echo "  "TEST_EXEC $(notdir $(CURDIR))/ $(@:.exe=)
-sil_showclean =
-sil_showdiff  = true
-sil_showlink  = true
-sil_showtest  = true
-ver_showclean =
-ver_showdiff  = true echo
-ver_showlink  = true echo
-ver_showtest  = printf "\n$(banner)\nTEST $(notdir $(CURDIR))/ $(@:.exe=)\n$(banner)\n"
-do_showclean  = $($(DISP)_showclean)
-do_showdiff   = $($(DISP)_showdiff)
-do_showlink   = $($(DISP)_showlink)
-do_showtest   = $($(DISP)_showtest)
-showclean = @$(do_showclean)
-showdiff  = @$(do_showdiff)
-showlink  = @$(do_showlink)
-showtest  = @$(do_showtest)

+ 0 - 155
test/Test.mak

@@ -1,155 +0,0 @@
-# Common makefile rules for tests
-#
-# Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
-#
-# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
-shellescape='$(subst ','\'',$(1))'
-
-ifeq ($(TESTS),)
-TESTS := $(patsubst %.c,%,$(wildcard *.c))
-endif
-ifneq ($(TESTS_DISABLED),)
-TESTS := $(filter-out $(TESTS_DISABLED),$(TESTS))
-endif
-ifeq ($(SHELL_TESTS),)
-SHELL_TESTS := $(patsubst %.sh,shell_%,$(wildcard *.sh))
-endif
-
-ifneq ($(filter-out test,$(strip $(TESTS))),$(strip $(TESTS)))
-$(error Sanity check: cannot have a test named "test.c")
-endif
-
-U_TARGETS := $(TESTS)
-G_TARGETS := $(addsuffix _glibc,$(U_TARGETS))
-
-ifneq ($(GLIBC_TESTS_DISABLED),)
-G_TARGETS := $(filter-out $(GLIBC_TESTS_DISABLED),$(G_TARGETS))
-endif
-
-ifeq ($(GLIBC_ONLY),)
-TARGETS   += $(U_TARGETS)
-endif
-ifeq ($(UCLIBC_ONLY),)
-TARGETS   += $(G_TARGETS)
-endif
-
-CLEAN_TARGETS := $(U_TARGETS) $(G_TARGETS)
-CLEAN_TARGETS += $(TESTS_DISABLED) $(addsuffix _glibc,$(TESTS_DISABLED)) $(GLIBC_TESTS_DISABLED)
-COMPILE_TARGETS :=  $(TARGETS)
-# We sort the targets so uClibc and host-libc tests are run adjacent
-RUN_TARGETS := $(sort $(addsuffix .exe,$(TARGETS)))
-COMPILE_TARGETS :=  $(sort $(COMPILE_TARGETS))
-# provide build rules even for disabled tests:
-U_TARGETS += $(TESTS_DISABLED)
-G_TARGETS += $(addsuffix _glibc,$(TESTS_DISABLED)) $(GLIBC_TESTS_DISABLED)
-TARGETS += $(SHELL_TESTS)
-CFLAGS += $(CFLAGS_$(notdir $(CURDIR)))
-ifeq (1,$(UCLIBCNG_GENERATE_TESTRUNNER))
-UCLIBCNG_TEST_SUBDIR ?= $(patsubst $(realpath $(TESTDIR))/%,%,$(CURDIR))
-endif
-
-define binary_name
-$(patsubst %.exe,%,$@)
-endef
-define tst_src_name
-$(patsubst %_glibc,%,$(binary_name))
-endef
-
-define diff_test
-	$(Q)\
-	for x in "$(binary_name).out" "$(tst_src_name).out" ; do \
-		test -e "$$x.good" && $(do_showdiff) "$(binary_name).out" "$$x.good" && exec diff -u "$(binary_name).out" "$$x.good" ; \
-	done ; \
-	true
-endef
-define uclibc_glibc_diff_test
-	$(Q)\
-	test -z "$(DODIFF_$(tst_src_name))" && exec true ; \
-	uclibc_out="$(binary_name).out" ; \
-	glibc_out="$(tst_src_name).out" ; \
-	$(do_showdiff) $$uclibc_out $$glibc_out ; \
-	exec diff -u "$$uclibc_out" "$$glibc_out"
-endef
-define exec_test
-	$(showtest)
-	$(Q)\
-	$(SIMULATOR) $(WRAPPER) $(WRAPPER_$(tst_src_name)) \
-	./$(binary_name) $(OPTS) $(OPTS_$(tst_src_name)) > "$(binary_name).out" 2>&1 ; \
-		ret=$$? ; \
-		expected_ret="$(RET_$(tst_src_name))" ; \
-		test -z "$$expected_ret" && export expected_ret=0 ; \
-	if ! test $$ret -eq $$expected_ret ; then \
-		echo "ret == $$ret ; expected_ret == $$expected_ret" ; \
-		echo "The output of the failed test is:"; \
-		cat "$(binary_name).out"; \
-		exit 1 ; \
-	fi
-	$(SCAT) "$(binary_name).out"
-endef
-
-test check all: run
-run: $(RUN_TARGETS)
-
-$(addsuffix .exe,$(U_TARGETS)): SIMULATOR:=$(SIMULATOR_uclibc)
-$(addsuffix .exe,$(G_TARGETS)): SIMULATOR:=$(SIMULATOR_glibc)
-$(RUN_TARGETS):
-ifeq (1,$(UCLIBCNG_GENERATE_TESTRUNNER))
-	$(Q)\
-	expected_ret="$(RET_$(tst_src_name))"; echo \
-	    "$${expected_ret:-0}" \
-	    $(call shellescape,$(tst_src_name)) \
-	    $(call shellescape,$(binary_name)) \
-	    $(call shellescape,$(UCLIBCNG_TEST_SUBDIR)) \
-	    $(call shellescape,$(WRAPPER) $(WRAPPER_$(tst_src_name)) ./$(binary_name) $(OPTS) $(OPTS_$(tst_src_name))) \
-	    >>$(top_builddir)/test/uclibcng-testrunner.in
-else
-	$(exec_test)
-	$(diff_test)
-ifeq ($(UCLIBC_ONLY),)
-	$(uclibc_glibc_diff_test)
-endif
-endif
-
-compile: $(COMPILE_TARGETS)
-
-G_TARGET_SRCS := $(addsuffix .c,$(G_TARGETS))
-U_TARGET_SRCS := $(addsuffix .c,$(U_TARGETS))
-
-MAKE_SRCS := $(wildcard Makefile.in) $(TESTDIR)Makefile $(TESTDIR)Rules.mak $(TESTDIR)Test.mak
-
-$(U_TARGETS): $(U_TARGET_SRCS) $(MAKE_SRCS)
-	$(showlink)
-	$(Q)$(CC) $(filter-out $(CFLAGS-OMIT-$@),$(CFLAGS)) $(EXTRA_CFLAGS) $(CFLAGS_$(notdir $(CURDIR))) $(CFLAGS_$@) -c $@.c -o $@.o
-	$(Q)$(CC) $(filter-out $(LDFLAGS-OMIT-$@),$(LDFLAGS)) $@.o -o $@ $(EXTRA_LDFLAGS) $(LDFLAGS_$@)
-
-$(G_TARGETS): $(U_TARGET_SRCS) $(MAKE_SRCS)
-	$(showlink)
-	$(Q)$(HOSTCC) $(filter-out $(HOST_CFLAGS-OMIT-$(patsubst %_glibc,%,$@)),$(HOST_CFLAGS)) \
-	$(CFLAGS_$(notdir $(CURDIR))) $(CFLAGS_$(patsubst %_glibc,%,$@)) \
-	-c $(patsubst %_glibc,%,$@).c -o $@.o
-	$(Q)$(HOSTCC) $(filter-out $(LDFLAGS-OMIT-$(patsubst %_glibc,%,$@)),$(HOST_LDFLAGS)) \
-	$@.o -o $@ $(EXTRA_LDFLAGS) $(LDFLAGS_$(patsubst %_glibc,%,$@)) $(LDFLAGS_$@)
-
-
-shell_%:
-	$(showtest)
-	$(Q)$(if $(PRE_RUN_$(@)),$(PRE_RUN_$(@)))
-	$(Q)$(SHELL) $(patsubst shell_%,%.sh,$(binary_name))
-	$(Q)$(if $(POST_RUN_$(@)),$(POST_RUN_$(@)))
-
-%.so: %.c
-	$(showlink)
-	$(Q)$(CC) \
-		$(filter-out $(CFLAGS-OMIT-$<),$(CFLAGS)) $(EXTRA_CFLAGS) \
-		$(CFLAGS_$(patsubst %_glibc,%,$@)) \
-		-fPIC -shared $< -o $@ -Wl,-soname,$@ \
-		$(filter-out $(LDFLAGS-OMIT-$<),$(LDFLAGS)) $(EXTRA_LIBS) \
-		$(LDFLAGS_$(patsubst %_glibc,%,$@))
-
-clean:
-	$(showclean)
-	$(Q)$(RM) *.a *.o *.so *~ core *.out *.gdb $(CLEAN_TARGETS) $(EXTRA_CLEAN)
-	$(Q)$(RM_R) $(EXTRA_DIRS)
-
-.PHONY: all check clean test run compile

+ 0 - 8
test/argp/Makefile

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

+ 0 - 10
test/argp/Makefile.in

@@ -1,10 +0,0 @@
-# uClibc argp tests
-# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
-TESTS := $(addprefix argp-, ex1 ex2 ex3 ex4 test) \
-         bug-argp1 tst-argp1 tst-argp2
-
-OPTS_argp-ex3 = ARG1 ARG2
-OPTS_argp-ex4 = ARG1 string1 string2 string3
-OPTS_bug-argp1 = -- --help
-

+ 0 - 15
test/argp/argp-ex1.c

@@ -1,15 +0,0 @@
-/* Argp example #1 -- a minimal program using argp */
-
-/* This is (probably) the smallest possible program that
-   uses argp.  It won't do much except give an error
-   messages and exit when there are any arguments, and print
-   a (rather pointless) messages for --help.  */
-
-#include <stdlib.h>
-#include <argp.h>
-
-int main (int argc, char **argv)
-{
-  argp_parse (0, argc, argv, 0, 0, 0);
-  exit (0);
-}

+ 0 - 45
test/argp/argp-ex2.c

@@ -1,45 +0,0 @@
-/* Argp example #2 -- a pretty minimal program using argp */
-
-/* This program doesn't use any options or arguments, but uses
-   argp to be compliant with the GNU standard command line
-   format.
-
-   In addition to making sure no arguments are given, and
-   implementing a --help option, this example will have a
-   --version option, and will put the given documentation string
-   and bug address in the --help output, as per GNU standards.
-
-   The variable ARGP contains the argument parser specification;
-   adding fields to this structure is the way most parameters are
-   passed to argp_parse (the first three fields are usually used,
-   but not in this small program).  There are also two global
-   variables that argp knows about defined here,
-   ARGP_PROGRAM_VERSION and ARGP_PROGRAM_BUG_ADDRESS (they are
-   global variables because they will almost always be constant
-   for a given program, even if it uses different argument
-   parsers for various tasks).  */
-
-#include <stdlib.h>
-#include <argp.h>
-
-const char *argp_program_version =
-  "argp-ex2 1.0";
-const char *argp_program_bug_address =
-  "<bug-gnu-utils@@gnu.org>";
-
-/* Program documentation.  */
-static char doc[] =
-  "Argp example #2 -- a pretty minimal program using argp";
-
-/* Our argument parser.  The @code{options}, @code{parser}, and
-   @code{args_doc} fields are zero because we have neither options or
-   arguments; @code{doc} and @code{argp_program_bug_address} will be
-   used in the output for @samp{--help}, and the @samp{--version}
-   option will print out @code{argp_program_version}.  */
-static struct argp argp = { 0, 0, 0, doc };
-
-int main (int argc, char **argv)
-{
-  argp_parse (&argp, argc, argv, 0, 0, 0);
-  exit (0);
-}

+ 0 - 153
test/argp/argp-ex3.c

@@ -1,153 +0,0 @@
-/* Argp example #3 -- a program with options and arguments using argp */
-
-/* This program uses the same features as example 2, and uses options and
-   arguments.
-
-   We now use the first four fields in ARGP, so here's a description of them:
-     OPTIONS  -- A pointer to a vector of struct argp_option (see below)
-     PARSER   -- A function to parse a single option, called by argp
-     ARGS_DOC -- A string describing how the non-option arguments should look
-     DOC      -- A descriptive string about this program; if it contains a
-                 vertical tab character (\v), the part after it will be
-                 printed *following* the options
-
-   The function PARSER takes the following arguments:
-     KEY  -- An integer specifying which option this is (taken
-             from the KEY field in each struct argp_option), or
-             a special key specifying something else; the only
-             special keys we use here are ARGP_KEY_ARG, meaning
-             a non-option argument, and ARGP_KEY_END, meaning
-             that all arguments have been parsed
-     ARG  -- For an option KEY, the string value of its
-             argument, or NULL if it has none
-     STATE-- A pointer to a struct argp_state, containing
-             various useful information about the parsing state; used here
-             are the INPUT field, which reflects the INPUT argument to
-             argp_parse, and the ARG_NUM field, which is the number of the
-             current non-option argument being parsed
-   It should return either 0, meaning success, ARGP_ERR_UNKNOWN, meaning the
-   given KEY wasn't recognized, or an errno value indicating some other
-   error.
-
-   Note that in this example, main uses a structure to communicate with the
-   parse_opt function, a pointer to which it passes in the INPUT argument to
-   argp_parse.  Of course, it's also possible to use global variables
-   instead, but this is somewhat more flexible.
-
-   The OPTIONS field contains a pointer to a vector of struct argp_option's;
-   that structure has the following fields (if you assign your option
-   structures using array initialization like this example, unspecified
-   fields will be defaulted to 0, and need not be specified):
-     NAME   -- The name of this option's long option (may be zero)
-     KEY    -- The KEY to pass to the PARSER function when parsing this option,
-               *and* the name of this option's short option, if it is a
-               printable ascii character
-     ARG    -- The name of this option's argument, if any
-     FLAGS  -- Flags describing this option; some of them are:
-                 OPTION_ARG_OPTIONAL -- The argument to this option is optional
-                 OPTION_ALIAS        -- This option is an alias for the
-                                        previous option
-                 OPTION_HIDDEN       -- Don't show this option in --help output
-     DOC    -- A documentation string for this option, shown in --help output
-
-   An options vector should be terminated by an option with all fields zero. */
-
-#include <stdlib.h>
-#include <argp.h>
-
-const char *argp_program_version =
-  "argp-ex3 1.0";
-const char *argp_program_bug_address =
-  "<bug-gnu-utils@@gnu.org>";
-
-/* Program documentation.  */
-static char doc[] =
-  "Argp example #3 -- a program with options and arguments using argp";
-
-/* A description of the arguments we accept.  */
-static char args_doc[] = "ARG1 ARG2";
-
-/* The options we understand.  */
-static struct argp_option options[] = {
-  {"verbose",  'v', 0,      0,  "Produce verbose output" },
-  {"quiet",    'q', 0,      0,  "Don't produce any output" },
-  {"silent",   's', 0,      OPTION_ALIAS },
-  {"output",   'o', "FILE", 0,
-   "Output to FILE instead of standard output" },
-  { 0 }
-};
-
-/* Used by @code{main} to communicate with @code{parse_opt}.  */
-struct arguments
-{
-  char *args[2];               /* @var{arg1} & @var{arg2} */
-  int silent, verbose;
-  char *output_file;
-};
-
-/* Parse a single option.  */
-static error_t
-parse_opt (int key, char *arg, struct argp_state *state)
-{
-  /* Get the @var{input} argument from @code{argp_parse}, which we
-     know is a pointer to our arguments structure.  */
-  struct arguments *arguments = state->input;
-
-  switch (key)
-    {
-    case 'q': case 's':
-      arguments->silent = 1;
-      break;
-    case 'v':
-      arguments->verbose = 1;
-      break;
-    case 'o':
-      arguments->output_file = arg;
-      break;
-
-    case ARGP_KEY_ARG:
-      if (state->arg_num >= 2)
-       /* Too many arguments.  */
-       argp_usage (state);
-
-      arguments->args[state->arg_num] = arg;
-
-      break;
-
-    case ARGP_KEY_END:
-      if (state->arg_num < 2)
-       /* Not enough arguments.  */
-       argp_usage (state);
-      break;
-
-    default:
-      return ARGP_ERR_UNKNOWN;
-    }
-  return 0;
-}
-
-/* Our argp parser.  */
-static struct argp argp = { options, parse_opt, args_doc, doc };
-
-int main (int argc, char **argv)
-{
-  struct arguments arguments;
-
-  /* Default values.  */
-  arguments.silent = 0;
-  arguments.verbose = 0;
-  arguments.output_file = "-";
-
-  /* Parse our arguments; every option seen by @code{parse_opt} will
-     be reflected in @code{arguments}.  */
-  argp_parse (&argp, argc, argv, 0, 0, &arguments);
-
-  printf ("ARG1 = %s\nARG2 = %s\nOUTPUT_FILE = %s\n"
-         "VERBOSE = %s\nSILENT = %s\n",
-         arguments.args[0], arguments.args[1],
-         arguments.output_file,
-         arguments.verbose ? "yes" : "no",
-         arguments.silent ? "yes" : "no");
-
-  exit (0);
-}

+ 0 - 167
test/argp/argp-ex4.c

@@ -1,167 +0,0 @@
-/* Argp example #4 -- a program with somewhat more complicated options */
-
-/* This program uses the same features as example 3, but has more
-   options, and somewhat more structure in the -help output.  It
-   also shows how you can `steal' the remainder of the input
-   arguments past a certain point, for programs that accept a
-   list of items.  It also shows the special argp KEY value
-   ARGP_KEY_NO_ARGS, which is only given if no non-option
-   arguments were supplied to the program.
-
-   For structuring the help output, two features are used,
-   *headers* which are entries in the options vector with the
-   first four fields being zero, and a two part documentation
-   string (in the variable DOC), which allows documentation both
-   before and after the options; the two parts of DOC are
-   separated by a vertical-tab character ('\v', or '\013').  By
-   convention, the documentation before the options is just a
-   short string saying what the program does, and that afterwards
-   is longer, describing the behavior in more detail.  All
-   documentation strings are automatically filled for output,
-   although newlines may be included to force a line break at a
-   particular point.  All documentation strings are also passed to
-   the `gettext' function, for possible translation into the
-   current locale.  */
-
-#include <stdlib.h>
-#include <error.h>
-#include <argp.h>
-
-const char *argp_program_version =
-  "argp-ex4 1.0";
-const char *argp_program_bug_address =
-  "<bug-gnu-utils@@prep.ai.mit.edu>";
-
-/* Program documentation.  */
-static char doc[] =
-  "Argp example #4 -- a program with somewhat more complicated\
-options\
-\vThis part of the documentation comes *after* the options;\
- note that the text is automatically filled, but it's possible\
- to force a line-break, e.g.\n<-- here.";
-
-/* A description of the arguments we accept.  */
-static char args_doc[] = "ARG1 [STRING...]";
-
-/* Keys for options without short-options.  */
-#define OPT_ABORT  1           /* --abort */
-
-/* The options we understand.  */
-static struct argp_option options[] = {
-  {"verbose",  'v', 0,       0, "Produce verbose output" },
-  {"quiet",    'q', 0,       0, "Don't produce any output" },
-  {"silent",   's', 0,       OPTION_ALIAS },
-  {"output",   'o', "FILE",  0,
-   "Output to FILE instead of standard output" },
-
-  {0,0,0,0, "The following options should be grouped together:" },
-  {"repeat",   'r', "COUNT", OPTION_ARG_OPTIONAL,
-   "Repeat the output COUNT (default 10) times"},
-  {"abort",    OPT_ABORT, 0, 0, "Abort before showing any output"},
-
-  { 0 }
-};
-
-/* Used by @code{main} to communicate with @code{parse_opt}.  */
-struct arguments
-{
-  char *arg1;                  /* @var{arg1} */
-  char **strings;              /* [@var{string}@dots{}] */
-  int silent, verbose, abort;  /* @samp{-s}, @samp{-v}, @samp{--abort} */
-  char *output_file;           /* @var{file} arg to @samp{--output} */
-  int repeat_count;            /* @var{count} arg to @samp{--repeat} */
-};
-
-/* Parse a single option.  */
-static error_t
-parse_opt (int key, char *arg, struct argp_state *state)
-{
-  /* Get the @code{input} argument from @code{argp_parse}, which we
-     know is a pointer to our arguments structure.  */
-  struct arguments *arguments = state->input;
-
-  switch (key)
-    {
-    case 'q': case 's':
-      arguments->silent = 1;
-      break;
-    case 'v':
-      arguments->verbose = 1;
-      break;
-    case 'o':
-      arguments->output_file = arg;
-      break;
-    case 'r':
-      arguments->repeat_count = arg ? atoi (arg) : 10;
-      break;
-    case OPT_ABORT:
-      arguments->abort = 1;
-      break;
-
-    case ARGP_KEY_NO_ARGS:
-      argp_usage (state);
-
-    case ARGP_KEY_ARG:
-      /* Here we know that @code{state->arg_num == 0}, since we
-        force argument parsing to end before any more arguments can
-        get here.  */
-      arguments->arg1 = arg;
-
-      /* Now we consume all the rest of the arguments.
-        @code{state->next} is the index in @code{state->argv} of the
-        next argument to be parsed, which is the first @var{string}
-        we're interested in, so we can just use
-        @code{&state->argv[state->next]} as the value for
-        arguments->strings.
-
-        @emph{In addition}, by setting @code{state->next} to the end
-        of the arguments, we can force argp to stop parsing here and
-        return.  */
-      arguments->strings = &state->argv[state->next];
-      state->next = state->argc;
-
-      break;
-
-    default:
-      return ARGP_ERR_UNKNOWN;
-    }
-  return 0;
-}
-
-/* Our argp parser.  */
-static struct argp argp = { options, parse_opt, args_doc, doc };
-
-int main (int argc, char **argv)
-{
-  int i, j;
-  struct arguments arguments;
-
-  /* Default values.  */
-  arguments.silent = 0;
-  arguments.verbose = 0;
-  arguments.output_file = "-";
-  arguments.repeat_count = 1;
-  arguments.abort = 0;
-
-  /* Parse our arguments; every option seen by @code{parse_opt} will be
-     reflected in @code{arguments}.  */
-  argp_parse (&argp, argc, argv, 0, 0, &arguments);
-
-  if (arguments.abort)
-    error (10, 0, "ABORTED");
-
-  for (i = 0; i < arguments.repeat_count; i++)
-    {
-      printf ("ARG1 = %s\n", arguments.arg1);
-      printf ("STRINGS = ");
-      for (j = 0; arguments.strings[j]; j++)
-       printf (j == 0 ? "%s" : ", %s", arguments.strings[j]);
-      printf ("\n");
-      printf ("OUTPUT_FILE = %s\nVERBOSE = %s\nSILENT = %s\n",
-             arguments.output_file,
-             arguments.verbose ? "yes" : "no",
-             arguments.silent ? "yes" : "no");
-    }
-
-  exit (0);
-}

+ 0 - 208
test/argp/argp-test.c

@@ -1,208 +0,0 @@
-/* Test program for argp argument parser
-   Copyright (C) 1997 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Written by Miles Bader <miles at gnu.ai.mit.edu>.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; see the file COPYING.LIB.  If
-   not, see <http://www.gnu.org/licenses/>.  */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <time.h>
-#include <string.h>
-#include <argp.h>
-
-const char *argp_program_version = "argp-test 1.0";
-
-struct argp_option sub_options[] =
-{
-  {"subopt1",       's',     0,  0, "Nested option 1"},
-  {"subopt2",       'S',     0,  0, "Nested option 2"},
-
-  { 0, 0, 0, 0, "Some more nested options:", 10},
-  {"subopt3",       'p',     0,  0, "Nested option 3"},
-
-  {"subopt4",       'q',     0,  0, "Nested option 4", 1},
-
-  {0}
-};
-
-static const char sub_args_doc[] = "STRING...\n-";
-static const char sub_doc[] = "\vThis is the doc string from the sub-arg-parser.";
-
-static error_t
-sub_parse_opt (int key, char *arg, struct argp_state *state)
-{
-  switch (key)
-    {
-    case ARGP_KEY_NO_ARGS:
-      printf ("NO SUB ARGS\n");
-      break;
-    case ARGP_KEY_ARG:
-      printf ("SUB ARG: %s\n", arg);
-      break;
-
-    case 's' : case 'S': case 'p': case 'q':
-      printf ("SUB KEY %c\n", key);
-      break;
-
-    default:
-      return ARGP_ERR_UNKNOWN;
-    }
-  return 0;
-}
-
-static char *
-sub_help_filter (int key, const char *text, void *input)
-{
-  if (key == ARGP_KEY_HELP_EXTRA)
-    return strdup ("This is some extra text from the sub parser (note that it \
-is preceded by a blank line).");
-  else
-    return (char *)text;
-}
-
-static struct argp sub_argp = {
-  sub_options, sub_parse_opt, sub_args_doc, sub_doc, 0, sub_help_filter
-};
-
-/* Structure used to communicate with the parsing functions.  */
-struct params
-{
-  unsigned foonly;             /* Value parsed for foonly.  */
-  unsigned foonly_default;     /* Default value for it.  */
-};
-
-#define OPT_PGRP 1
-#define OPT_SESS 2
-
-struct argp_option options[] =
-{
-  {"pid",       'p',     "PID", 0, "List the process PID"},
-  {"pgrp",      OPT_PGRP,"PGRP",0, "List processes in the process group PGRP"},
-  {"no-parent", 'P',    0,     0, "Include processes without parents"},
-  {0,           'x',     0,     OPTION_ALIAS},
-  {"all-fields",'Q',     0,     0, "Don't elide unusable fields (normally"
-                                  " if there's some reason ps can't"
-                                  " print a field for any process, it's"
-                                  " removed from the output entirely)" },
-  {"reverse",   'r',    0,      0, "Reverse the order of any sort"},
-  {"gratuitously-long-reverse-option", 0, 0, OPTION_ALIAS},
-  {"session",  OPT_SESS,"SID",  OPTION_ARG_OPTIONAL,
-                                  "Add the processes from the session"
-                                  " SID (which defaults to the sid of"
-                                  " the current process)" },
-
-  {0,0,0,0, "Here are some more options:"},
-  {"foonly", 'f', "ZOT", OPTION_ARG_OPTIONAL, "Glork a foonly"},
-  {"zaza", 'z', 0, 0, "Snit a zar"},
-
-  {0}
-};
-
-static const char args_doc[] = "STRING";
-static const char doc[] = "Test program for argp."
- "\vThis doc string comes after the options."
- "\nHey!  Some manual formatting!"
- "\nThe current time is: %s";
-
-static void
-popt (int key, char *arg)
-{
-  char buf[10];
-  if (isprint (key))
-    sprintf (buf, "%c", key);
-  else
-    sprintf (buf, "%d", key);
-  if (arg)
-    printf ("KEY %s: %s\n", buf, arg);
-  else
-    printf ("KEY %s\n", buf);
-}
-
-static error_t
-parse_opt (int key, char *arg, struct argp_state *state)
-{
-  struct params *params = state->input;
-
-  switch (key)
-    {
-    case ARGP_KEY_NO_ARGS:
-      printf ("NO ARGS\n");
-      break;
-
-    case ARGP_KEY_ARG:
-      if (state->arg_num > 0)
-       return ARGP_ERR_UNKNOWN; /* Leave it for the sub-arg parser.  */
-      printf ("ARG: %s\n", arg);
-      break;
-
-    case 'f':
-      if (arg)
-       params->foonly = atoi (arg);
-      else
-       params->foonly = params->foonly_default;
-      popt (key, arg);
-      break;
-
-    case 'p': case 'P': case OPT_PGRP: case 'x': case 'Q':
-    case 'r': case OPT_SESS: case 'z':
-      popt (key, arg);
-      break;
-
-    default:
-      return ARGP_ERR_UNKNOWN;
-    }
-  return 0;
-}
-
-static char *
-help_filter (int key, const char *text, void *input)
-{
-  char *new_text;
-  struct params *params = input;
-
-  if (key == ARGP_KEY_HELP_POST_DOC && text)
-    {
-      time_t now = time (0);
-      asprintf (&new_text, text, ctime (&now));
-    }
-  else if (key == 'f')
-    /* Show the default for the --foonly option.  */
-    asprintf (&new_text, "%s (ZOT defaults to %x)",
-             text, params->foonly_default);
-  else
-    new_text = (char *)text;
-
-  return new_text;
-}
-
-static struct argp_child argp_children[] = { { &sub_argp }, { 0 } };
-static struct argp argp = {
-  options, parse_opt, args_doc, doc, argp_children, help_filter
-};
-
-int
-main (int argc, char **argv)
-{
-  struct params params;
-  params.foonly = 0;
-  params.foonly_default = random ();
-  argp_parse (&argp, argc, argv, 0, 0, &params);
-  printf ("After parsing: foonly = %x\n", params.foonly);
-  return 0;
-}

+ 0 - 26
test/argp/bug-argp1.c

@@ -1,26 +0,0 @@
-#include <argp.h>
-
-
-static const struct argp_option test_options[] =
-{
-  { NULL, 'a', NULL, OPTION_DOC, NULL },
-  { NULL, 'b', NULL, OPTION_DOC, NULL },
-  { NULL, 0, NULL, 0, NULL }
-};
-
-static struct argp test_argp =
-{
-  test_options
-};
-
-
-static int
-do_test (int argc, char *argv[])
-{
-  int i;
-  argp_parse (&test_argp, argc, argv, 0, &i, NULL);
-  return 0;
-}
-
-#define TEST_FUNCTION do_test (argc, argv)
-#include "../test-skeleton.c"

+ 0 - 117
test/argp/tst-argp1.c

@@ -1,117 +0,0 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper at redhat.com>, 2002.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; see the file COPYING.LIB.  If
-   not, see <http://www.gnu.org/licenses/>.  */
-
-#include <argp.h>
-
-
-
-
-#define OPT_TO_THREAD          300
-#define OPT_TO_PROCESS         301
-#define OPT_SYNC_SIGNAL                302
-#define OPT_SYNC_JOIN          303
-#define OPT_TOPLEVEL           304
-
-
-static const struct argp_option test_options[] =
-  {
-    { NULL, 0, NULL, 0, "\
-This is a test for threads so we allow ther user to selection the number of \
-threads which are used at any one time.  Independently the total number of \
-rounds can be selected.  This is the total number of threads which will have \
-run when the process terminates:" },
-    { "threads", 't', "NUMBER", 0, "Number of threads used at once" },
-    { "starts", 's', "NUMBER", 0, "Total number of working threads" },
-    { "toplevel", OPT_TOPLEVEL, "NUMBER", 0,
-      "Number of toplevel threads which start the other threads; this \
-implies --sync-join" },
-
-    { NULL, 0, NULL, 0, "\
-Each thread can do one of two things: sleep or do work.  The latter is 100% \
-CPU bound.  The work load is the probability a thread does work.  All values \
-from zero to 100 (inclusive) are valid.  How often each thread repeats this \
-can be determined by the number of rounds.  The work cost determines how long \
-each work session (not sleeping) takes.  If it is zero a thread would \
-effectively nothing.  By setting the number of rounds to zero the thread \
-does no work at all and pure thread creation times can be measured." },
-    { "workload", 'w', "PERCENT", 0, "Percentage of time spent working" },
-    { "workcost", 'c', "NUMBER", 0,
-      "Factor in the cost of each round of working" },
-    { "rounds", 'r', "NUMBER", 0, "Number of rounds each thread runs" },
-
-    { NULL, 0, NULL, 0, "\
-There are a number of different methods how thread creation can be \
-synchronized.  Synchronization is necessary since the number of concurrently \
-running threads is limited." },
-    { "sync-signal", OPT_SYNC_SIGNAL, NULL, 0,
-      "Synchronize using a signal (default)" },
-    { "sync-join", OPT_SYNC_JOIN, NULL, 0, "Synchronize using pthread_join" },
-
-    { NULL, 0, NULL, 0, "\
-One parameter for each threads execution is the size of the stack.  If this \
-parameter is not used the system's default stack size is used.  If many \
-threads are used the stack size should be chosen quite small." },
-    { "stacksize", 'S', "BYTES", 0, "Size of threads stack" },
-    { "guardsize", 'g', "BYTES", 0,
-      "Size of stack guard area; must fit into the stack" },
-
-    { NULL, 0, NULL, 0, "Signal options:" },
-    { "to-thread", OPT_TO_THREAD, NULL, 0, "Send signal to main thread" },
-    { "to-process", OPT_TO_PROCESS, NULL, 0,
-      "Send signal to process (default)" },
-
-    { NULL, 0, NULL, 0, "Administrative options:" },
-    { "progress", 'p', NULL, 0, "Show signs of progress" },
-    { "timing", 'T', NULL, 0,
-      "Measure time from startup to the last thread finishing" },
-    { NULL, 0, NULL, 0, NULL }
-  };
-
-/* Prototype for option handler.  */
-static error_t parse_opt (int key, char *arg, struct argp_state *state);
-
-/* Data structure to communicate with argp functions.  */
-static struct argp argp =
-{
-  test_options, parse_opt
-};
-
-
-static int
-do_test (void)
-{
-  int argc = 2;
-  char *argv[3] = { (char *) "tst-argp1", (char *) "--help", NULL };
-  int remaining;
-
-  /* Parse and process arguments.  */
-  argp_parse (&argp, argc, argv, 0, &remaining, NULL);
-
-  return 0;
-}
-
-
-/* Handle program arguments.  */
-static error_t
-parse_opt (int key, char *arg, struct argp_state *state)
-{
-  return ARGP_ERR_UNKNOWN;
-}
-
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"

+ 0 - 100
test/argp/tst-argp2.c

@@ -1,100 +0,0 @@
-/* Copyright (C) 2007 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Jakub Jelinek <jakub at redhat.com>, 2007.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; see the file COPYING.LIB.  If
-   not, see <http://www.gnu.org/licenses/>.  */
-
-#include <argp.h>
-
-static const struct argp_option opt1[] =
-  {
-    { "opt1", '1', "NUMBER", 0, "Option 1" },
-    { NULL, 0, NULL, 0, NULL }
-  };
-
-static const struct argp_option opt2[] =
-  {
-    { "opt2", '2', "NUMBER", 0, "Option 2" },
-    { NULL, 0, NULL, 0, NULL }
-  };
-
-static const struct argp_option opt3[] =
-  {
-    { "opt3", '3', "NUMBER", 0, "Option 3" },
-    { NULL, 0, NULL, 0, NULL }
-  };
-
-static const struct argp_option opt4[] =
-  {
-    { "opt4", '4', "NUMBER", 0, "Option 4" },
-    { NULL, 0, NULL, 0, NULL }
-  };
-
-static const struct argp_option opt5[] =
-  {
-    { "opt5", '5', "NUMBER", 0, "Option 5" },
-    { NULL, 0, NULL, 0, NULL }
-  };
-
-static struct argp argp5 =
-  {
-    opt5, NULL, "args doc5", "doc5", NULL, NULL, NULL
-  };
-
-static struct argp argp4 =
-  {
-    opt4, NULL, "args doc4", "doc4", NULL, NULL, NULL
-  };
-
-static struct argp argp3 =
-  {
-    opt3, NULL, "args doc3", "doc3", NULL, NULL, NULL
-  };
-
-static struct argp_child children2[] =
-  {
-    { &argp4, 0, "child3", 3 },
-    { &argp5, 0, "child4", 4 },
-    { NULL, 0, NULL, 0 }
-  };
-
-static struct argp argp2 =
-  {
-    opt2, NULL, "args doc2", "doc2", children2, NULL, NULL
-  };
-
-static struct argp_child children1[] =
-  {
-    { &argp2, 0, "child1", 1 },
-    { &argp3, 0, "child2", 2 },
-    { NULL, 0, NULL, 0 }
-  };
-
-static struct argp argp1 =
-  {
-    opt1, NULL, "args doc1", "doc1", children1, NULL, NULL
-  };
-
-
-static int
-do_test (void)
-{
-  argp_help (&argp1, stdout, ARGP_HELP_LONG, (char *) "tst-argp2");
-  return 0;
-}
-
-
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"

+ 0 - 8
test/args/Makefile

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

+ 0 - 9
test/args/Makefile.in

@@ -1,9 +0,0 @@
-# uClibc args tests
-# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
-OPTS_arg_test = a b c d e f g h
-WRAPPER_arg_test = \
-	env -i \
-	ENVVAR=123 \
-	SOMETHING=sldajfasdf \
-	BLAHBLAH=" hi hi "

+ 0 - 40
test/args/arg_test.c

@@ -1,40 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/*
- * Test application for argc and argv handling
- * Copyright (C) 2000-2006 by Erik Andersen <andersen@uclibc.org>
- *
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-int main(int argc, char **argv)
-{
-	int i=0;
-	char** index=__environ;
-
-#ifdef __powerpc__
-	{
-		unsigned long sp;
-		sp = (unsigned long) __builtin_frame_address(0);
-		if(sp&0xf){
-			printf("stack pointer is unaligned! (%08lx)\n", sp);
-		}
-	}
-#endif
-
-	printf("argc=%d\n", argc);
-
-	for(i=0;i<argc;i++) {
-		printf("argv[%d]='%s'\n", i, argv[i]);
-	}
-
-	i=0;
-	while(*index) {
-		printf("environ[%d]='%s'\n", i++, *index++);
-	}
-
-	exit(0);
-}

+ 0 - 13
test/args/arg_test.out.good

@@ -1,13 +0,0 @@
-argc=9
-argv[0]='./arg_test'
-argv[1]='a'
-argv[2]='b'
-argv[3]='c'
-argv[4]='d'
-argv[5]='e'
-argv[6]='f'
-argv[7]='g'
-argv[8]='h'
-environ[0]='ENVVAR=123'
-environ[1]='SOMETHING=sldajfasdf'
-environ[2]='BLAHBLAH= hi hi '

+ 0 - 13
test/args/arg_test_glibc.out.good

@@ -1,13 +0,0 @@
-argc=9
-argv[0]='./arg_test_glibc'
-argv[1]='a'
-argv[2]='b'
-argv[3]='c'
-argv[4]='d'
-argv[5]='e'
-argv[6]='f'
-argv[7]='g'
-argv[8]='h'
-environ[0]='ENVVAR=123'
-environ[1]='SOMETHING=sldajfasdf'
-environ[2]='BLAHBLAH= hi hi '

+ 0 - 8
test/assert/Makefile

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

+ 0 - 5
test/assert/Makefile.in

@@ -1,5 +0,0 @@
-# uClibc assert tests
-# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
-RET_assert     := 134
-WRAPPER_assert := trap ":" ABRT ;

+ 0 - 47
test/assert/assert.c

@@ -1,47 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/*
- * Test application for functions defined in ctype.h
- * Copyright (C) 2000-2006 by Erik Andersen <andersen@uclibc.org>
- *
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
-#undef NDEBUG
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <signal.h>
-#include "../testsuite.h"
-
-int got_abort;
-
-static void aborthandler(int junk)
-{
-	got_abort = 1;
-}
-
-int main(int argc, char *argv[])
-{
-	signal(SIGABRT, aborthandler);
-
-	init_testsuite("Testing functions defined in assert.h:\n\t");
-
-	got_abort=0;
-	assert(0 == 0);
-	TEST_NUMERIC(got_abort, 0);
-
-#define NDEBUG
-	got_abort = 0;
-	printf("Don't worry -- This next test is supposed to print an assert message:\n");
-	fprintf(stderr, "\t");
-	assert(0 == 1);
-	TEST_NUMERIC(got_abort, 0);
-
-#undef NDEBUG
-	got_abort = 0;
-	assert(0 == 1);
-	TEST_NUMERIC(got_abort, 1);
-
-	exit(0);
-}

+ 0 - 8
test/build/Makefile

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

+ 0 - 21
test/build/check_config_options.sh

@@ -1,21 +0,0 @@
-#!/bin/sh
-
-ret=0
-
-# Make sure nothing uses the ARCH_HAS_MMU option anymore
-result=$(
-find ../.. \
-	| grep -v \
-		-e include/bits/uClibc_config.h \
-		-e /test/ \
-		-e /.svn/ \
-	| xargs grep -sHI \
-		__ARCH_HAS_MMU__
-)
-if [ -n "$result" ] ; then
-	echo "The build system is incorrectly using ARCH_HAS_MMU:"
-	echo "$result"
-	ret=1
-fi
-
-exit $ret

+ 0 - 8
test/crypt/Makefile

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

+ 0 - 15
test/crypt/Makefile.in

@@ -1,15 +0,0 @@
-# uClibc crypt tests
-# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
-EXTRA_LDFLAGS := -lcrypt
-
-OPTS_crypt = < crypt.input
-
-ifneq ($(UCLIBC_HAS_SHA512_CRYPT_IMPL),y)
-TESTS_DISABLED += sha512c-test
-endif
-ifneq ($(UCLIBC_HAS_SHA256_CRYPT_IMPL),y)
-TESTS_DISABLED += sha256c-test
-endif
-
-WRAPPER := env TIMEOUTFACTOR=50

+ 0 - 103
test/crypt/crypt.c

@@ -1,103 +0,0 @@
-
-/*
- * This crypt(3) validation program shipped with UFC-crypt
- * is derived from one distributed with Phil Karns PD DES package.
- *
- * @(#)cert.c	1.8 11 Aug 1996
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include "crypt.h"
-
-static int totfails = 0;
-
-static void good_bye (void) __attribute__ ((noreturn));
-static void good_bye (void)
-{
-  if(totfails == 0) {
-    printf("Passed DES validation suite\n");
-    exit(0);
-  } else {
-    printf("%d failures during DES validation suite!!!\n", totfails);
-    exit(1);
-  }
-}
-
-static void get8(char *cp)
-{
-	int i,j,t;
-
-	for(i=0;i<8;i++){
-		scanf("%2x",&t);
-		if(feof(stdin))
-		  good_bye();
-		for(j=0; j<8 ; j++) {
-		  *cp++ = (t & (0x01 << (7-j))) != 0;
-		}
-	}
-}
-
-static void put8(char *cp)
-{
-	int i,j,t;
-
-	for(i=0;i<8;i++){
-	  t = 0;
-	  for(j = 0; j<8; j++)
-	    t = (t<<1) | *cp++;
-	  printf("%02x", t);
-	}
-}
-
-int main(void)
-{
-	char key[64],plain[64],cipher[64],answer[64];
-	int i;
-	int test;
-	int fail;
-
-	for(test=0;!feof(stdin);test++){
-
-		get8(key);
-		printf(" K: "); put8(key);
-		setkey(key);
-
-		get8(plain);
-		printf(" P: "); put8(plain);
-
-		get8(answer);
-		printf(" C: "); put8(answer);
-
-		for(i=0;i<64;i++)
-			cipher[i] = plain[i];
-		encrypt(cipher, 0);
-
-		for(i=0;i<64;i++) {
-			if(cipher[i] != answer[i])
-				break;
-		}
-		fail = 0;
-		if(i != 64){
-			printf(" Encrypt FAIL");
-			fail++; totfails++;
-		}
-
-		encrypt(cipher, 1);
-
-		for(i=0;i<64;i++)
-			if(cipher[i] != plain[i])
-				break;
-		if(i != 64){
-			printf(" Decrypt FAIL");
-			fail++; totfails++;
-		}
-
-		if(fail == 0)
-			printf(" OK");
-		printf("\n");
-	}
-	good_bye();
-}
-
-

+ 0 - 171
test/crypt/crypt.input

@@ -1,171 +0,0 @@
-0101010101010101 95f8a5e5dd31d900 8000000000000000
-0101010101010101 dd7f121ca5015619 4000000000000000
-0101010101010101 2e8653104f3834ea 2000000000000000
-0101010101010101 4bd388ff6cd81d4f 1000000000000000
-0101010101010101 20b9e767b2fb1456 0800000000000000
-0101010101010101 55579380d77138ef 0400000000000000
-0101010101010101 6cc5defaaf04512f 0200000000000000
-0101010101010101 0d9f279ba5d87260 0100000000000000
-0101010101010101 d9031b0271bd5a0a 0080000000000000
-0101010101010101 424250b37c3dd951 0040000000000000
-0101010101010101 b8061b7ecd9a21e5 0020000000000000
-0101010101010101 f15d0f286b65bd28 0010000000000000
-0101010101010101 add0cc8d6e5deba1 0008000000000000
-0101010101010101 e6d5f82752ad63d1 0004000000000000
-0101010101010101 ecbfe3bd3f591a5e 0002000000000000
-0101010101010101 f356834379d165cd 0001000000000000
-0101010101010101 2b9f982f20037fa9 0000800000000000
-0101010101010101 889de068a16f0be6 0000400000000000
-0101010101010101 e19e275d846a1298 0000200000000000
-0101010101010101 329a8ed523d71aec 0000100000000000
-0101010101010101 e7fce22557d23c97 0000080000000000
-0101010101010101 12a9f5817ff2d65d 0000040000000000
-0101010101010101 a484c3ad38dc9c19 0000020000000000
-0101010101010101 fbe00a8a1ef8ad72 0000010000000000
-0101010101010101 750d079407521363 0000008000000000
-0101010101010101 64feed9c724c2faf 0000004000000000
-0101010101010101 f02b263b328e2b60 0000002000000000
-0101010101010101 9d64555a9a10b852 0000001000000000
-0101010101010101 d106ff0bed5255d7 0000000800000000
-0101010101010101 e1652c6b138c64a5 0000000400000000
-0101010101010101 e428581186ec8f46 0000000200000000
-0101010101010101 aeb5f5ede22d1a36 0000000100000000
-0101010101010101 e943d7568aec0c5c 0000000080000000
-0101010101010101 df98c8276f54b04b 0000000040000000
-0101010101010101 b160e4680f6c696f 0000000020000000
-0101010101010101 fa0752b07d9c4ab8 0000000010000000
-0101010101010101 ca3a2b036dbc8502 0000000008000000
-0101010101010101 5e0905517bb59bcf 0000000004000000
-0101010101010101 814eeb3b91d90726 0000000002000000
-0101010101010101 4d49db1532919c9f 0000000001000000
-0101010101010101 25eb5fc3f8cf0621 0000000000800000
-0101010101010101 ab6a20c0620d1c6f 0000000000400000
-0101010101010101 79e90dbc98f92cca 0000000000200000
-0101010101010101 866ecedd8072bb0e 0000000000100000
-0101010101010101 8b54536f2f3e64a8 0000000000080000
-0101010101010101 ea51d3975595b86b 0000000000040000
-0101010101010101 caffc6ac4542de31 0000000000020000
-0101010101010101 8dd45a2ddf90796c 0000000000010000
-0101010101010101 1029d55e880ec2d0 0000000000008000
-0101010101010101 5d86cb23639dbea9 0000000000004000
-0101010101010101 1d1ca853ae7c0c5f 0000000000002000
-0101010101010101 ce332329248f3228 0000000000001000
-0101010101010101 8405d1abe24fb942 0000000000000800
-0101010101010101 e643d78090ca4207 0000000000000400
-0101010101010101 48221b9937748a23 0000000000000200
-0101010101010101 dd7c0bbd61fafd54 0000000000000100
-0101010101010101 2fbc291a570db5c4 0000000000000080
-0101010101010101 e07c30d7e4e26e12 0000000000000040
-0101010101010101 0953e2258e8e90a1 0000000000000020
-0101010101010101 5b711bc4ceebf2ee 0000000000000010
-0101010101010101 cc083f1e6d9e85f6 0000000000000008
-0101010101010101 d2fd8867d50d2dfe 0000000000000004
-0101010101010101 06e7ea22ce92708f 0000000000000002
-0101010101010101 166b40b44aba4bd6 0000000000000001
-8001010101010101 0000000000000000 95a8d72813daa94d
-4001010101010101 0000000000000000 0eec1487dd8c26d5
-2001010101010101 0000000000000000 7ad16ffb79c45926
-1001010101010101 0000000000000000 d3746294ca6a6cf3
-0801010101010101 0000000000000000 809f5f873c1fd761
-0401010101010101 0000000000000000 c02faffec989d1fc
-0201010101010101 0000000000000000 4615aa1d33e72f10
-0180010101010101 0000000000000000 2055123350c00858
-0140010101010101 0000000000000000 df3b99d6577397c8
-0120010101010101 0000000000000000 31fe17369b5288c9
-0110010101010101 0000000000000000 dfdd3cc64dae1642
-0108010101010101 0000000000000000 178c83ce2b399d94
-0104010101010101 0000000000000000 50f636324a9b7f80
-0102010101010101 0000000000000000 a8468ee3bc18f06d
-0101800101010101 0000000000000000 a2dc9e92fd3cde92
-0101400101010101 0000000000000000 cac09f797d031287
-0101200101010101 0000000000000000 90ba680b22aeb525
-0101100101010101 0000000000000000 ce7a24f350e280b6
-0101080101010101 0000000000000000 882bff0aa01a0b87
-0101040101010101 0000000000000000 25610288924511c2
-0101020101010101 0000000000000000 c71516c29c75d170
-0101018001010101 0000000000000000 5199c29a52c9f059
-0101014001010101 0000000000000000 c22f0a294a71f29f
-0101012001010101 0000000000000000 ee371483714c02ea
-0101011001010101 0000000000000000 a81fbd448f9e522f
-0101010801010101 0000000000000000 4f644c92e192dfed
-0101010401010101 0000000000000000 1afa9a66a6df92ae
-0101010201010101 0000000000000000 b3c1cc715cb879d8
-0101010180010101 0000000000000000 19d032e64ab0bd8b
-0101010140010101 0000000000000000 3cfaa7a7dc8720dc
-0101010120010101 0000000000000000 b7265f7f447ac6f3
-0101010110010101 0000000000000000 9db73b3c0d163f54
-0101010108010101 0000000000000000 8181b65babf4a975
-0101010104010101 0000000000000000 93c9b64042eaa240
-0101010102010101 0000000000000000 5570530829705592
-0101010101800101 0000000000000000 8638809e878787a0
-0101010101400101 0000000000000000 41b9a79af79ac208
-0101010101200101 0000000000000000 7a9be42f2009a892
-0101010101100101 0000000000000000 29038d56ba6d2745
-0101010101080101 0000000000000000 5495c6abf1e5df51
-0101010101040101 0000000000000000 ae13dbd561488933
-0101010101020101 0000000000000000 024d1ffa8904e389
-0101010101018001 0000000000000000 d1399712f99bf02e
-0101010101014001 0000000000000000 14c1d7c1cffec79e
-0101010101012001 0000000000000000 1de5279dae3bed6f
-0101010101011001 0000000000000000 e941a33f85501303
-0101010101010801 0000000000000000 da99dbbc9a03f379
-0101010101010401 0000000000000000 b7fc92f91d8e92e9
-0101010101010201 0000000000000000 ae8e5caa3ca04e85
-0101010101010180 0000000000000000 9cc62df43b6eed74
-0101010101010140 0000000000000000 d863dbb5c59a91a0
-0101010101010120 0000000000000000 a1ab2190545b91d7
-0101010101010110 0000000000000000 0875041e64c570f7
-0101010101010108 0000000000000000 5a594528bebef1cc
-0101010101010104 0000000000000000 fcdb3291de21f0c0
-0101010101010102 0000000000000000 869efd7f9f265a09
-1046913489980131 0000000000000000 88d55e54f54c97b4
-1007103489988020 0000000000000000 0c0cc00c83ea48fd
-10071034c8980120 0000000000000000 83bc8ef3a6570183
-1046103489988020 0000000000000000 df725dcad94ea2e9
-1086911519190101 0000000000000000 e652b53b550be8b0
-1086911519580101 0000000000000000 af527120c485cbb0
-5107b01519580101 0000000000000000 0f04ce393db926d5
-1007b01519190101 0000000000000000 c9f00ffc74079067
-3107915498080101 0000000000000000 7cfd82a593252b4e
-3107919498080101 0000000000000000 cb49a2f9e91363e3
-10079115b9080140 0000000000000000 00b588be70d23f56
-3107911598080140 0000000000000000 406a9a6ab43399ae
-1007d01589980101 0000000000000000 6cb773611dca9ada
-9107911589980101 0000000000000000 67fd21c17dbb5d70
-9107d01589190101 0000000000000000 9592cb4110430787
-1007d01598980120 0000000000000000 a6b7ff68a318ddd3
-1007940498190101 0000000000000000 4d102196c914ca16
-0107910491190401 0000000000000000 2dfa9f4573594965
-0107910491190101 0000000000000000 b46604816c0e0774
-0107940491190401 0000000000000000 6e7e6221a4f34e87
-19079210981a0101 0000000000000000 aa85e74643233199
-1007911998190801 0000000000000000 2e5a19db4d1962d6
-10079119981a0801 0000000000000000 23a866a809d30894
-1007921098190101 0000000000000000 d812d961f017d320
-100791159819010b 0000000000000000 055605816e58608f
-1004801598190101 0000000000000000 abd88e8b1b7716f1
-1004801598190102 0000000000000000 537ac95be69da1e1
-1004801598190108 0000000000000000 aed0f6ae3c25cdd8
-1002911598100104 0000000000000000 b3e35a5ee53e7b8d
-1002911598190104 0000000000000000 61c79c71921a2ef8
-1002911598100201 0000000000000000 e2f5728f0995013c
-1002911698100101 0000000000000000 1aeac39a61f0a464
-7ca110454a1a6e57 01a1d6d039776742 690f5b0d9a26939b
-0131d9619dc1376e 5cd54ca83def57da 7a389d10354bd271
-07a1133e4a0b2686 0248d43806f67172 868ebb51cab4599a
-3849674c2602319e 51454b582ddf440a 7178876e01f19b2a
-04b915ba43feb5b6 42fd443059577fa2 af37fb421f8c4095
-0113b970fd34f2ce 059b5e0851cf143a 86a560f10ec6d85b
-0170f175468fb5e6 0756d8e0774761d2 0cd3da020021dc09
-43297fad38e373fe 762514b829bf486a ea676b2cb7db2b7a
-07a7137045da2a16 3bdd119049372802 dfd64a815caf1a0f
-04689104c2fd3b2f 26955f6835af609a 5c513c9c4886c088
-37d06bb516cb7546 164d5e404f275232 0a2aeeae3ff4ab77
-1f08260d1ac2465e 6b056e18759f5cca ef1bf03e5dfa575a
-584023641aba6176 004bd6ef09176062 88bf0db6d70dee56
-025816164629b007 480d39006ee762f2 a1f9915541020b56
-49793ebc79b3258f 437540c8698f3cfa 6fbf1cafcffd0556
-4fb05e1515ab73a7 072d43a077075292 2f22e49bab7ca1ac
-49e95d6d4ca229bf 02fe55778117f12a 5a6b612cc26cce4a
-018310dc409b26d6 1d9d5c5018f728c2 5f4c038ed12b2e41
-1c587f1c13924fef 305532286d6f295a 63fac0d034d9f793

+ 0 - 172
test/crypt/crypt.out.good

@@ -1,172 +0,0 @@
- K: 0101010101010101 P: 95f8a5e5dd31d900 C: 8000000000000000 OK
- K: 0101010101010101 P: dd7f121ca5015619 C: 4000000000000000 OK
- K: 0101010101010101 P: 2e8653104f3834ea C: 2000000000000000 OK
- K: 0101010101010101 P: 4bd388ff6cd81d4f C: 1000000000000000 OK
- K: 0101010101010101 P: 20b9e767b2fb1456 C: 0800000000000000 OK
- K: 0101010101010101 P: 55579380d77138ef C: 0400000000000000 OK
- K: 0101010101010101 P: 6cc5defaaf04512f C: 0200000000000000 OK
- K: 0101010101010101 P: 0d9f279ba5d87260 C: 0100000000000000 OK
- K: 0101010101010101 P: d9031b0271bd5a0a C: 0080000000000000 OK
- K: 0101010101010101 P: 424250b37c3dd951 C: 0040000000000000 OK
- K: 0101010101010101 P: b8061b7ecd9a21e5 C: 0020000000000000 OK
- K: 0101010101010101 P: f15d0f286b65bd28 C: 0010000000000000 OK
- K: 0101010101010101 P: add0cc8d6e5deba1 C: 0008000000000000 OK
- K: 0101010101010101 P: e6d5f82752ad63d1 C: 0004000000000000 OK
- K: 0101010101010101 P: ecbfe3bd3f591a5e C: 0002000000000000 OK
- K: 0101010101010101 P: f356834379d165cd C: 0001000000000000 OK
- K: 0101010101010101 P: 2b9f982f20037fa9 C: 0000800000000000 OK
- K: 0101010101010101 P: 889de068a16f0be6 C: 0000400000000000 OK
- K: 0101010101010101 P: e19e275d846a1298 C: 0000200000000000 OK
- K: 0101010101010101 P: 329a8ed523d71aec C: 0000100000000000 OK
- K: 0101010101010101 P: e7fce22557d23c97 C: 0000080000000000 OK
- K: 0101010101010101 P: 12a9f5817ff2d65d C: 0000040000000000 OK
- K: 0101010101010101 P: a484c3ad38dc9c19 C: 0000020000000000 OK
- K: 0101010101010101 P: fbe00a8a1ef8ad72 C: 0000010000000000 OK
- K: 0101010101010101 P: 750d079407521363 C: 0000008000000000 OK
- K: 0101010101010101 P: 64feed9c724c2faf C: 0000004000000000 OK
- K: 0101010101010101 P: f02b263b328e2b60 C: 0000002000000000 OK
- K: 0101010101010101 P: 9d64555a9a10b852 C: 0000001000000000 OK
- K: 0101010101010101 P: d106ff0bed5255d7 C: 0000000800000000 OK
- K: 0101010101010101 P: e1652c6b138c64a5 C: 0000000400000000 OK
- K: 0101010101010101 P: e428581186ec8f46 C: 0000000200000000 OK
- K: 0101010101010101 P: aeb5f5ede22d1a36 C: 0000000100000000 OK
- K: 0101010101010101 P: e943d7568aec0c5c C: 0000000080000000 OK
- K: 0101010101010101 P: df98c8276f54b04b C: 0000000040000000 OK
- K: 0101010101010101 P: b160e4680f6c696f C: 0000000020000000 OK
- K: 0101010101010101 P: fa0752b07d9c4ab8 C: 0000000010000000 OK
- K: 0101010101010101 P: ca3a2b036dbc8502 C: 0000000008000000 OK
- K: 0101010101010101 P: 5e0905517bb59bcf C: 0000000004000000 OK
- K: 0101010101010101 P: 814eeb3b91d90726 C: 0000000002000000 OK
- K: 0101010101010101 P: 4d49db1532919c9f C: 0000000001000000 OK
- K: 0101010101010101 P: 25eb5fc3f8cf0621 C: 0000000000800000 OK
- K: 0101010101010101 P: ab6a20c0620d1c6f C: 0000000000400000 OK
- K: 0101010101010101 P: 79e90dbc98f92cca C: 0000000000200000 OK
- K: 0101010101010101 P: 866ecedd8072bb0e C: 0000000000100000 OK
- K: 0101010101010101 P: 8b54536f2f3e64a8 C: 0000000000080000 OK
- K: 0101010101010101 P: ea51d3975595b86b C: 0000000000040000 OK
- K: 0101010101010101 P: caffc6ac4542de31 C: 0000000000020000 OK
- K: 0101010101010101 P: 8dd45a2ddf90796c C: 0000000000010000 OK
- K: 0101010101010101 P: 1029d55e880ec2d0 C: 0000000000008000 OK
- K: 0101010101010101 P: 5d86cb23639dbea9 C: 0000000000004000 OK
- K: 0101010101010101 P: 1d1ca853ae7c0c5f C: 0000000000002000 OK
- K: 0101010101010101 P: ce332329248f3228 C: 0000000000001000 OK
- K: 0101010101010101 P: 8405d1abe24fb942 C: 0000000000000800 OK
- K: 0101010101010101 P: e643d78090ca4207 C: 0000000000000400 OK
- K: 0101010101010101 P: 48221b9937748a23 C: 0000000000000200 OK
- K: 0101010101010101 P: dd7c0bbd61fafd54 C: 0000000000000100 OK
- K: 0101010101010101 P: 2fbc291a570db5c4 C: 0000000000000080 OK
- K: 0101010101010101 P: e07c30d7e4e26e12 C: 0000000000000040 OK
- K: 0101010101010101 P: 0953e2258e8e90a1 C: 0000000000000020 OK
- K: 0101010101010101 P: 5b711bc4ceebf2ee C: 0000000000000010 OK
- K: 0101010101010101 P: cc083f1e6d9e85f6 C: 0000000000000008 OK
- K: 0101010101010101 P: d2fd8867d50d2dfe C: 0000000000000004 OK
- K: 0101010101010101 P: 06e7ea22ce92708f C: 0000000000000002 OK
- K: 0101010101010101 P: 166b40b44aba4bd6 C: 0000000000000001 OK
- K: 8001010101010101 P: 0000000000000000 C: 95a8d72813daa94d OK
- K: 4001010101010101 P: 0000000000000000 C: 0eec1487dd8c26d5 OK
- K: 2001010101010101 P: 0000000000000000 C: 7ad16ffb79c45926 OK
- K: 1001010101010101 P: 0000000000000000 C: d3746294ca6a6cf3 OK
- K: 0801010101010101 P: 0000000000000000 C: 809f5f873c1fd761 OK
- K: 0401010101010101 P: 0000000000000000 C: c02faffec989d1fc OK
- K: 0201010101010101 P: 0000000000000000 C: 4615aa1d33e72f10 OK
- K: 0180010101010101 P: 0000000000000000 C: 2055123350c00858 OK
- K: 0140010101010101 P: 0000000000000000 C: df3b99d6577397c8 OK
- K: 0120010101010101 P: 0000000000000000 C: 31fe17369b5288c9 OK
- K: 0110010101010101 P: 0000000000000000 C: dfdd3cc64dae1642 OK
- K: 0108010101010101 P: 0000000000000000 C: 178c83ce2b399d94 OK
- K: 0104010101010101 P: 0000000000000000 C: 50f636324a9b7f80 OK
- K: 0102010101010101 P: 0000000000000000 C: a8468ee3bc18f06d OK
- K: 0101800101010101 P: 0000000000000000 C: a2dc9e92fd3cde92 OK
- K: 0101400101010101 P: 0000000000000000 C: cac09f797d031287 OK
- K: 0101200101010101 P: 0000000000000000 C: 90ba680b22aeb525 OK
- K: 0101100101010101 P: 0000000000000000 C: ce7a24f350e280b6 OK
- K: 0101080101010101 P: 0000000000000000 C: 882bff0aa01a0b87 OK
- K: 0101040101010101 P: 0000000000000000 C: 25610288924511c2 OK
- K: 0101020101010101 P: 0000000000000000 C: c71516c29c75d170 OK
- K: 0101018001010101 P: 0000000000000000 C: 5199c29a52c9f059 OK
- K: 0101014001010101 P: 0000000000000000 C: c22f0a294a71f29f OK
- K: 0101012001010101 P: 0000000000000000 C: ee371483714c02ea OK
- K: 0101011001010101 P: 0000000000000000 C: a81fbd448f9e522f OK
- K: 0101010801010101 P: 0000000000000000 C: 4f644c92e192dfed OK
- K: 0101010401010101 P: 0000000000000000 C: 1afa9a66a6df92ae OK
- K: 0101010201010101 P: 0000000000000000 C: b3c1cc715cb879d8 OK
- K: 0101010180010101 P: 0000000000000000 C: 19d032e64ab0bd8b OK
- K: 0101010140010101 P: 0000000000000000 C: 3cfaa7a7dc8720dc OK
- K: 0101010120010101 P: 0000000000000000 C: b7265f7f447ac6f3 OK
- K: 0101010110010101 P: 0000000000000000 C: 9db73b3c0d163f54 OK
- K: 0101010108010101 P: 0000000000000000 C: 8181b65babf4a975 OK
- K: 0101010104010101 P: 0000000000000000 C: 93c9b64042eaa240 OK
- K: 0101010102010101 P: 0000000000000000 C: 5570530829705592 OK
- K: 0101010101800101 P: 0000000000000000 C: 8638809e878787a0 OK
- K: 0101010101400101 P: 0000000000000000 C: 41b9a79af79ac208 OK
- K: 0101010101200101 P: 0000000000000000 C: 7a9be42f2009a892 OK
- K: 0101010101100101 P: 0000000000000000 C: 29038d56ba6d2745 OK
- K: 0101010101080101 P: 0000000000000000 C: 5495c6abf1e5df51 OK
- K: 0101010101040101 P: 0000000000000000 C: ae13dbd561488933 OK
- K: 0101010101020101 P: 0000000000000000 C: 024d1ffa8904e389 OK
- K: 0101010101018001 P: 0000000000000000 C: d1399712f99bf02e OK
- K: 0101010101014001 P: 0000000000000000 C: 14c1d7c1cffec79e OK
- K: 0101010101012001 P: 0000000000000000 C: 1de5279dae3bed6f OK
- K: 0101010101011001 P: 0000000000000000 C: e941a33f85501303 OK
- K: 0101010101010801 P: 0000000000000000 C: da99dbbc9a03f379 OK
- K: 0101010101010401 P: 0000000000000000 C: b7fc92f91d8e92e9 OK
- K: 0101010101010201 P: 0000000000000000 C: ae8e5caa3ca04e85 OK
- K: 0101010101010180 P: 0000000000000000 C: 9cc62df43b6eed74 OK
- K: 0101010101010140 P: 0000000000000000 C: d863dbb5c59a91a0 OK
- K: 0101010101010120 P: 0000000000000000 C: a1ab2190545b91d7 OK
- K: 0101010101010110 P: 0000000000000000 C: 0875041e64c570f7 OK
- K: 0101010101010108 P: 0000000000000000 C: 5a594528bebef1cc OK
- K: 0101010101010104 P: 0000000000000000 C: fcdb3291de21f0c0 OK
- K: 0101010101010102 P: 0000000000000000 C: 869efd7f9f265a09 OK
- K: 1046913489980131 P: 0000000000000000 C: 88d55e54f54c97b4 OK
- K: 1007103489988020 P: 0000000000000000 C: 0c0cc00c83ea48fd OK
- K: 10071034c8980120 P: 0000000000000000 C: 83bc8ef3a6570183 OK
- K: 1046103489988020 P: 0000000000000000 C: df725dcad94ea2e9 OK
- K: 1086911519190101 P: 0000000000000000 C: e652b53b550be8b0 OK
- K: 1086911519580101 P: 0000000000000000 C: af527120c485cbb0 OK
- K: 5107b01519580101 P: 0000000000000000 C: 0f04ce393db926d5 OK
- K: 1007b01519190101 P: 0000000000000000 C: c9f00ffc74079067 OK
- K: 3107915498080101 P: 0000000000000000 C: 7cfd82a593252b4e OK
- K: 3107919498080101 P: 0000000000000000 C: cb49a2f9e91363e3 OK
- K: 10079115b9080140 P: 0000000000000000 C: 00b588be70d23f56 OK
- K: 3107911598080140 P: 0000000000000000 C: 406a9a6ab43399ae OK
- K: 1007d01589980101 P: 0000000000000000 C: 6cb773611dca9ada OK
- K: 9107911589980101 P: 0000000000000000 C: 67fd21c17dbb5d70 OK
- K: 9107d01589190101 P: 0000000000000000 C: 9592cb4110430787 OK
- K: 1007d01598980120 P: 0000000000000000 C: a6b7ff68a318ddd3 OK
- K: 1007940498190101 P: 0000000000000000 C: 4d102196c914ca16 OK
- K: 0107910491190401 P: 0000000000000000 C: 2dfa9f4573594965 OK
- K: 0107910491190101 P: 0000000000000000 C: b46604816c0e0774 OK
- K: 0107940491190401 P: 0000000000000000 C: 6e7e6221a4f34e87 OK
- K: 19079210981a0101 P: 0000000000000000 C: aa85e74643233199 OK
- K: 1007911998190801 P: 0000000000000000 C: 2e5a19db4d1962d6 OK
- K: 10079119981a0801 P: 0000000000000000 C: 23a866a809d30894 OK
- K: 1007921098190101 P: 0000000000000000 C: d812d961f017d320 OK
- K: 100791159819010b P: 0000000000000000 C: 055605816e58608f OK
- K: 1004801598190101 P: 0000000000000000 C: abd88e8b1b7716f1 OK
- K: 1004801598190102 P: 0000000000000000 C: 537ac95be69da1e1 OK
- K: 1004801598190108 P: 0000000000000000 C: aed0f6ae3c25cdd8 OK
- K: 1002911598100104 P: 0000000000000000 C: b3e35a5ee53e7b8d OK
- K: 1002911598190104 P: 0000000000000000 C: 61c79c71921a2ef8 OK
- K: 1002911598100201 P: 0000000000000000 C: e2f5728f0995013c OK
- K: 1002911698100101 P: 0000000000000000 C: 1aeac39a61f0a464 OK
- K: 7ca110454a1a6e57 P: 01a1d6d039776742 C: 690f5b0d9a26939b OK
- K: 0131d9619dc1376e P: 5cd54ca83def57da C: 7a389d10354bd271 OK
- K: 07a1133e4a0b2686 P: 0248d43806f67172 C: 868ebb51cab4599a OK
- K: 3849674c2602319e P: 51454b582ddf440a C: 7178876e01f19b2a OK
- K: 04b915ba43feb5b6 P: 42fd443059577fa2 C: af37fb421f8c4095 OK
- K: 0113b970fd34f2ce P: 059b5e0851cf143a C: 86a560f10ec6d85b OK
- K: 0170f175468fb5e6 P: 0756d8e0774761d2 C: 0cd3da020021dc09 OK
- K: 43297fad38e373fe P: 762514b829bf486a C: ea676b2cb7db2b7a OK
- K: 07a7137045da2a16 P: 3bdd119049372802 C: dfd64a815caf1a0f OK
- K: 04689104c2fd3b2f P: 26955f6835af609a C: 5c513c9c4886c088 OK
- K: 37d06bb516cb7546 P: 164d5e404f275232 C: 0a2aeeae3ff4ab77 OK
- K: 1f08260d1ac2465e P: 6b056e18759f5cca C: ef1bf03e5dfa575a OK
- K: 584023641aba6176 P: 004bd6ef09176062 C: 88bf0db6d70dee56 OK
- K: 025816164629b007 P: 480d39006ee762f2 C: a1f9915541020b56 OK
- K: 49793ebc79b3258f P: 437540c8698f3cfa C: 6fbf1cafcffd0556 OK
- K: 4fb05e1515ab73a7 P: 072d43a077075292 C: 2f22e49bab7ca1ac OK
- K: 49e95d6d4ca229bf P: 02fe55778117f12a C: 5a6b612cc26cce4a OK
- K: 018310dc409b26d6 P: 1d9d5c5018f728c2 C: 5f4c038ed12b2e41 OK
- K: 1c587f1c13924fef P: 305532286d6f295a C: 63fac0d034d9f793 OK
-Passed DES validation suite

+ 0 - 19
test/crypt/md5c-test.c

@@ -1,19 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <crypt.h>
-
-int
-main (int argc, char *argv[])
-{
-  const char salt[] = "$1$saltstring";
-  char *cp;
-
-  cp = crypt ("Hello world!", salt);
-  if (strcmp ("$1$saltstri$YMyguxXMBpd2TEZ.vS/3q1", cp)) {
-      fprintf(stderr, "Failed md5 crypt test!\n");
-      return EXIT_FAILURE;
-  }
-  fprintf(stderr, "Passed md5 crypt test!\n");
-  return EXIT_SUCCESS;
-}

+ 0 - 62
test/crypt/sha256c-test.c

@@ -1,62 +0,0 @@
-#include <crypt.h>
-#include <stdio.h>
-#include <string.h>
-
-static const struct
-{
-  const char *salt;
-  const char *input;
-  const char *expected;
-} tests[] =
-{
-  { "$5$saltstring", "Hello world!",
-    "$5$saltstring$5B8vYYiY.CVt1RlTTf8KbXBH3hsxY/GNooZaBBGWEc5" },
-  { "$5$rounds=10000$saltstringsaltstring", "Hello world!",
-    "$5$rounds=10000$saltstringsaltst$3xv.VbSHBb41AL9AvLeujZkZRBAwqFMz2."
-    "opqey6IcA" },
-  { "$5$rounds=5000$toolongsaltstring", "This is just a test",
-    "$5$rounds=5000$toolongsaltstrin$Un/5jzAHMgOGZ5.mWJpuVolil07guHPvOW8"
-    "mGRcvxa5" },
-  { "$5$rounds=1400$anotherlongsaltstring",
-    "a very much longer text to encrypt.  This one even stretches over more"
-    "than one line.",
-    "$5$rounds=1400$anotherlongsalts$Rx.j8H.h8HjEDGomFU8bDkXm3XIUnzyxf12"
-    "oP84Bnq1" },
-  { "$5$rounds=77777$short",
-    "we have a short salt string but not a short password",
-    "$5$rounds=77777$short$JiO1O3ZpDAxGJeaDIuqCoEFysAe1mZNJRs3pw0KQRd/" },
-  { "$5$rounds=123456$asaltof16chars..", "a short string",
-    "$5$rounds=123456$asaltof16chars..$gP3VQ/6X7UUEW3HkBn2w1/Ptq2jxPyzV/"
-    "cZKmF/wJvD" },
-  { "$5$rounds=10$roundstoolow", "the minimum number is still observed",
-    "$5$rounds=1000$roundstoolow$yfvwcWrQ8l/K0DAWyuPMDNHpIVlTQebY9l/gL97"
-    "2bIC" },
-};
-#define ntests (sizeof (tests) / sizeof (tests[0]))
-
-
-
-static int
-do_test (void)
-{
-  int result = 0;
-  int i;
-
-  for (i = 0; i < ntests; ++i)
-    {
-      char *cp = crypt (tests[i].input, tests[i].salt);
-
-      if (strcmp (cp, tests[i].expected) != 0)
-	{
-	  printf ("test %d: expected \"%s\", got \"%s\"\n",
-		  i, tests[i].expected, cp);
-	  result = 1;
-	}
-    }
-
-  return result;
-}
-
-#define TIMEOUT 6
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"

+ 0 - 63
test/crypt/sha512c-test.c

@@ -1,63 +0,0 @@
-#include <crypt.h>
-#include <stdio.h>
-#include <string.h>
-
-static const struct
-{
-  const char *salt;
-  const char *input;
-  const char *expected;
-} tests[] =
-{
-  { "$6$saltstring", "Hello world!",
-    "$6$saltstring$svn8UoSVapNtMuq1ukKS4tPQd8iKwSMHWjl/O817G3uBnIFNjnQJu"
-    "esI68u4OTLiBFdcbYEdFCoEOfaS35inz1" },
-  { "$6$rounds=10000$saltstringsaltstring", "Hello world!",
-    "$6$rounds=10000$saltstringsaltst$OW1/O6BYHV6BcXZu8QVeXbDWra3Oeqh0sb"
-    "HbbMCVNSnCM/UrjmM0Dp8vOuZeHBy/YTBmSK6H9qs/y3RnOaw5v." },
-  { "$6$rounds=5000$toolongsaltstring", "This is just a test",
-    "$6$rounds=5000$toolongsaltstrin$lQ8jolhgVRVhY4b5pZKaysCLi0QBxGoNeKQ"
-    "zQ3glMhwllF7oGDZxUhx1yxdYcz/e1JSbq3y6JMxxl8audkUEm0" },
-  { "$6$rounds=1400$anotherlongsaltstring",
-    "a very much longer text to encrypt.  This one even stretches over more"
-    "than one line.",
-    "$6$rounds=1400$anotherlongsalts$POfYwTEok97VWcjxIiSOjiykti.o/pQs.wP"
-    "vMxQ6Fm7I6IoYN3CmLs66x9t0oSwbtEW7o7UmJEiDwGqd8p4ur1" },
-  { "$6$rounds=77777$short",
-    "we have a short salt string but not a short password",
-    "$6$rounds=77777$short$WuQyW2YR.hBNpjjRhpYD/ifIw05xdfeEyQoMxIXbkvr0g"
-    "ge1a1x3yRULJ5CCaUeOxFmtlcGZelFl5CxtgfiAc0" },
-  { "$6$rounds=123456$asaltof16chars..", "a short string",
-    "$6$rounds=123456$asaltof16chars..$BtCwjqMJGx5hrJhZywWvt0RLE8uZ4oPwc"
-    "elCjmw2kSYu.Ec6ycULevoBK25fs2xXgMNrCzIMVcgEJAstJeonj1" },
-  { "$6$rounds=10$roundstoolow", "the minimum number is still observed",
-    "$6$rounds=1000$roundstoolow$kUMsbe306n21p9R.FRkW3IGn.S9NPN0x50YhH1x"
-    "hLsPuWGsUSklZt58jaTfF4ZEQpyUNGc0dqbpBYYBaHHrsX." },
-};
-#define ntests (sizeof (tests) / sizeof (tests[0]))
-
-
-static int
-do_test (void)
-{
-  int result = 0;
-  int i;
-
-  for (i = 0; i < ntests; ++i)
-    {
-      char *cp = crypt (tests[i].input, tests[i].salt);
-
-      if (strcmp (cp, tests[i].expected) != 0)
-	{
-	  printf ("test %d: expected \"%s\", got \"%s\"\n",
-		  i, tests[i].expected, cp);
-	  result = 1;
-	}
-    }
-
-  return result;
-}
-
-#define TIMEOUT 6
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"

+ 0 - 8
test/ctype/Makefile

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

+ 0 - 4
test/ctype/Makefile.in

@@ -1,4 +0,0 @@
-# uClibc ctype tests
-# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
-TESTS := ctype

+ 0 - 250
test/ctype/ctype.c

@@ -1,250 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/*
- * Test application for functions defined in ctype.h
- * Copyright (C) 2000-2006 by Erik Andersen <andersen@uclibc.org>
- *
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <ctype.h>
-#include "../testsuite.h"
-
-
-int main( int argc, char **argv)
-{
-	int i, c;
-
-
-    init_testsuite("Testing functions defined in ctype.h\n");
-
-	/* isalnum() */
-	{
-		int buffer[]={ '1', '4', 'a', 'z', 'A', 'Z', '5', -1};
-		for(i=0; buffer[i]!=-1; i++) {
-			c = buffer[i];
-			TEST( isalnum(c)!=0);
-		}
-	}
-	{
-		int buffer[]={  2, 128, 254, '\n', -1};
-		for(i=0; buffer[i]!=-1; i++) {
-			c = buffer[i];
-			TEST( isalnum(c)==0);
-		}
-	}
-
-
-
-	/* isalpha() */
-	{
-		int buffer[]={ 'a', 'z', 'A', 'Z', -1};
-		for(i=0; buffer[i]!=-1; i++) {
-			c = buffer[i];
-			TEST( isalpha(c)!=0);
-		}
-	}
-	{
-		int buffer[]={  2, 63, 128, 254, '\n', -1};
-		for(i=0; buffer[i]!=-1; i++) {
-			c = buffer[i];
-			TEST( isalpha(c)==0);
-		}
-	}
-
-
-
-#ifdef __UCLIBC_SUSV4_LEGACY__
-	/* isascii() */
-	{
-		int buffer[]={ 'a', 'z', 'A', 'Z', '\n', -1};
-		for(i=0; buffer[i]!=-1; i++) {
-			c = buffer[i];
-			TEST( isascii(c)!=0);
-		}
-	}
-	{
-		int buffer[]={  128, 254, -1};
-		for(i=0; buffer[i]!=-1; i++) {
-			c = buffer[i];
-			TEST( isascii(c)==0);
-		}
-	}
-#endif
-
-
-	/* iscntrl() */
-	{
-		int buffer[]={ 0x7F, 6, '\t', '\n', 0x7F, -1};
-		for(i=0; buffer[i]!=-1; i++) {
-			c = buffer[i];
-			TEST( iscntrl(c)!=0);
-		}
-	}
-	{
-		int buffer[]={  63, 128, 254, -1};
-		for(i=0; buffer[i]!=-1; i++) {
-			c = buffer[i];
-			TEST( iscntrl(c)==0);
-		}
-	}
-
-
-	/* isdigit() */
-	{
-		int buffer[]={ '1', '5', '7', '9', -1};
-		for(i=0; buffer[i]!=-1; i++) {
-			c = buffer[i];
-			TEST( isdigit(c)!=0);
-		}
-	}
-	{
-		int buffer[]={  2, 'a', 'z', 'A', 'Z', 63, 128, 254, '\n', -1};
-		for(i=0; buffer[i]!=-1; i++) {
-			c = buffer[i];
-			TEST( isdigit(c)==0);
-		}
-	}
-
-
-
-	/* isgraph() */
-	{
-		int buffer[]={ ')', '~', '9', -1};
-		for(i=0; buffer[i]!=-1; i++) {
-			c = buffer[i];
-			TEST( isgraph(c)!=0);
-		}
-	}
-	{
-		int buffer[]={ 9, ' ', '\t', '\n', 200, 0x7F, -1};
-		for(i=0; buffer[i]!=-1; i++) {
-			c = buffer[i];
-			TEST( isgraph(c)==0);
-		}
-	}
-
-
-	/* islower() */
-	{
-		int buffer[]={ 'a', 'g', 'z', -1};
-		for(i=0; buffer[i]!=-1; i++) {
-			c = buffer[i];
-			TEST( islower(c)!=0);
-		}
-	}
-	{
-		int buffer[]={ 9, 'A', 'Z', 128, 254, ' ', '\t', '\n', 0x7F, -1};
-		for(i=0; buffer[i]!=-1; i++) {
-			c = buffer[i];
-			TEST( islower(c)==0);
-		}
-	}
-
-
-	/* isprint() */
-	{
-		int buffer[]={ ' ', ')', '~', '9', -1};
-		for(i=0; buffer[i]!=-1; i++) {
-			c = buffer[i];
-			TEST( isprint(c)!=0);
-		}
-	}
-	{
-		int buffer[]={ '\b', '\t', '\n', 9, 128, 254, 200, 0x7F, -1};
-		for(i=0; buffer[i]!=-1; i++) {
-			c = buffer[i];
-			TEST( isprint(c)==0);
-		}
-	}
-
-
-	/* ispunct() */
-	{
-		int buffer[]={ '.', '#', '@', ';', -1};
-		for(i=0; buffer[i]!=-1; i++) {
-			c = buffer[i];
-			TEST( ispunct(c)!=0);
-		}
-	}
-	{
-		int buffer[]={  2, 'a', 'Z', '1', 128, 254, '\n', -1};
-		for(i=0; buffer[i]!=-1; i++) {
-			c = buffer[i];
-			TEST( ispunct(c)==0);
-		}
-	}
-
-
-	/* isspace() */
-	{
-		int buffer[]={ ' ', '\t', '\r', '\v', '\n', -1};
-		for(i=0; buffer[i]!=-1; i++) {
-			c = buffer[i];
-			TEST( isspace(c)!=0);
-		}
-	}
-	{
-		int buffer[]={  2, 'a', 'Z', '1', 128, 254, -1};
-		for(i=0; buffer[i]!=-1; i++) {
-			c = buffer[i];
-			TEST( isspace(c)==0);
-		}
-	}
-
-
-	/* isupper() */
-	{
-		int buffer[]={ 'A', 'G', 'Z', -1};
-		for(i=0; buffer[i]!=-1; i++) {
-			c = buffer[i];
-			TEST( isupper(c)!=0);
-		}
-	}
-	{
-		int buffer[]={  2, 'a', 'z', '1', 128, 254, -1};
-		for(i=0; buffer[i]!=-1; i++) {
-			c = buffer[i];</