Browse Source

rework most tests to work as standalone package

Waldemar Brodkorb 7 years ago
parent
commit
e65912f8b2
77 changed files with 116 additions and 797 deletions
  1. 7 51
      test/Makefile
  2. 0 87
      test/README
  3. 5 71
      test/Rules.mak
  4. 7 37
      test/Test.mak
  5. 1 1
      test/argp/Makefile.in
  6. 1 1
      test/args/Makefile.in
  7. 1 1
      test/assert/Makefile.in
  8. 1 8
      test/crypt/Makefile.in
  9. 3 0
      test/crypt/sha256c-test.c
  10. 3 0
      test/crypt/sha512c-test.c
  11. 1 1
      test/ctype/Makefile.in
  12. 1 4
      test/dlopen/Makefile.in
  13. 1 16
      test/inet/Makefile.in
  14. 1 1
      test/librt/Makefile.in
  15. 1 2
      test/locale-mbwc/Makefile.in
  16. 1 2
      test/locale/Makefile.in
  17. 1 1
      test/malloc/Makefile.in
  18. 1 7
      test/math/Makefile.in
  19. 1 1
      test/misc/Makefile
  20. 1 21
      test/misc/Makefile.in
  21. 1 1
      test/mmap/Makefile.in
  22. 14 66
      test/nptl/Makefile.in
  23. 3 1
      test/nptl/tst-cancel25.c
  24. 1 1
      test/nptl/tst-cancel4.c
  25. 6 1
      test/nptl/tst-getpid1.c
  26. 26 10
      test/nptl/tst-sem11.c
  27. 5 2
      test/nptl/tst-signal7.c
  28. 2 12
      test/nptl/tst-tls1.c
  29. 2 12
      test/nptl/tst-tls2.c
  30. 0 2
      test/nptl/tst-tls3.c
  31. 0 2
      test/nptl/tst-tls3mod.c
  32. 0 1
      test/nptl/tst-tls4.c
  33. 0 1
      test/nptl/tst-tls4moda.c
  34. 0 1
      test/nptl/tst-tls4modb.c
  35. 0 1
      test/nptl/tst-tls5.h
  36. 1 1
      test/nptl/tst-typesizes.c
  37. 1 1
      test/pthread/Makefile.in
  38. 1 1
      test/pwd_grp/Makefile.in
  39. 1 1
      test/rpc/Makefile.in
  40. 2 1
      test/rpc/getrpcent.c
  41. 1 1
      test/signal/Makefile.in
  42. 1 18
      test/silly/Makefile.in
  43. 0 1
      test/silly/tst-atomic.c
  44. 1 1
      test/stat/Makefile.in
  45. 1 1
      test/stdio/Makefile.in
  46. 1 1
      test/stdlib/Makefile.in
  47. 1 1
      test/string/Makefile.in
  48. 1 1
      test/time/Makefile.in
  49. 1 1
      test/tls/Makefile
  50. 1 29
      test/tls/Makefile.in
  51. 0 1
      test/tls/tst-tls-at-ctor.c
  52. 0 2
      test/tls/tst-tls1.c
  53. 1 1
      test/tls/tst-tls10.c
  54. 0 1
      test/tls/tst-tls10.h
  55. 0 2
      test/tls/tst-tls14.c
  56. 0 2
      test/tls/tst-tls2.c
  57. 0 2
      test/tls/tst-tls3.c
  58. 0 2
      test/tls/tst-tls4.c
  59. 0 2
      test/tls/tst-tls5.c
  60. 0 7
      test/tls/tst-tls6.c
  61. 0 7
      test/tls/tst-tls7.c
  62. 0 7
      test/tls/tst-tls8.c
  63. 0 2
      test/tls/tst-tls9.c
  64. 0 1
      test/tls/tst-tlsmod-at-ctor.c
  65. 0 2
      test/tls/tst-tlsmod1.c
  66. 0 2
      test/tls/tst-tlsmod13.c
  67. 0 2
      test/tls/tst-tlsmod13a.c
  68. 0 2
      test/tls/tst-tlsmod14a.c
  69. 0 2
      test/tls/tst-tlsmod16a.c
  70. 0 2
      test/tls/tst-tlsmod16b.c
  71. 0 2
      test/tls/tst-tlsmod2.c
  72. 0 2
      test/tls/tst-tlsmod3.c
  73. 0 2
      test/tls/tst-tlsmod4.c
  74. 0 2
      test/tls/tst-tlsmod5.c
  75. 0 2
      test/tls/tst-tlsmod6.c
  76. 1 9
      test/unistd/Makefile.in
  77. 0 240
      test/unistd/tst-getconf.sh

+ 7 - 51
test/Makefile

@@ -1,9 +1,5 @@
-# Makefile for uClibc
-#
-# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
-#
+# Makefile for uClibc-ng-test
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-#
 
 top_srcdir=../
 top_builddir=../
@@ -12,41 +8,9 @@ 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))
+
+ifeq ($(NO_LOCALE),1)
+DIRS := $(filter-out locale,$(DIRS))
 endif
 
 test check all: run
@@ -57,13 +21,7 @@ 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
+compile: subdirs_compile
 
 clean: subdirs_clean
 
@@ -78,12 +36,10 @@ $(patsubst %, _dir_%, $(DIRS)) : dummy
 
 $(patsubst %, _dirrun_%, $(DIRS)) : dummy
 	$(Q)$(MAKE) -C $(patsubst _dirrun_%, %, $@) run \
-		UCLIBCNG_TEST_SUBDIR=$(strip $(patsubst _dirrun_%, %, $@)) \
-		KCONFIG_CONFIG=$(KCONFIG_CONFIG)
+		UCLIBCNG_TEST_SUBDIR=$(strip $(patsubst _dirrun_%, %, $@))
 
 $(patsubst %, _dircompile_%, $(DIRS)) : dummy
-	$(Q)$(MAKE) -C $(patsubst _dircompile_%, %, $@) compile \
-		KCONFIG_CONFIG=$(KCONFIG_CONFIG)
+	$(Q)$(MAKE) -C $(patsubst _dircompile_%, %, $@) compile
 
 $(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
 	$(Q)$(MAKE) -C $(patsubst _dirclean_%, %, $@) clean

+ 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".

+ 5 - 71
test/Rules.mak

@@ -1,9 +1,5 @@
-# Rules.mak for uClibc test subdirs
-#
-# Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
-#
+# Rules.mak for uClibc-ng-test subdirs
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-#
 
 .SUFFIXES:
 
@@ -13,30 +9,7 @@ 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
@@ -61,20 +34,10 @@ 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         ?= 
+CFLAGS         += $(XCOMMON_CFLAGS)
 CFLAGS         += $(OPTIMIZATION) $(CPU_CFLAGS) $(XWARNINGS)
 
 $(eval $(call check-gcc-var,-Wno-missing-field-initializers))
@@ -84,37 +47,8 @@ CFLAGS         += $(CFLAG_-Wno-missing-field-initializers)
 # 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
+#LDFLAGS := $(CPU_LDFLAGS-y) -Wl,-z,now
+#LDFLAGS += -Wl,-rpath,$(shell pwd)
 
 ifneq ($(strip $(UCLIBC_EXTRA_CFLAGS)),"")
 CFLAGS += $(call qstrip,$(UCLIBC_EXTRA_CFLAGS))

+ 7 - 37
test/Test.mak

@@ -1,7 +1,4 @@
 # 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))'
@@ -20,29 +17,16 @@ 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))
+TARGETS := $(TESTS)
 
-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)
+CLEAN_TARGETS := $(TARGETS)
+CLEAN_TARGETS += $(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 += $(TESTS_DISABLED)
 TARGETS += $(SHELL_TESTS)
 CFLAGS += $(CFLAGS_$(notdir $(CURDIR)))
 ifeq (1,$(UCLIBCNG_GENERATE_TESTRUNNER))
@@ -91,8 +75,7 @@ endef
 test check all: run
 run: $(RUN_TARGETS)
 
-$(addsuffix .exe,$(U_TARGETS)): SIMULATOR:=$(SIMULATOR_uclibc)
-$(addsuffix .exe,$(G_TARGETS)): SIMULATOR:=$(SIMULATOR_glibc)
+$(addsuffix .exe,$(TARGETS)): SIMULATOR:=$(SIMULATOR)
 $(RUN_TARGETS):
 ifeq (1,$(UCLIBCNG_GENERATE_TESTRUNNER))
 	$(Q)\
@@ -106,32 +89,19 @@ ifeq (1,$(UCLIBCNG_GENERATE_TESTRUNNER))
 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))
+TARGET_SRCS := $(addsuffix .c,$(TARGETS))
 
 MAKE_SRCS := $(wildcard Makefile.in) $(TESTDIR)Makefile $(TESTDIR)Rules.mak $(TESTDIR)Test.mak
 
-$(U_TARGETS): $(U_TARGET_SRCS) $(MAKE_SRCS)
+$(TARGETS): $(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_$(@)))

+ 1 - 1
test/argp/Makefile.in

@@ -1,4 +1,4 @@
-# uClibc argp tests
+# uClibc-ng argp tests
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 
 TESTS := $(addprefix argp-, ex1 ex2 ex3 ex4 test) \

+ 1 - 1
test/args/Makefile.in

@@ -1,4 +1,4 @@
-# uClibc args tests
+# uClibc-ng 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

+ 1 - 1
test/assert/Makefile.in

@@ -1,4 +1,4 @@
-# uClibc assert tests
+# uClibc-ng assert tests
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 
 RET_assert     := 134

+ 1 - 8
test/crypt/Makefile.in

@@ -1,15 +1,8 @@
-# uClibc crypt tests
+# uClibc-ng 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

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

@@ -40,6 +40,8 @@ static int
 do_test (void)
 {
   int result = 0;
+
+#if __UCLIBC_HAS_SHA256_CRYPT_IMPL__
   int i;
 
   for (i = 0; i < ntests; ++i)
@@ -53,6 +55,7 @@ do_test (void)
 	  result = 1;
 	}
     }
+#endif
 
   return result;
 }

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

@@ -41,6 +41,8 @@ static int
 do_test (void)
 {
   int result = 0;
+
+#if __UCLIBC_HAS_SHA512_CRYPT_IMPL__
   int i;
 
   for (i = 0; i < ntests; ++i)
@@ -54,6 +56,7 @@ do_test (void)
 	  result = 1;
 	}
     }
+#endif
 
   return result;
 }

+ 1 - 1
test/ctype/Makefile.in

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

+ 1 - 4
test/dlopen/Makefile.in

@@ -1,9 +1,6 @@
-# uClibc dlopen tests
+# uClibc-ng dlopen tests
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 
-# rules need a little love to work with glibc ...
-export UCLIBC_ONLY := 1
-
 TESTS := dltest dltest2 dlstatic test1 test2 test3 dlundef dlafk dladdr \
 	testscope nodelete nodelete1 tst-origin
 

+ 1 - 16
test/inet/Makefile.in

@@ -1,17 +1,2 @@
-# uClibc inet tests
+# uClibc-ng inet tests
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-#
-ifeq ($(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6),)
-TESTS_DISABLED := bug-if1 gethost_r-align gethostid if_nameindex tst-aton \
-	tst-network tst-ntoa test-ifaddrs
-endif
-
-ifeq ($(UCLIBC_HAS_SOCKET)$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6),)
-TESTS_DISABLED += tst-ether_aton tst-ethers tst-ethers-line
-endif
-
-ifeq ($(UCLIBC_HAS_RESOLVER_SUPPORT),)
-TESTS_DISABLED += tst-res
-else
-LDFLAGS_tst-res_glibc := -lresolv # assume it's glibc or somebody with that lib
-endif

+ 1 - 1
test/librt/Makefile.in

@@ -1,4 +1,4 @@
-# uClibc shm tests
+# uClibc-ng shm tests
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 
 LDFLAGS_shmtest := -lrt

+ 1 - 2
test/locale-mbwc/Makefile.in

@@ -1,6 +1,5 @@
-# uClibc locale tests
+# uClibc-ng locale tests
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-#	 tst_mbtowc tst_strcoll tst_strfmon tst_strxfrm    \
 
 TESTS := tst_iswalnum tst_iswalpha tst_iswcntrl          \
 	 tst_iswctype tst_iswdigit tst_iswgraph          \

+ 1 - 2
test/locale/Makefile.in

@@ -1,6 +1,5 @@
-# uClibc locale tests
+# uClibc-ng locale tests
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-#	 tst_mbtowc tst_strcoll tst_strfmon tst_strxfrm    \
 
 TESTS := bug-iconv-trans bug-usesetlocale collate-test dump-ctype \
 	 gen-unicode-ctype show-ucs-data tst-ctype \

+ 1 - 1
test/malloc/Makefile.in

@@ -1,4 +1,4 @@
-# uClibc malloc tests
+# uClibc-ng malloc tests
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 
 TESTS_DISABLED := time_malloc

+ 1 - 7
test/math/Makefile.in

@@ -1,4 +1,4 @@
-# uClibc math tests
+# uClibc-ng math tests
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 
 # libm-test.c is a generated file used by the tests internally so skip it
@@ -10,12 +10,6 @@ ifeq ($(UCLIBC_HAS_LONG_DOUBLE_MATH),)
 TESTS_DISABLED += test-ldouble test-ildoubl compile_test c99_test
 CFLAGS_basic-test := -DNO_LONG_DOUBLE
 endif
-ifeq ($(DO_C99_MATH),)
-TESTS_DISABLED += test-float test-ifloat test-double test-idouble rint signgam ilogb
-endif
-ifeq ($(UCLIBC_HAS_FPU),)
-TESTS_DISABLED += test-fpucw
-endif
 
 DODIFF_rint     := 1
 DODIFF_signgam  := 1

+ 1 - 1
test/misc/Makefile

@@ -1,4 +1,4 @@
-# uClibc misc tests
+# uClibc-ng misc tests
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 
 top_builddir=../../

+ 1 - 21
test/misc/Makefile.in

@@ -1,4 +1,4 @@
-# uClibc misc tests
+# uClibc-ng misc tests
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 
 TESTS_DISABLED := outb tst-fnmatch bug-glob1 tst-gnuglob
@@ -7,28 +7,8 @@ ifeq ($(TARGET_avr32),y)
 TESTS_DISABLED += tst-inotify
 endif
 
-ifeq  ($(UCLIBC_HAS_LFS),)
-TESTS_DISABLED += dirent64
-TESTS_DISABLED += tst-statfs # assuming host has LFS on
-endif
 CFLAGS_dirent64 := -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
 
-ifeq ($(UCLIBC_LINUX_SPECIFIC),)
-TESTS_DISABLED += tst-inotify
-endif
-
-ifeq ($(UCLIBC_HAS_GLOB),)
-TESTS_DISABLED += bug-glob2
-endif
-
-ifeq ($(UCLIBC_HAS_UTMPX),)
-TESTS_DISABLED += tst-utmpx
-endif
-
-ifeq ($(UCLIBC_HAS_UTMP),)
-TESTS_DISABLED += tst-utmp
-endif
-
 DODIFF_dirent    := 1
 DODIFF_dirent64  := 1
 DODIFF_tst-statfs := 1

+ 1 - 1
test/mmap/Makefile.in

@@ -1,2 +1,2 @@
-# uClibc mmap tests
+# uClibc-ng mmap tests
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.

+ 14 - 66
test/nptl/Makefile.in

@@ -1,4 +1,4 @@
-# uClibc NPTL tests
+# uClibc-ng NPTL tests
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 
 TESTS := tst-align tst-align2 tst-atfork1 tst-attr1 tst-attr2 tst-attr3	\
@@ -41,7 +41,7 @@ TESTS := tst-align tst-align2 tst-atfork1 tst-attr1 tst-attr2 tst-attr3	\
 	tst-getpid1 tst-getpid2 tst-getpid3 tst-join6 tst-tsd6 \
 	tst-oddstacklimit tst-oncex3 tst-oncex4 tst-rwlock2a  \
 	tst-basic7 tst-signal7 tst-vfork1x tst-vfork2x tst-sem10 tst-sem11 \
-	tst-sem12 tst-typesizes tst-initializers1-c89 tst-initializers1-c99 \
+	tst-sem12 tst-initializers1-c89 tst-initializers1-c99 \
 	tst-initializers1-gnu89 tst-initializers1-gnu99 \
 	tst-atfork2
 
@@ -54,33 +54,6 @@ TESTS += tst-clock tst-clock_nanosleep tst-cpuclock1 tst-cpuclock2	\
 	tst-mqueue7 tst-mqueue8 tst-mqueue9 tst-timer2 tst-timer3	\
 	tst-timer4 tst-timer5
 
-ifeq ($(UCLIBC_HAS_OBSOLETE_BSD_SIGNAL),)
-TESTS_DISABLED += tst-exec2 tst-exec3 tst-exec4
-endif
-
-ifeq ($(UCLIBC_SUSV4_LEGACY),)
-TESTS_DISABLED += tst-basic5 tst-cancel4 tst-cancel5 tst-cancelx4
-endif
-
-GLIBC_TESTS_DISABLED := tst-eintr1_glibc tst-eintr2_glibc \
-	tst-eintr3_glibc tst-eintr4_glibc tst-eintr5_glibc \
-	tst-tls1_glibc tst-tls2_glibc
-
-
-ifeq ($(HAVE_SHARED),)
-TESTS_DISABLED += tst-tls3 tst-tls4 tst-tls5 tst-dlsym1 tst-fini1	\
-		tst-unload
-else
-GLIBC_TESTS_DISABLED += tst-tls3_glibc tst-tls4_glibc tst-tls5_glibc
-endif
-
-EXTRA_CFLAGS := -DNOT_IN_libc=1 -D_LIBC -D__USE_GNU -std=gnu99 \
-	$(PTINC) \
-	-I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH) \
-	-I$(top_srcdir)libc/sysdeps/linux \
-	-I$(top_builddir)include \
-	-include $(top_builddir)include/libc-symbols.h
-
 ifeq ($(TARGET_ARCH),i386)
 CFLAGS_tst-align := -malign-double -mpreferred-stack-boundary=4
 endif
@@ -89,45 +62,21 @@ CFLAGS_tst-align := -malign-double -mpreferred-stack-boundary=4 -msse
 endif
 CFLAGS_tst-cleanup4aux.o := -W
 CFLAGS_tst-initializers1 := -W -Werror
-CFLAGS_tst-tls3mod.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
-CFLAGS_tst-tls4moda.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
-CFLAGS_tst-tls4modb.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
-CFLAGS_tst-tls5mod.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
-CFLAGS_tst-tls5moda.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
-CFLAGS_tst-tls5modb.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
-CFLAGS_tst-tls5modc.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
-CFLAGS_tst-tls5modd.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
-CFLAGS_tst-tls5mode.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
-CFLAGS_tst-tls5modf.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
-
-CFLAGS_tst-fini1mod.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
+CFLAGS_tst-tls3mod.so := -fPIC -DPIC -DSHARED -shared
+CFLAGS_tst-tls4moda.so := -fPIC -DPIC -DSHARED -shared
+CFLAGS_tst-tls4modb.so := -fPIC -DPIC -DSHARED -shared
+CFLAGS_tst-tls5mod.so := -fPIC -DPIC -DSHARED -shared
+CFLAGS_tst-tls5moda.so := -fPIC -DPIC -DSHARED -shared
+CFLAGS_tst-tls5modb.so := -fPIC -DPIC -DSHARED -shared
+CFLAGS_tst-tls5modc.so := -fPIC -DPIC -DSHARED -shared
+CFLAGS_tst-tls5modd.so := -fPIC -DPIC -DSHARED -shared
+CFLAGS_tst-tls5mode.so := -fPIC -DPIC -DSHARED -shared
+CFLAGS_tst-tls5modf.so := -fPIC -DPIC -DSHARED -shared
+
+CFLAGS_tst-fini1mod.so := -fPIC -DPIC -DSHARED -shared
 LDFLAGS_tst-cond11 = -lrt
 LDFLAGS_tst-cond19 = -lrt
 
-LDFLAGS_tst-cancelx2 = -lc
-LDFLAGS_tst-cancelx3 = -lc
-LDFLAGS_tst-cancelx4 = -lc
-LDFLAGS_tst-cancelx6 = -lc
-LDFLAGS_tst-cancelx6 = -lc
-LDFLAGS_tst-cancelx7 = -lc
-LDFLAGS_tst-cancelx8 = -lc
-LDFLAGS_tst-cancelx9 = -lc
-LDFLAGS_tst-cancelx10 = -lc
-LDFLAGS_tst-cancelx11 = -lc
-LDFLAGS_tst-cancelx12 = -lc
-LDFLAGS_tst-cancelx13 = -lc
-LDFLAGS_tst-cancelx14 = -lc
-LDFLAGS_tst-cancelx15 = -lc
-LDFLAGS_tst-cancelx16 = -lc
-LDFLAGS_tst-cancelx18 = -lc
-LDFLAGS_tst-cancelx20 = -lc
-LDFLAGS_tst-cancelx21 = -lc
-LDFLAGS_tst-cleanupx0 = -lc
-LDFLAGS_tst-cleanupx1 = -lc
-LDFLAGS_tst-cleanupx2 = -lc
-LDFLAGS_tst-cleanupx3 = -lc
-LDFLAGS_tst-oncex3 = -lc
-LDFLAGS_tst-oncex4 = -lc
 LDFLAGS_tst-rwlock14 = -lrt
 LDFLAGS_tst-fini1 = -Wl,-rpath=./ tst-fini1mod.so
 LDFLAGS_tst-fini1mod.so = -Wl,-soname=tst-fini1mod.so
@@ -233,7 +182,6 @@ tst-cleanupx4 : tst-cleanup4aux.o
 tst-fini1: tst-fini1mod.so
 
 tst-atfork2: tst-atfork2mod.so
-tst-atfork2_glibc: tst-atfork2mod.so.glibc
 
 OPTS_tst-cancel7 = -c ./tst-cancel7
 OPTS_tst-mqueue7 = -- ./tst-mqueue7

+ 3 - 1
test/nptl/tst-cancel25.c

@@ -1,4 +1,4 @@
-#include <pthreadP.h>
+#include <pthread.h>
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -11,6 +11,7 @@ static pthread_t th2;
 static void *
 tf2 (void *arg)
 {
+#ifdef SIGCANCEL
   sigset_t mask;
   if (pthread_sigmask (SIG_SETMASK, NULL, &mask) != 0)
     {
@@ -22,6 +23,7 @@ tf2 (void *arg)
       puts ("SIGCANCEL blocked in new thread");
       exit (1);
     }
+#endif
 
   /* Sync with the main thread so that we do not test anything else.  */
   int e = pthread_barrier_wait (&b);

+ 1 - 1
test/nptl/tst-cancel4.c

@@ -38,7 +38,7 @@
 #include <sys/un.h>
 #include <sys/wait.h>
 
-#include "pthreadP.h"
+#define SIGCANCEL   __SIGRTMIN
 
 
 /* Since STREAMS are not supported in the standard Linux kernel and

+ 6 - 1
test/nptl/tst-getpid1.c

@@ -5,7 +5,12 @@
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/wait.h>
-#include <bits/stackinfo.h>
+
+#if defined(__hppa__)
+#define _STACK_GROWS_UP		1
+#else
+#define _STACK_GROWS_DOWN	1
+#endif
 
 #ifndef TEST_CLONE_FLAGS
 #define TEST_CLONE_FLAGS 0

+ 26 - 10
test/nptl/tst-sem11.c

@@ -2,7 +2,14 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <pthread.h>
-#include <internaltypes.h>
+
+//from internaltypes.h
+struct new_sem
+{
+  unsigned int value;
+  int private;
+  unsigned long int nwaiters;
+};
 
 #ifndef SEM_WAIT
 # define SEM_WAIT(s) sem_wait (s)
@@ -23,23 +30,28 @@ main (void)
 {
   int tries = 5;
   pthread_t th;
-  sem_t s;
+  union
+  {
+    sem_t s;
+    struct new_sem ns;
+  } u;
  again:
-  if (sem_init (&s, 0, 0) != 0)
+  if (sem_init (&u.s, 0, 0) != 0)
     {
       puts ("sem_init failed");
       return 1;
     }
-
-  struct new_sem *is = (struct new_sem *) &s;
-
-  if (is->nwaiters != 0)
+#if __HAVE_64B_ATOMICS
+  if ((u.ns.data >> SEM_NWAITERS_SHIFT) != 0)
+#else
+  if (u.ns.nwaiters != 0)
+#endif
     {
       puts ("nwaiters not initialized");
       return 1;
     }
 
-  if (pthread_create (&th, NULL, tf, &s) != 0)
+  if (pthread_create (&th, NULL, tf, &u.s) != 0)
     {
       puts ("pthread_create failed");
       return 1;
@@ -62,11 +74,15 @@ main (void)
   if (r != PTHREAD_CANCELED && --tries > 0)
     {
       /* Maybe we get the scheduling right the next time.  */
-      sem_destroy (&s);
+      sem_destroy (&u.s);
       goto again;
     }
 
-  if (is->nwaiters != 0)
+#if __HAVE_64B_ATOMICS
+  if ((u.ns.data >> SEM_NWAITERS_SHIFT) != 0)
+#else
+  if (u.ns.nwaiters != 0)
+#endif
     {
       puts ("nwaiters not reset");
       return 1;

+ 5 - 2
test/nptl/tst-signal7.c

@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2005.
 
@@ -17,7 +17,6 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <errno.h>
-#include <pthreadP.h>
 #include <signal.h>
 #include <stdio.h>
 
@@ -27,6 +26,7 @@ do_test (void)
 {
   int result = 0;
 
+#ifdef SIGCANCEL
   errno = 0;
   if (sigaction (SIGCANCEL, NULL, NULL) == 0)
     {
@@ -38,7 +38,9 @@ do_test (void)
       puts ("sigaction(SIGCANCEL) did not set errno to EINVAL");
       result = 1;
     }
+#endif
 
+#ifdef SIGSETXID
   errno = 0;
   if (sigaction (SIGSETXID, NULL, NULL) == 0)
     {
@@ -50,6 +52,7 @@ do_test (void)
       puts ("sigaction(SIGSETXID) did not set errno to EINVAL");
       result = 1;
     }
+#endif
 
   return result;
 }

+ 2 - 12
test/nptl/tst-tls1.c

@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
 
@@ -19,9 +19,8 @@
 #include <pthread.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <tls.h>
 
-#if HAVE___THREAD
+
 struct test_s
 {
   int a;
@@ -51,19 +50,11 @@ tf (void *arg)
 
   return NULL;
 }
-#endif
 
 
 int
 do_test (void)
 {
-#if !HAVE___THREAD
-
-  puts ("No __thread support in compiler, test skipped.");
-
-  return 0;
-#else
-
   if (s.a != INIT_A || s.b != INIT_B)
     {
       puts ("initial value of s in main thread wrong");
@@ -113,7 +104,6 @@ do_test (void)
     }
 
   return 0;
-#endif
 }
 
 

+ 2 - 12
test/nptl/tst-tls2.c

@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
 
@@ -23,9 +23,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <tls.h>
 
-#if HAVE___THREAD
 
 #define N 10
 static pthread_t th[N];
@@ -106,18 +104,11 @@ tf (void *arg)
 
   return NULL;
 }
-#endif
+
 
 int
 do_test (void)
 {
-#if !HAVE___THREAD
-
-  puts ("No __thread support in compiler, test skipped.");
-
-  return 0;
-#else
-
   if (pthread_barrier_init (&b, NULL, N + 1) != 0)
     {
       puts ("barrier_init failed");
@@ -207,7 +198,6 @@ do_test (void)
       }
 
   return 0;
-#endif
 }
 
 

+ 0 - 2
test/nptl/tst-tls3.c

@@ -25,8 +25,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <pthreaddef.h>
-#include <tls.h>
 
 #define THE_SIG SIGUSR1
 

+ 0 - 2
test/nptl/tst-tls3mod.c

@@ -23,8 +23,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <pthreaddef.h>
-#include <tls.h>
 
 #if HAVE___THREAD
 

+ 0 - 1
test/nptl/tst-tls4.c

@@ -22,7 +22,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <tls.h>
 
 #if HAVE___THREAD && defined HAVE_TLS_MODEL_ATTRIBUTE
 

+ 0 - 1
test/nptl/tst-tls4moda.c

@@ -19,7 +19,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <tls.h>
 
 #if HAVE___THREAD && defined HAVE_TLS_MODEL_ATTRIBUTE
 

+ 0 - 1
test/nptl/tst-tls4modb.c

@@ -19,7 +19,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <tls.h>
 
 #if HAVE___THREAD && defined HAVE_TLS_MODEL_ATTRIBUTE
 

+ 0 - 1
test/nptl/tst-tls5.h

@@ -1,6 +1,5 @@
 #include <stdint.h>
 #include <stdlib.h>
-#include <tls.h>
 
 #if USE_TLS && HAVE___THREAD
 

+ 1 - 1
test/nptl/tst-typesizes.c

@@ -17,7 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <stdio.h>
-#include <pthreadP.h>
+#include <pthread.h>
 #include <semaphore.h>
 
 static const struct

+ 1 - 1
test/pthread/Makefile.in

@@ -1,4 +1,4 @@
-# uClibc pthread tests
+# uClibc-ng pthread tests
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 
 TESTS_DISABLED += cancellation-points

+ 1 - 1
test/pwd_grp/Makefile.in

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

+ 1 - 1
test/rpc/Makefile.in

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

+ 2 - 1
test/rpc/getrpcent.c

@@ -3,6 +3,7 @@
 
 int main(int argc, char *argv[])
 {
+#if defined(__UCLIBC_HAS_RPC__)
 	struct rpcent *ent;
 
 	while ((ent = getrpcent()) != NULL) {
@@ -13,6 +14,6 @@ int main(int argc, char *argv[])
 	}
 
 	endrpcent();
-
+#endif
 	return 0;
 }

+ 1 - 1
test/signal/Makefile.in

@@ -1,4 +1,4 @@
-# uClibc signal tests
+# uClibc-ng signal tests
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 
 ifeq ($(UCLIBC_HAS_OBSOLETE_BSD_SIGNAL),)

+ 1 - 18
test/silly/Makefile.in

@@ -1,24 +1,7 @@
-# uClibc silly tests
+# uClibc-ng silly tests
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 
 RET_hello := 42
 RET_tiny  := 42
 
-ifeq ($(TARGET_ARCH),ia64)
 TESTS_DISABLED += tst-atomic tst-atomic-long
-endif
-
-ifeq ($(TARGET_ARCH),mips)
-TESTS_DISABLED += tst-atomic tst-atomic-long
-endif
-
-ifeq ($(TARGET_ARCH),sparc)
-TESTS_DISABLED += tst-atomic tst-atomic-long
-endif
-
-atomic_headers := -I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH) \
-	-I$(top_srcdir)libc/sysdeps/linux \
-	-I$(top_builddir)include
-
-CFLAGS_tst-atomic = $(atomic_headers)
-CFLAGS_tst-atomic-long = $(atomic_headers)

+ 0 - 1
test/silly/tst-atomic.c

@@ -18,7 +18,6 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <stdio.h>
-#include <atomic.h>
 
 #ifndef atomic_t
 # define atomic_t int

+ 1 - 1
test/stat/Makefile.in

@@ -1,4 +1,4 @@
-# uClibc stat tests
+# uClibc-ng stat tests
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 
 ifeq ($(UCLIBC_HAS_LFS),)

+ 1 - 1
test/stdio/Makefile.in

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

+ 1 - 1
test/stdlib/Makefile.in

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

+ 1 - 1
test/string/Makefile.in

@@ -1,4 +1,4 @@
-# uClibc string tests
+# uClibc-ng string tests
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 
 EXTRA_CFLAGS := -fno-builtin

+ 1 - 1
test/time/Makefile.in

@@ -1,4 +1,4 @@
-# uClibc time tests
+# uClibc-ng time tests
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 
 TESTS_DISABLED := bug-asctime bug-asctime_r time tst-mktime2 tst-posixtz \

+ 1 - 1
test/tls/Makefile

@@ -1,4 +1,4 @@
-# uClibc TLS tests
+# uClibc-ng TLS tests
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 
 top_builddir=../../

+ 1 - 29
test/tls/Makefile.in

@@ -1,4 +1,4 @@
-# uClibc TLS tests
+# uClibc-ng TLS tests
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 
 TESTS := tst-tls1 tst-tls2 tst-tls3 tst-tls4 tst-tls5 tst-tls6 tst-tls7	\
@@ -11,34 +11,6 @@ TESTS_DISABLED := tst-tls1-static tst-tls2-static tst-tls9-static
 # guessing some unimplemented check or feature
 TESTS_DISABLED += tst-tls16
 
-#all these tests require shared libraries
-ifeq ($(HAVE_SHARED),)
-TESTS_DISABLED := $(TESTS)
-endif
-
-# All these tests need tls.h, which is not installed with glibc
-GLIBC_TESTS_DISABLED := $(addsuffix _glibc,$(filter-out $(TESTS_DISABLED),$(TESTS)))
-
-
-PTDIR := $(top_builddir)libpthread/nptl
-SYSDEPS_DIR := $(top_srcdir)libc/sysdeps
-
-EXTRA_CFLAGS := -DNOT_IN_libc=1 \
-	-std=gnu99 -I. \
-	-I$(SYSDEPS_DIR)/linux \
-	-I$(SYSDEPS_DIR)/linux/$(TARGET_ARCH) \
-	-I$(PTDIR)	\
-	-I$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH)	\
-	-I$(PTDIR)/sysdeps/$(TARGET_ARCH)			\
-	-I$(PTDIR)/sysdeps/unix/sysv/linux			\
-	-I$(PTDIR)/sysdeps/pthread				\
-	-I$(PTDIR)/sysdeps/pthread/bits				\
-	-I$(PTDIR)/sysdeps/generic				\
-	-I$(top_builddir)ldso/include				\
-	-I$(top_builddir)ldso/ldso/$(TARGET_ARCH)		\
-	-I$(top_builddir)include				\
-	-include $(top_builddir)include/libc-symbols.h
-
 tlsmod17a-suffixes := 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
 tlsmod18a-suffixes := 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
 CFLAGS_tst-tlsmod1.so := -fPIC -DSHARED -shared

+ 0 - 1
test/tls/tst-tls-at-ctor.c

@@ -1,6 +1,5 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <tls.h>
 
 #define TLS_VAR_INIT_VALUE 99
 

+ 0 - 2
test/tls/tst-tls1.c

@@ -2,8 +2,6 @@
 #undef _LIBC
 #include <stdio.h>
 
-#include <tls.h>
-
 #ifdef USE_TLS
 # include "tls-macros.h"
 

+ 1 - 1
test/tls/tst-tls10.c

@@ -14,9 +14,9 @@ int
 main (void)
 {
   struct A *p;
+#ifdef USE_TLS__THREAD
   if (local.a != 1 || local.b != 2 || local.c != 3)
     abort ();
-#ifdef USE_TLS__THREAD
   if (a1.a != 4 || a1.b != 5 || a1.c != 6)
     abort ();
   if (a2.a != 22 || a2.b != 23 || a2.c != 24)

+ 0 - 1
test/tls/tst-tls10.h

@@ -1,4 +1,3 @@
-#include <tls.h>
 #include <stdlib.h>
 
 #if defined USE_TLS && defined HAVE___THREAD \

+ 0 - 2
test/tls/tst-tls14.c

@@ -4,8 +4,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include <tls.h>
-
 #if USE_TLS && HAVE___THREAD
 
 #define AL 4096

+ 0 - 2
test/tls/tst-tls2.c

@@ -1,8 +1,6 @@
 /* glibc test for TLS in ld.so.  */
 #include <stdio.h>
 
-#include <tls.h>
-
 #ifdef USE_TLS
 # include "tls-macros.h"
 

+ 0 - 2
test/tls/tst-tls3.c

@@ -1,8 +1,6 @@
 /* glibc test for TLS in ld.so.  */
 #include <stdio.h>
 
-#include <tls.h>
-
 #ifdef USE_TLS
 # include "tls-macros.h"
 

+ 0 - 2
test/tls/tst-tls4.c

@@ -2,8 +2,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include <tls.h>
-
 
 #define TEST_FUNCTION do_test ()
 static int

+ 0 - 2
test/tls/tst-tls5.c

@@ -2,8 +2,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include <tls.h>
-
 
 #define TEST_FUNCTION do_test ()
 static int

+ 0 - 7
test/tls/tst-tls6.c

@@ -1,14 +1,7 @@
 #include <dlfcn.h>
 #include <stdio.h>
 #include <stdlib.h>
-
-#include <tls.h>
 #include <link.h>
-#ifdef __UCLIBC__
-#include "dl-elf.h"
-#include "dl-hash.h"
-#endif
-
 
 #define TEST_FUNCTION do_test ()
 static int

+ 0 - 7
test/tls/tst-tls7.c

@@ -1,14 +1,7 @@
 #include <dlfcn.h>
 #include <stdio.h>
 #include <stdlib.h>
-
-#include <tls.h>
 #include <link.h>
-#ifdef __UCLIBC__
-#include "dl-elf.h"
-#include "dl-hash.h"
-#endif
-
 
 #define TEST_FUNCTION do_test ()
 static int

+ 0 - 7
test/tls/tst-tls8.c

@@ -1,14 +1,7 @@
 #include <dlfcn.h>
 #include <stdio.h>
 #include <stdlib.h>
-
-#include <tls.h>
 #include <link.h>
-#ifdef __UCLIBC__
-#include "dl-elf.h"
-#include "dl-hash.h"
-#endif
-
 
 #define TEST_FUNCTION do_test ()
 static int

+ 0 - 2
test/tls/tst-tls9.c

@@ -1,9 +1,7 @@
 #include <dlfcn.h>
 #include <stdio.h>
 #include <stdlib.h>
-
 #include <link.h>
-#include <tls.h>
 
 #define TEST_FUNCTION do_test ()
 static int

+ 0 - 1
test/tls/tst-tlsmod-at-ctor.c

@@ -1,5 +1,4 @@
 #include <stdio.h>
-#include <tls.h>
 
 #define TLS_VAR_INIT_VALUE 99
 

+ 0 - 2
test/tls/tst-tlsmod1.c

@@ -1,7 +1,5 @@
 #include <stdio.h>
 
-#include <tls.h>
-
 #ifdef USE_TLS
 #include "tls-macros.h"
 

+ 0 - 2
test/tls/tst-tlsmod13.c

@@ -1,5 +1,3 @@
-#include <tls.h>
-
 #if defined USE_TLS && defined HAVE___THREAD \
     && defined HAVE_TLS_MODEL_ATTRIBUTE
 __thread int a[2] __attribute__ ((tls_model ("initial-exec")));

+ 0 - 2
test/tls/tst-tlsmod13a.c

@@ -1,5 +1,3 @@
-#include <tls.h>
-
 #if defined USE_TLS && defined HAVE___THREAD \
     && defined HAVE_TLS_MODEL_ATTRIBUTE
 __thread int b[2] __attribute__ ((tls_model ("initial-exec")));

+ 0 - 2
test/tls/tst-tlsmod14a.c

@@ -1,8 +1,6 @@
 #include <stdint.h>
 #include <stdio.h>
 
-#include <tls.h>
-
 #if USE_TLS && HAVE___THREAD
 
 #define AL 4096

+ 0 - 2
test/tls/tst-tlsmod16a.c

@@ -1,5 +1,3 @@
-#include <tls.h>
-
 #if defined HAVE___THREAD && defined HAVE_TLS_MODEL_ATTRIBUTE
 int __thread tlsvar;
 #else

+ 0 - 2
test/tls/tst-tlsmod16b.c

@@ -1,5 +1,3 @@
-#include <tls.h>
-
 #if defined HAVE___THREAD && defined HAVE_TLS_MODEL_ATTRIBUTE
 extern __thread int tlsvar __attribute__((tls_model("initial-exec")));
 #else

+ 0 - 2
test/tls/tst-tlsmod2.c

@@ -1,7 +1,5 @@
 #include <stdio.h>
 
-#include <tls.h>
-
 #ifdef USE_TLS
 #include "tls-macros.h"
 

+ 0 - 2
test/tls/tst-tlsmod3.c

@@ -1,7 +1,5 @@
 #include <stdio.h>
 
-#include <tls.h>
-
 #ifdef USE_TLS
 # include "tls-macros.h"
 

+ 0 - 2
test/tls/tst-tlsmod4.c

@@ -1,7 +1,5 @@
 #include <stdio.h>
 
-#include <tls.h>
-
 #ifdef USE_TLS
 # include "tls-macros.h"
 

+ 0 - 2
test/tls/tst-tlsmod5.c

@@ -1,5 +1,3 @@
-#include <tls.h>
-
 #ifdef USE_TLS
 #include "tls-macros.h"
 

+ 0 - 2
test/tls/tst-tlsmod6.c

@@ -1,5 +1,3 @@
-#include <tls.h>
-
 #ifdef USE_TLS
 #include "tls-macros.h"
 

+ 1 - 9
test/unistd/Makefile.in

@@ -1,4 +1,4 @@
-# uClibc unistd tests
+# uClibc-ng unistd tests
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 
 TESTS_DISABLED :=
@@ -34,11 +34,3 @@ endif
 # for embedded systems 4 GB disk space is not available
 TESTS_DISABLED += tst-posix_fallocate64 tst-fallocate64
 
-# getconf.c lives in utils/
-# Testsuite cannot currently be built with O= anyway, so hardcode path here
-getconf.c:
-	$(LN_S) ../../utils/$(@F) .
-EXTRA_CLEAN    += getconf.c
-TESTS_DISABLED += getconf
-CFLAGS_getconf = -DGETCONF_DIR='"$(CURDIR)"'
-shell_tst-getconf: getconf getconf_glibc

+ 0 - 240
test/unistd/tst-getconf.sh

@@ -1,240 +0,0 @@
-#! /bin/sh
-
-basedir="."
-
-# make sure to use the same locale everywhere.
-LC_ALL=C
-export LC_ALL
-LANG=C
-export LANG
-
-for suffix in _glibc ''
-do
-binary=$basedir/getconf$suffix
-logfile=$basedir/tst-getconf$suffix.out
-rm -f $logfile
-
-result=0
-while read name; do
-  case "$name" in
-  "#"*) continue;;
-  esac
-  echo -n "getconf $name: " >> $logfile
-  $binary "$name" 2>> $logfile >> $logfile
-  if test $? -ne 0; then
-    echo "*** $name FAILED" >> $logfile
-    result=1
-  fi
-done <<EOF
-AIO_LISTIO_MAX
-AIO_MAX
-AIO_PRIO_DELTA_MAX
-ARG_MAX
-ATEXIT_MAX
-BC_BASE_MAX
-BC_DIM_MAX
-BC_SCALE_MAX
-BC_STRING_MAX
-CHILD_MAX
-COLL_WEIGHTS_MAX
-DELAYTIMER_MAX
-EXPR_NEST_MAX
-HOST_NAME_MAX
-IOV_MAX
-LINE_MAX
-LOGIN_NAME_MAX
-NGROUPS_MAX
-MQ_OPEN_MAX
-MQ_PRIO_MAX
-OPEN_MAX
-_POSIX_ADVISORY_INFO
-_POSIX_BARRIERS
-_POSIX_ASYNCHRONOUS_IO
-_POSIX_BASE
-_POSIX_C_LANG_SUPPORT
-_POSIX_C_LANG_SUPPORT_R
-_POSIX_CLOCK_SELECTION
-_POSIX_CPUTIME
-_POSIX_DEVICE_IO
-_POSIX_DEVICE_SPECIFIC
-_POSIX_DEVICE_SPECIFIC_R
-_POSIX_FD_MGMT
-_POSIX_FIFO
-_POSIX_FILE_ATTRIBUTES
-_POSIX_FILE_LOCKING
-_POSIX_FILE_SYSTEM
-_POSIX_FSYNC
-_POSIX_JOB_CONTROL
-_POSIX_MAPPED_FILES
-_POSIX_MEMLOCK
-_POSIX_MEMLOCK_RANGE
-_POSIX_MEMORY_PROTECTION
-_POSIX_MESSAGE_PASSING
-_POSIX_MONOTONIC_CLOCK
-_POSIX_MULTI_PROCESS
-_POSIX_NETWORKING
-_POSIX_PIPE
-_POSIX_PRIORITIZED_IO
-_POSIX_PRIORITY_SCHEDULING
-_POSIX_READER_WRITER_LOCKS
-_POSIX_REALTIME_SIGNALS
-_POSIX_REGEXP
-_POSIX_SAVED_IDS
-_POSIX_SEMAPHORES
-_POSIX_SHARED_MEMORY_OBJECTS
-_POSIX_SHELL
-_POSIX_SIGNALS
-_POSIX_SINGLE_PROCESS
-_POSIX_SPAWN
-_POSIX_SPIN_LOCKS
-_POSIX_SPORADIC_SERVER
-_POSIX_SYNCHRONIZED_IO
-_POSIX_SYSTEM_DATABASE
-_POSIX_SYSTEM_DATABASE_R
-_POSIX_THREAD_ATTR_STACKADDR
-_POSIX_THREAD_ATTR_STACKSIZE
-_POSIX_THREAD_CPUTIME
-_POSIX_THREAD_PRIO_INHERIT
-_POSIX_THREAD_PRIO_PROTECT
-_POSIX_THREAD_PRIORITY_SCHEDULING
-_POSIX_THREAD_PROCESS_SHARED
-_POSIX_THREAD_SAFE_FUNCTIONS
-_POSIX_THREAD_SPORADIC_SERVER
-_POSIX_THREADS
-_POSIX_TIMEOUTS
-_POSIX_TIMERS
-_POSIX_TRACE
-_POSIX_TRACE_EVENT_FILTER
-_POSIX_TRACE_INHERIT
-_POSIX_TRACE_LOG
-_POSIX_TYPED_MEMORY_OBJECTS
-_POSIX_USER_GROUPS
-_POSIX_USER_GROUPS_R
-_POSIX_VERSION
-_POSIX_V7_ILP32_OFF32
-_POSIX_V7_ILP32_OFFBIG
-_POSIX_V7_LP64_OFF64
-_POSIX_V7_LPBIG_OFFBIG
-#_POSIX_V7_WIDTH_RESTRICTED_ENVS
-POSIX2_C_BIND
-POSIX2_C_DEV
-POSIX2_C_VERSION
-POSIX2_CHAR_TERM
-POSIX2_FORT_DEV
-POSIX2_FORT_RUN
-POSIX2_LOCALEDEF
-POSIX2_PBS
-POSIX2_PBS_ACCOUNTING
-POSIX2_PBS_LOCATE
-POSIX2_PBS_MESSAGE
-POSIX2_PBS_TRACK
-POSIX2_SW_DEV
-POSIX2_UPE
-POSIX2_VERSION
-_REGEX_VERSION
-PAGE_SIZE
-PAGESIZE
-PTHREAD_DESTRUCTOR_ITERATIONS
-PTHREAD_KEYS_MAX
-PTHREAD_STACK_MIN
-PTHREAD_THREADS_MAX
-RE_DUP_MAX
-RTSIG_MAX
-SEM_NSEMS_MAX
-SEM_VALUE_MAX
-SIGQUEUE_MAX
-STREAM_MAX
-SYMLOOP_MAX
-TIMER_MAX
-TTY_NAME_MAX
-TZNAME_MAX
-#_XBS5_ILP32_OFF32
-#_XBS5_ILP32_OFFBIG
-#_XBS5_LP64_OFF64
-#_XBS5_LPBIG_OFFBIG
-_XOPEN_CRYPT
-_XOPEN_ENH_I18N
-_XOPEN_LEGACY
-_XOPEN_REALTIME
-_XOPEN_REALTIME_THREADS
-_XOPEN_SHM
-_XOPEN_UNIX
-_XOPEN_VERSION
-_XOPEN_XCU_VERSION
-PATH
-#POSIX_V7_ILP32_OFF32_CFLAGS
-#POSIX_V7_ILP32_OFF32_LDFLAGS
-#POSIX_V7_ILP32_OFF32_LIBS
-#POSIX_V7_ILP32_OFF32_LINTFLAGS
-#POSIX_V7_ILP32_OFFBIG_CFLAGS
-#POSIX_V7_ILP32_OFFBIG_LDFLAGS
-#POSIX_V7_ILP32_OFFBIG_LIBS
-#POSIX_V7_ILP32_OFFBIG_LINTFLAGS
-#POSIX_V7_LP64_OFF64_CFLAGS
-#POSIX_V7_LP64_OFF64_LDFLAGS
-#POSIX_V7_LP64_OFF64_LIBS
-#POSIX_V7_LP64_OFF64_LINTFLAGS
-#POSIX_V7_LPBIG_OFFBIG_CFLAGS
-#POSIX_V7_LPBIG_OFFBIG_LDFLAGS
-#POSIX_V7_LPBIG_OFFBIG_LIBS
-#POSIX_V7_LPBIG_OFFBIG_LINTFLAGS
-#XBS5_ILP32_OFF32_CFLAGS
-#XBS5_ILP32_OFF32_LDFLAGS
-#XBS5_ILP32_OFF32_LIBS
-#XBS5_ILP32_OFF32_LINTFLAGS
-#XBS5_ILP32_OFFBIG_CFLAGS
-#XBS5_ILP32_OFFBIG_LDFLAGS
-#XBS5_ILP32_OFFBIG_LIBS
-#XBS5_ILP32_OFFBIG_LINTFLAGS
-#XBS5_LP64_OFF64_CFLAGS
-#XBS5_LP64_OFF64_LDFLAGS
-#XBS5_LP64_OFF64_LIBS
-#XBS5_LP64_OFF64_LINTFLAGS
-#XBS5_LPBIG_OFFBIG_CFLAGS
-#XBS5_LPBIG_OFFBIG_LDFLAGS
-#XBS5_LPBIG_OFFBIG_LIBS
-#XBS5_LPBIG_OFFBIG_LINTFLAGS
-_NPROCESSORS_ONLN
-_NPROCESSORS_CONF
-EOF
-
-while read name; do
-  echo -n "getconf $name /: " >> $logfile
-  $binary "$name" / 2>> $logfile >> $logfile
-  if test $? -ne 0; then
-    echo "*** $name FAILED" >> $logfile
-    result=1
-  fi
-done <<EOF
-FILESIZEBITS
-LINK_MAX
-MAX_CANON
-MAX_INPUT
-NAME_MAX
-PATH_MAX
-PIPE_BUF
-POSIX_ALLOC_SIZE_MIN
-POSIX_REC_INCR_XFER_SIZE
-POSIX_REC_MAX_XFER_SIZE
-POSIX_REC_MIN_XFER_SIZE
-POSIX_REC_XFER_ALIGN
-SYMLINK_MAX
-_POSIX_CHOWN_RESTRICTED
-_POSIX_NO_TRUNC
-_POSIX_VDISABLE
-_POSIX_ASYNC_IO
-_POSIX_PRIO_IO
-_POSIX_SYNC_IO
-EOF
-
-done
-exit $result
-
-# Preserve executable bits for this shell script.
-Local Variables:
-eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
-eval:(make-local-variable 'file-mode)
-eval:(setq file-mode (file-modes (buffer-file-name)))
-eval:(make-local-variable 'after-save-hook)
-eval:(add-hook 'after-save-hook 'frobme)
-End: