From ac08946e0c09c25143d4cc49abdf0281bb81bd8d Mon Sep 17 00:00:00 2001 From: Carmelo Amoroso Date: Thu, 3 Dec 2009 13:07:54 +0100 Subject: test_tls: Rename tst-tls16 to tst-tls-at-ctor Rename tst-tls16 to tst-tls-at-ctor (including main and related shared object) to avoid name clashing with new tests ported from glibc. Signed-off-by: Carmelo Amoroso --- test/tls/Makefile.in | 10 +++++----- test/tls/tst-tls-at-ctor.c | 21 +++++++++++++++++++++ test/tls/tst-tls16.c | 21 --------------------- test/tls/tst-tlsmod-at-ctor.c | 25 +++++++++++++++++++++++++ test/tls/tst-tlsmod16.c | 25 ------------------------- 5 files changed, 51 insertions(+), 51 deletions(-) create mode 100644 test/tls/tst-tls-at-ctor.c delete mode 100644 test/tls/tst-tls16.c create mode 100644 test/tls/tst-tlsmod-at-ctor.c delete mode 100644 test/tls/tst-tlsmod16.c (limited to 'test/tls') diff --git a/test/tls/Makefile.in b/test/tls/Makefile.in index c23ad216a..41c5276be 100644 --- a/test/tls/Makefile.in +++ b/test/tls/Makefile.in @@ -3,7 +3,7 @@ TESTS := tst-tls1 tst-tls2 tst-tls3 tst-tls4 tst-tls5 tst-tls6 tst-tls7 \ tst-tls8 tst-tls9 tst-tls10 tst-tls11 tst-tls12 tst-tls13 \ - tst-tls14 tst-tls15 tst-tls16 tst-tls1-static tst-tls2-static \ + tst-tls14 tst-tls15 tst-tls-at-ctor tst-tls1-static tst-tls2-static \ tst-tls9-static TESTS_DISABLED := tst-tls1-static tst-tls2-static tst-tls9-static @@ -44,7 +44,7 @@ CFLAGS_tst-tlsmod14a.so := -fPIC -DSHARED -shared CFLAGS_tst-tlsmod14b.so := -fPIC -DSHARED -shared CFLAGS_tst-tlsmod15a.so := -fPIC -DSHARED -shared CFLAGS_tst-tlsmod15b.so := -fPIC -DSHARED -shared -CFLAGS_tst-tlsmod16.so := -fPIC -DSHARED -shared +CFLAGS_tst-tlsmod-at-ctor.so := -fPIC -DSHARED -shared LDFLAGS_tst-tlsmod1.so := -shared -static-libgcc -L$(top_builddir)lib LDFLAGS_tst-tlsmod2.so := -shared -static-libgcc -L$(top_builddir)lib @@ -70,7 +70,7 @@ LDFLAGS_tst-tlsmod14a.so := -shared -static-libgcc -L$(top_builddir)lib LDFLAGS_tst-tlsmod14b.so := -shared -static-libgcc -L$(top_builddir)lib LDFLAGS_tst-tlsmod15a.so := -shared -static-libgcc -L$(top_builddir)lib LDFLAGS_tst-tlsmod15b.so := -shared -static-libgcc -L$(top_builddir)lib -LDFLAGS_tst-tlsmod16.so := -shared -static-libgcc -L$(top_builddir)lib +LDFLAGS_tst-tlsmod-at-ctor.so := -shared -static-libgcc -L$(top_builddir)lib LDFLAGS_tst-tls3 := tst-tlsmod1.so tst-tlsmod4.so LDFLAGS_tst-tls4 := -ldl @@ -85,7 +85,7 @@ LDFLAGS_tst-tls12 := -Wl,-rpath-link=. tst-tlsmod12.so LDFLAGS_tst-tls13 := -ldl -Wl,-rpath-link=. LDFLAGS_tst-tls14 := -ldl -Wl,-rpath-link=. tst-tlsmod14a.so LDFLAGS_tst-tls15 := -ldl -Wl,-rpath-link=. -LDFLAGS_tst-tls16 := tst-tlsmod16.so +LDFLAGS_tst-tls-at-ctor := tst-tlsmod-at-ctor.so tst-tls3: tst-tlsmod1.so tst-tlsmod4.so tst-tls4: tst-tlsmod2.so @@ -100,7 +100,7 @@ tst-tls12: tst-tlsmod11.so tst-tlsmod12.so tst-tls13: tst-tlsmod13.so tst-tlsmod13a.so tst-tls14: tst-tlsmod14a.so tst-tlsmod14b.so tst-tls15: tst-tlsmod15b.so -tst-tls16: tst-tlsmod16.so +tst-tls-at-ctor: tst-tlsmod-at-ctor.so RET_tst-tls13 := 1 ifeq ($(TARGET_ARCH),mips) diff --git a/test/tls/tst-tls-at-ctor.c b/test/tls/tst-tls-at-ctor.c new file mode 100644 index 000000000..53aece181 --- /dev/null +++ b/test/tls/tst-tls-at-ctor.c @@ -0,0 +1,21 @@ +#include +#include +#include + +#define TLS_VAR_INIT_VALUE 99 + +#ifdef USE_TLS +extern __thread int tls_var; +#endif + +int main(void) +{ + int ret = EXIT_SUCCESS; +#ifdef USE_TLS + if (tls_var != TLS_VAR_INIT_VALUE) { + printf("tls_var = %d - Expected value = %d\n", tls_var, TLS_VAR_INIT_VALUE); + ret = EXIT_FAILURE; + } +#endif + return ret; +} diff --git a/test/tls/tst-tls16.c b/test/tls/tst-tls16.c deleted file mode 100644 index 53aece181..000000000 --- a/test/tls/tst-tls16.c +++ /dev/null @@ -1,21 +0,0 @@ -#include -#include -#include - -#define TLS_VAR_INIT_VALUE 99 - -#ifdef USE_TLS -extern __thread int tls_var; -#endif - -int main(void) -{ - int ret = EXIT_SUCCESS; -#ifdef USE_TLS - if (tls_var != TLS_VAR_INIT_VALUE) { - printf("tls_var = %d - Expected value = %d\n", tls_var, TLS_VAR_INIT_VALUE); - ret = EXIT_FAILURE; - } -#endif - return ret; -} diff --git a/test/tls/tst-tlsmod-at-ctor.c b/test/tls/tst-tlsmod-at-ctor.c new file mode 100644 index 000000000..bd04b5081 --- /dev/null +++ b/test/tls/tst-tlsmod-at-ctor.c @@ -0,0 +1,25 @@ +#include +#include + +#define TLS_VAR_INIT_VALUE 99 + +#ifdef USE_TLS +__thread int tls_var __attribute__((tls_model("global-dynamic"))); +static __thread int local_tls_var __attribute__((tls_model("local-dynamic"))); +#endif + +void __attribute__((constructor)) libtls_ctor(void); +void libtls_ctor(void) +{ + printf("libtls: constructor!\n"); +#ifdef USE_TLS + local_tls_var = TLS_VAR_INIT_VALUE; + tls_var = local_tls_var; +#endif +} + +void __attribute__((destructor)) libtls_dtor(void); +void libtls_dtor(void) +{ + printf("libtls: destructor!\n"); +} diff --git a/test/tls/tst-tlsmod16.c b/test/tls/tst-tlsmod16.c deleted file mode 100644 index bd04b5081..000000000 --- a/test/tls/tst-tlsmod16.c +++ /dev/null @@ -1,25 +0,0 @@ -#include -#include - -#define TLS_VAR_INIT_VALUE 99 - -#ifdef USE_TLS -__thread int tls_var __attribute__((tls_model("global-dynamic"))); -static __thread int local_tls_var __attribute__((tls_model("local-dynamic"))); -#endif - -void __attribute__((constructor)) libtls_ctor(void); -void libtls_ctor(void) -{ - printf("libtls: constructor!\n"); -#ifdef USE_TLS - local_tls_var = TLS_VAR_INIT_VALUE; - tls_var = local_tls_var; -#endif -} - -void __attribute__((destructor)) libtls_dtor(void); -void libtls_dtor(void) -{ - printf("libtls: destructor!\n"); -} -- cgit v1.2.3