]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Move all tests out of the csu subdirectory
authorNick Alcock <nick.alcock@oracle.com>
Wed, 21 Dec 2016 10:52:19 +0000 (11:52 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 21 Dec 2016 10:52:19 +0000 (11:52 +0100)
Stack-protection on .o files in csu/ must be suppressed for the sake of
library startup code.  This also suppresses stack-protection in tests
(which are also covered by CFLAGS-.o), though this is neither necessary
nor desirable.

So impose the rule that .o files in csu/ are necessarily C startup code,
and move the few tests in there into misc/ instead.

ChangeLog
csu/Makefile
misc/Makefile
misc/tst-atomic-long.c [moved from csu/tst-atomic-long.c with 100% similarity]
misc/tst-atomic.c [moved from csu/tst-atomic.c with 99% similarity]
misc/tst-empty.c [moved from csu/tst-empty.c with 58% similarity]

index 48227ece44c148d3c9cdfebe85cf491bce2feaad..bb4768518e3420e55f0d43ea5692bd6796eb2b7e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2016-12-21  Nick Alcock <nick.alcock@oracle.com>
+           Florian Weimer  <fweimer@redhat.com>
+
+       [BZ #7065]
+       * csu/Makefile (tests): Empty assignment and document it.
+       (tests-static): Remove.
+       * csu/tst-empty.c: Move to...
+       * misc/tst-empty.c: ... here.  Switch to new test driver.
+       * csu/tst-atomic.c: Move to...
+       * misc/tst-atomic.c: ... here.  Switch to new test driver.
+       * csu/tst-atomic-long.c: Move to...
+       * misc/tst-atomic-long.c: ... here.
+       * misc/Makefile (tests): Add tst-empty, tst-atomic,
+       tst-atomic-long.
+       (tests-static): Add tst-empty.
+
 2016-12-21  Rical Jasan  <ricaljasan@pacific.net>
 
        * manual/nss.texi: Change incorrect @vtable to @table.
index 31e8bb98a068f42cbcf5e27500f0bef73c55c1a1..3d23f138680c271747b72f2b10313a32c291abc3 100644 (file)
@@ -42,8 +42,9 @@ install-lib = $(start-installed-name) g$(start-installed-name) $(csu-dummies)
 generated += version-info.h
 before-compile += $(objpfx)version-info.h
 
-tests := tst-empty tst-atomic tst-atomic-long
-tests-static := tst-empty
+# No tests are allowed in the csu/ subdirectory because the startup
+# code is compiled with special flags.
+tests =
 
 ifeq (yes,$(build-shared))
 extra-objs += S$(start-installed-name) gmon-start.os
index 3d2ebb8e456e4d9097bf27c8b0777651dd7bd8a2..d241daea478b375060e5ca6bc1036d77d5410b59 100644 (file)
@@ -79,7 +79,10 @@ gpl2lgpl := error.c error.h
 tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \
         tst-error1 tst-pselect tst-insremque tst-mntent2 bug-hsearch1 \
         tst-mntent-blank-corrupt tst-mntent-blank-passno bug18240 \
-        tst-preadvwritev tst-preadvwritev64 tst-makedev
+        tst-preadvwritev tst-preadvwritev64 tst-makedev tst-empty \
+        tst-atomic tst-atomic-long
+tests-static := tst-empty
+
 ifeq ($(run-built-tests),yes)
 tests-special += $(objpfx)tst-error1-mem.out
 endif
similarity index 100%
rename from csu/tst-atomic-long.c
rename to misc/tst-atomic-long.c
similarity index 99%
rename from csu/tst-atomic.c
rename to misc/tst-atomic.c
index f7dcac159da4a98a34928543a063ab8c72ef025c..720b86549649c027a93298c1efca4d5b669b35a1 100644 (file)
@@ -636,5 +636,4 @@ do_test (void)
   return ret;
 }
 
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
similarity index 58%
rename from csu/tst-empty.c
rename to misc/tst-empty.c
index e99468eef96bc3476190cd8f83f519c40bd25452..31860b06b35c649e9b26f3d85c79ae2e7f2dec88 100644 (file)
@@ -5,5 +5,4 @@ do_test (void)
   return 0;
 }
 
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>