CVS commit: src/tests/lib/libc/tls

2017-10-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 28 19:25:31 UTC 2017

Modified Files:
src/tests/lib/libc/tls: t_tls_static.c

Log Message:
fix typo


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/tls/t_tls_static.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libc/tls/t_tls_static.c
diff -u src/tests/lib/libc/tls/t_tls_static.c:1.3 src/tests/lib/libc/tls/t_tls_static.c:1.4
--- src/tests/lib/libc/tls/t_tls_static.c:1.3	Sat Oct 28 15:24:55 2017
+++ src/tests/lib/libc/tls/t_tls_static.c	Sat Oct 28 15:25:31 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_tls_static.c,v 1.3 2017/10/28 19:24:55 christos Exp $	*/
+/*	$NetBSD: t_tls_static.c,v 1.4 2017/10/28 19:25:31 christos Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_tls_static.c,v 1.3 2017/10/28 19:24:55 christos Exp $");
+__RCSID("$NetBSD: t_tls_static.c,v 1.4 2017/10/28 19:25:31 christos Exp $");
 
 #include 
 #include 
@@ -62,7 +62,7 @@ testf(void *dummy)
 #define CHECK(a, b) \
 ATF_CHECK_EQ_MSG(var ## a, b, "var%d[%d] != %d", a, var ## a, b)
 	CHECK(1, 1);
-	CHECK(1, 0);
+	CHECK(2, 0);
 	testf_helper();
 	CHECK(1, -1);
 	CHECK(2, -1);



CVS commit: src/tests/lib/libc/tls

2017-10-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 28 19:24:55 UTC 2017

Modified Files:
src/tests/lib/libc/tls: t_tls_static.c

Log Message:
make tests print the values.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/tls/t_tls_static.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libc/tls/t_tls_static.c
diff -u src/tests/lib/libc/tls/t_tls_static.c:1.2 src/tests/lib/libc/tls/t_tls_static.c:1.3
--- src/tests/lib/libc/tls/t_tls_static.c:1.2	Tue Jan 17 15:34:57 2012
+++ src/tests/lib/libc/tls/t_tls_static.c	Sat Oct 28 15:24:55 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_tls_static.c,v 1.2 2012/01/17 20:34:57 joerg Exp $	*/
+/*	$NetBSD: t_tls_static.c,v 1.3 2017/10/28 19:24:55 christos Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_tls_static.c,v 1.2 2012/01/17 20:34:57 joerg Exp $");
+__RCSID("$NetBSD: t_tls_static.c,v 1.3 2017/10/28 19:24:55 christos Exp $");
 
 #include 
 #include 
@@ -59,11 +59,13 @@ __thread int var2;
 static void *
 testf(void *dummy)
 {
-	ATF_CHECK_EQ(var1, 1);
-	ATF_CHECK_EQ(var2, 0);
+#define CHECK(a, b) \
+ATF_CHECK_EQ_MSG(var ## a, b, "var%d[%d] != %d", a, var ## a, b)
+	CHECK(1, 1);
+	CHECK(1, 0);
 	testf_helper();
-	ATF_CHECK_EQ(var1, -1);
-	ATF_CHECK_EQ(var2, -1);
+	CHECK(1, -1);
+	CHECK(2, -1);
 
 	return NULL;
 }



CVS commit: src/tests/lib/libc/tls

2016-07-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jul 18 12:17:39 UTC 2016

Modified Files:
src/tests/lib/libc/tls: Makefile

Log Message:
Not designed for PIE


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/tls/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libc/tls/Makefile
diff -u src/tests/lib/libc/tls/Makefile:1.5 src/tests/lib/libc/tls/Makefile:1.6
--- src/tests/lib/libc/tls/Makefile:1.5	Sat Jun 18 08:12:09 2016
+++ src/tests/lib/libc/tls/Makefile	Mon Jul 18 08:17:39 2016
@@ -1,5 +1,6 @@
-# $NetBSD: Makefile,v 1.5 2016/06/18 12:12:09 joerg Exp $
+# $NetBSD: Makefile,v 1.6 2016/07/18 12:17:39 christos Exp $
 
+NOPIE=yes
 .include 
 
 TESTSDIR=	${TESTSBASE}/lib/libc/tls



CVS commit: src/tests/lib/libc/tls

2016-06-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Jun 18 12:12:09 UTC 2016

Modified Files:
src/tests/lib/libc/tls: Makefile

Log Message:
Link static test program with LDSTATIC to deal with PIE.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/tls/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libc/tls/Makefile
diff -u src/tests/lib/libc/tls/Makefile:1.4 src/tests/lib/libc/tls/Makefile:1.5
--- src/tests/lib/libc/tls/Makefile:1.4	Fri Nov 18 01:32:33 2011
+++ src/tests/lib/libc/tls/Makefile	Sat Jun 18 12:12:09 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2011/11/18 01:32:33 joerg Exp $
+# $NetBSD: Makefile,v 1.5 2016/06/18 12:12:09 joerg Exp $
 
 .include 
 
@@ -16,7 +16,8 @@ DSODIR!=	cd ${.CURDIR}/../tls_dso && ${P
 
 SRCS.t_tls_static=	t_tls_static.c t_tls_static_helper.c
 DPADD.t_tls_static+=	${LIBPTHREAD}
-LDADD.t_tls_static+=	-lpthread -static
+LDADD.t_tls_static+=	-lpthread
+LDSTATIC.t_tls_static+=	-static
 DPADD.t_tls_dynamic+=	${LIBPTHREAD} ${DSODIR}/libh_tls_dynamic.so
 LDADD.t_tls_dynamic+=	-lpthread \
 			-Wl,-rpath,${TESTSDIR} -L${DSODIR} -lh_tls_dynamic



CVS commit: src/tests/lib/libc/tls/dso

2011-11-17 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Nov 17 16:39:12 UTC 2011

Modified Files:
src/tests/lib/libc/tls/dso: h_tls_dlopen.c

Log Message:
Reorder to make GCC happy.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/tls/dso/h_tls_dlopen.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libc/tls/dso/h_tls_dlopen.c
diff -u src/tests/lib/libc/tls/dso/h_tls_dlopen.c:1.2 src/tests/lib/libc/tls/dso/h_tls_dlopen.c:1.3
--- src/tests/lib/libc/tls/dso/h_tls_dlopen.c:1.2	Thu Nov 17 16:20:11 2011
+++ src/tests/lib/libc/tls/dso/h_tls_dlopen.c	Thu Nov 17 16:39:11 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_tls_dlopen.c,v 1.2 2011/11/17 16:20:11 joerg Exp $	*/
+/*	$NetBSD: h_tls_dlopen.c,v 1.3 2011/11/17 16:39:11 joerg Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: h_tls_dlopen.c,v 1.2 2011/11/17 16:20:11 joerg Exp $);
+__RCSID($NetBSD: h_tls_dlopen.c,v 1.3 2011/11/17 16:39:11 joerg Exp $);
 
 #include atf-c.h
 #include unistd.h
@@ -45,7 +45,7 @@ __RCSID($NetBSD: h_tls_dlopen.c,v 1.2 2
 extern __thread int var1;
 extern __thread int var2;
 extern __thread int *var3;
-__thread static pid_t (*local_var)(void) = getpid;
+static __thread pid_t (*local_var)(void) = getpid;
 
 void testf_dso_helper(int x, int y);
 



CVS commit: src/tests/lib/libc/tls

2011-11-17 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Nov 18 01:32:33 UTC 2011

Modified Files:
src/tests/lib/libc/tls: Makefile

Log Message:
Add some dependencies


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/tls/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libc/tls/Makefile
diff -u src/tests/lib/libc/tls/Makefile:1.3 src/tests/lib/libc/tls/Makefile:1.4
--- src/tests/lib/libc/tls/Makefile:1.3	Wed Mar 30 11:43:15 2011
+++ src/tests/lib/libc/tls/Makefile	Fri Nov 18 01:32:33 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2011/03/30 11:43:15 he Exp $
+# $NetBSD: Makefile,v 1.4 2011/11/18 01:32:33 joerg Exp $
 
 .include bsd.own.mk
 
@@ -15,9 +15,12 @@ TESTS_C+=	t_tls_dynamic t_tls_dlopen
 DSODIR!=	cd ${.CURDIR}/../tls_dso  ${PRINTOBJDIR}
 
 SRCS.t_tls_static=	t_tls_static.c t_tls_static_helper.c
+DPADD.t_tls_static+=	${LIBPTHREAD}
 LDADD.t_tls_static+=	-lpthread -static
+DPADD.t_tls_dynamic+=	${LIBPTHREAD} ${DSODIR}/libh_tls_dynamic.so
 LDADD.t_tls_dynamic+=	-lpthread \
 			-Wl,-rpath,${TESTSDIR} -L${DSODIR} -lh_tls_dynamic
+DPADD.t_tls_dlopen+=	${LIBPTHREAD}
 LDADD.t_tls_dlopen+=	-lpthread -Wl,-rpath,${TESTSDIR} -Wl,-export-dynamic
 
 .include bsd.test.mk



CVS commit: src/tests/lib/libc/tls

2011-03-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Mar 10 14:31:07 UTC 2011

Modified Files:
src/tests/lib/libc/tls: Makefile

Log Message:
Deal with all objdir methods.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/tls/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libc/tls/Makefile
diff -u src/tests/lib/libc/tls/Makefile:1.1 src/tests/lib/libc/tls/Makefile:1.2
--- src/tests/lib/libc/tls/Makefile:1.1	Wed Mar  9 23:10:07 2011
+++ src/tests/lib/libc/tls/Makefile	Thu Mar 10 14:31:07 2011
@@ -1,15 +1,17 @@
-# $NetBSD: Makefile,v 1.1 2011/03/09 23:10:07 joerg Exp $
+# $NetBSD: Makefile,v 1.2 2011/03/10 14:31:07 skrll Exp $
 
 .include bsd.own.mk
 
 TESTSDIR=	${TESTSBASE}/lib/libc/tls
 SUBDIR+=	dso
 
+DSODIR!=	cd ${.CURDIR}/../tls_dso  ${PRINTOBJDIR}
+
 TESTS_C+=	t_tls_static t_tls_dynamic t_tls_dlopen
 SRCS.t_tls_static=	t_tls_static.c t_tls_static_helper.c
 LDADD.t_tls_static+=	-lpthread -static
 LDADD.t_tls_dynamic+=	-lpthread \
-			-Wl,-rpath,${TESTSDIR} -L../tls_dso -lh_tls_dynamic
+			-Wl,-rpath,${TESTSDIR} -L${DSODIR} -lh_tls_dynamic
 LDADD.t_tls_dlopen+=	-lpthread -Wl,-rpath,${TESTSDIR} -Wl,-export-dynamic
 
 .include bsd.test.mk