All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH V3 01/23] Add knob to control whether numa support should be checked
@ 2016-07-22  4:26 Khem Raj
  2016-07-22  4:26 ` [LTP] [PATCH V3 02/23] Add knob to control tirpc support Khem Raj
                   ` (21 more replies)
  0 siblings, 22 replies; 54+ messages in thread
From: Khem Raj @ 2016-07-22  4:26 UTC (permalink / raw)
  To: ltp

From: "Roy.Li" <rongqing.li@windriver.com>

otherwise undeterministic dependency will be generated
during build depending upong numa being staged or not

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 m4/ltp-numa.m4 | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/m4/ltp-numa.m4 b/m4/ltp-numa.m4
index 60ae07b..2cef0ef 100644
--- a/m4/ltp-numa.m4
+++ b/m4/ltp-numa.m4
@@ -24,7 +24,12 @@ dnl ----------------------------
 dnl
 AC_DEFUN([LTP_CHECK_SYSCALL_NUMA],
 [dnl
-AC_CHECK_HEADERS([linux/mempolicy.h numa.h numaif.h],[
+AC_ARG_WITH(
+	[numa],
+	AC_HELP_STRING([--without-numa],
+	[without numa support]),
+	[],
+	[AC_CHECK_HEADERS([linux/mempolicy.h numa.h numaif.h],[
 	LTP_SYSCALL_NUMA_HEADERS=yes
 	AC_CHECK_LIB(numa,numa_alloc_onnode,[have_numa_alloc_onnode="yes"])
 	if  test "x$have_numa_alloc_onnode" = "xyes"; then
@@ -48,3 +53,4 @@ if test "x$have_mpol_constants" = "xyes"; then
 	AC_DEFINE(HAVE_MPOL_CONSTANTS,1,[define to 1 if you have all constants required to use mbind tests])
 fi
 )])
+])
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 02/23] Add knob to control tirpc support
  2016-07-22  4:26 [LTP] [PATCH V3 01/23] Add knob to control whether numa support should be checked Khem Raj
@ 2016-07-22  4:26 ` Khem Raj
  2016-07-26 14:35   ` Cyril Hrubis
  2016-07-22  4:26 ` [LTP] [PATCH V3 03/23] Remove including error.h, its unused Khem Raj
                   ` (20 subsequent siblings)
  21 siblings, 1 reply; 54+ messages in thread
From: Khem Raj @ 2016-07-22  4:26 UTC (permalink / raw)
  To: ltp

From: Fathi Boudra <fathi.boudra@linaro.org>

allow to disable tirpc. Helps to disable it at top level for eg. musl it
does not yet work.

Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 configure.ac | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/configure.ac b/configure.ac
index e0e9c1b..14a9aa4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -99,6 +99,13 @@ if test "x$with_python" = xyes; then
 else
     AC_SUBST([WITH_PYTHON],["no"])
 fi
+
+# TI RPC
+AC_ARG_WITH([tirpc],
+  AC_HELP_STRING([--without-tirpc],
+    [without libtirpc support]),
+  [],[with_tirpc=yes],
+)
 # END tools knobs
 
 # Testsuites knobs
@@ -171,7 +178,9 @@ LTP_CHECK_RENAMEAT2
 LTP_CHECK_FALLOCATE
 LTP_CHECK_SYSCALL_FCNTL
 LTP_CHECK_SYSCALL_PERF_EVENT_OPEN
+if test "x$with_tirpc" = xyes; then
 LTP_CHECK_TIRPC
+fi
 LTP_CHECK_TEE
 LTP_CHECK_SPLICE
 LTP_CHECK_VMSPLICE
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 03/23] Remove including error.h, its unused
  2016-07-22  4:26 [LTP] [PATCH V3 01/23] Add knob to control whether numa support should be checked Khem Raj
  2016-07-22  4:26 ` [LTP] [PATCH V3 02/23] Add knob to control tirpc support Khem Raj
@ 2016-07-22  4:26 ` Khem Raj
  2016-07-26 15:05   ` Cyril Hrubis
  2016-07-22  4:26 ` [LTP] [PATCH V3 04/23] Remove unused __BEGIN_DECLS and __END_DECLS Khem Raj
                   ` (19 subsequent siblings)
  21 siblings, 1 reply; 54+ messages in thread
From: Khem Raj @ 2016-07-22  4:26 UTC (permalink / raw)
  To: ltp

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 testcases/kernel/syscalls/faccessat/faccessat01.c   | 1 -
 testcases/kernel/syscalls/fallocate/fallocate01.c   | 1 -
 testcases/kernel/syscalls/fchmodat/fchmodat01.c     | 1 -
 testcases/kernel/syscalls/fchownat/fchownat01.c     | 1 -
 testcases/kernel/syscalls/fchownat/fchownat02.c     | 1 -
 testcases/kernel/syscalls/fstatat/fstatat01.c       | 1 -
 testcases/kernel/syscalls/futimesat/futimesat01.c   | 1 -
 testcases/kernel/syscalls/linkat/linkat01.c         | 1 -
 testcases/kernel/syscalls/linkat/linkat02.c         | 1 -
 testcases/kernel/syscalls/mkdirat/mkdirat01.c       | 1 -
 testcases/kernel/syscalls/mknodat/mknodat01.c       | 1 -
 testcases/kernel/syscalls/mknodat/mknodat02.c       | 1 -
 testcases/kernel/syscalls/openat/openat01.c         | 1 -
 testcases/kernel/syscalls/readlinkat/readlinkat01.c | 1 -
 testcases/kernel/syscalls/renameat/renameat01.c     | 1 -
 testcases/kernel/syscalls/symlinkat/symlinkat01.c   | 1 -
 testcases/kernel/syscalls/unlinkat/unlinkat01.c     | 1 -
 17 files changed, 17 deletions(-)

diff --git a/testcases/kernel/syscalls/faccessat/faccessat01.c b/testcases/kernel/syscalls/faccessat/faccessat01.c
index c9ab020..622dfd3 100644
--- a/testcases/kernel/syscalls/faccessat/faccessat01.c
+++ b/testcases/kernel/syscalls/faccessat/faccessat01.c
@@ -37,7 +37,6 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
-#include <error.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/fallocate/fallocate01.c b/testcases/kernel/syscalls/fallocate/fallocate01.c
index e72b123..c99e799 100644
--- a/testcases/kernel/syscalls/fallocate/fallocate01.c
+++ b/testcases/kernel/syscalls/fallocate/fallocate01.c
@@ -96,7 +96,6 @@
 #include <fcntl.h>
 #include <sys/syscall.h>
 #include <unistd.h>
-#include <error.h>
 #include <inttypes.h>
 #include <sys/utsname.h>
 
diff --git a/testcases/kernel/syscalls/fchmodat/fchmodat01.c b/testcases/kernel/syscalls/fchmodat/fchmodat01.c
index 0b35bf9..6bf66d8 100644
--- a/testcases/kernel/syscalls/fchmodat/fchmodat01.c
+++ b/testcases/kernel/syscalls/fchmodat/fchmodat01.c
@@ -37,7 +37,6 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
-#include <error.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/fchownat/fchownat01.c b/testcases/kernel/syscalls/fchownat/fchownat01.c
index b361253..9f4ecde 100644
--- a/testcases/kernel/syscalls/fchownat/fchownat01.c
+++ b/testcases/kernel/syscalls/fchownat/fchownat01.c
@@ -28,7 +28,6 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
-#include <error.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/fchownat/fchownat02.c b/testcases/kernel/syscalls/fchownat/fchownat02.c
index 6b0304c..d19f3f3 100644
--- a/testcases/kernel/syscalls/fchownat/fchownat02.c
+++ b/testcases/kernel/syscalls/fchownat/fchownat02.c
@@ -26,7 +26,6 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
-#include <error.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/fstatat/fstatat01.c b/testcases/kernel/syscalls/fstatat/fstatat01.c
index 128f6dd..840d7b6 100644
--- a/testcases/kernel/syscalls/fstatat/fstatat01.c
+++ b/testcases/kernel/syscalls/fstatat/fstatat01.c
@@ -28,7 +28,6 @@
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <fcntl.h>
-#include <error.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/futimesat/futimesat01.c b/testcases/kernel/syscalls/futimesat/futimesat01.c
index 858212f..514cfcf 100644
--- a/testcases/kernel/syscalls/futimesat/futimesat01.c
+++ b/testcases/kernel/syscalls/futimesat/futimesat01.c
@@ -28,7 +28,6 @@
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <fcntl.h>
-#include <error.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/linkat/linkat01.c b/testcases/kernel/syscalls/linkat/linkat01.c
index fc0687b..0e82f7f 100644
--- a/testcases/kernel/syscalls/linkat/linkat01.c
+++ b/testcases/kernel/syscalls/linkat/linkat01.c
@@ -49,7 +49,6 @@
 #include <sys/time.h>
 #include <fcntl.h>
 #include <unistd.h>
-#include <error.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/linkat/linkat02.c b/testcases/kernel/syscalls/linkat/linkat02.c
index 5fdf7e2..6766b5a 100644
--- a/testcases/kernel/syscalls/linkat/linkat02.c
+++ b/testcases/kernel/syscalls/linkat/linkat02.c
@@ -23,7 +23,6 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
-#include <error.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/mkdirat/mkdirat01.c b/testcases/kernel/syscalls/mkdirat/mkdirat01.c
index 7e15947..a323ed5 100644
--- a/testcases/kernel/syscalls/mkdirat/mkdirat01.c
+++ b/testcases/kernel/syscalls/mkdirat/mkdirat01.c
@@ -30,7 +30,6 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
-#include <error.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/mknodat/mknodat01.c b/testcases/kernel/syscalls/mknodat/mknodat01.c
index 26e5538..2e13c77 100644
--- a/testcases/kernel/syscalls/mknodat/mknodat01.c
+++ b/testcases/kernel/syscalls/mknodat/mknodat01.c
@@ -29,7 +29,6 @@
 #include <sys/types.h>
 #include <fcntl.h>
 #include <sys/stat.h>
-#include <error.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/mknodat/mknodat02.c b/testcases/kernel/syscalls/mknodat/mknodat02.c
index 7913872..0216aa2 100644
--- a/testcases/kernel/syscalls/mknodat/mknodat02.c
+++ b/testcases/kernel/syscalls/mknodat/mknodat02.c
@@ -29,7 +29,6 @@
 #include <sys/types.h>
 #include <fcntl.h>
 #include <sys/stat.h>
-#include <error.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/openat/openat01.c b/testcases/kernel/syscalls/openat/openat01.c
index 85f9a91..0441c3a 100644
--- a/testcases/kernel/syscalls/openat/openat01.c
+++ b/testcases/kernel/syscalls/openat/openat01.c
@@ -29,7 +29,6 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
-#include <error.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/readlinkat/readlinkat01.c b/testcases/kernel/syscalls/readlinkat/readlinkat01.c
index 97a49e8..985890e 100644
--- a/testcases/kernel/syscalls/readlinkat/readlinkat01.c
+++ b/testcases/kernel/syscalls/readlinkat/readlinkat01.c
@@ -29,7 +29,6 @@
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <fcntl.h>
-#include <error.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/renameat/renameat01.c b/testcases/kernel/syscalls/renameat/renameat01.c
index 18b83d8..f6797da 100644
--- a/testcases/kernel/syscalls/renameat/renameat01.c
+++ b/testcases/kernel/syscalls/renameat/renameat01.c
@@ -42,7 +42,6 @@
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <fcntl.h>
-#include <error.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/symlinkat/symlinkat01.c b/testcases/kernel/syscalls/symlinkat/symlinkat01.c
index 5c238d8..e09ca10 100644
--- a/testcases/kernel/syscalls/symlinkat/symlinkat01.c
+++ b/testcases/kernel/syscalls/symlinkat/symlinkat01.c
@@ -37,7 +37,6 @@
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <fcntl.h>
-#include <error.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
diff --git a/testcases/kernel/syscalls/unlinkat/unlinkat01.c b/testcases/kernel/syscalls/unlinkat/unlinkat01.c
index 5559650..cfc9c4d 100644
--- a/testcases/kernel/syscalls/unlinkat/unlinkat01.c
+++ b/testcases/kernel/syscalls/unlinkat/unlinkat01.c
@@ -29,7 +29,6 @@
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <fcntl.h>
-#include <error.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 04/23] Remove unused __BEGIN_DECLS and __END_DECLS
  2016-07-22  4:26 [LTP] [PATCH V3 01/23] Add knob to control whether numa support should be checked Khem Raj
  2016-07-22  4:26 ` [LTP] [PATCH V3 02/23] Add knob to control tirpc support Khem Raj
  2016-07-22  4:26 ` [LTP] [PATCH V3 03/23] Remove including error.h, its unused Khem Raj
@ 2016-07-22  4:26 ` Khem Raj
  2016-07-26 15:39   ` Cyril Hrubis
  2016-07-22  4:26 ` [LTP] [PATCH V3 05/23] guard mallocopt() with __GLIBC__ Khem Raj
                   ` (18 subsequent siblings)
  21 siblings, 1 reply; 54+ messages in thread
From: Khem Raj @ 2016-07-22  4:26 UTC (permalink / raw)
  To: ltp

Replace __s32 definitions with int32_t
its not a generally available typedef

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 testcases/kernel/syscalls/epoll2/include/epoll.h |  5 -----
 utils/sctp/include/netinet/sctp.h                | 10 +++-------
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/testcases/kernel/syscalls/epoll2/include/epoll.h b/testcases/kernel/syscalls/epoll2/include/epoll.h
index be599c7..d6976d1 100644
--- a/testcases/kernel/syscalls/epoll2/include/epoll.h
+++ b/testcases/kernel/syscalls/epoll2/include/epoll.h
@@ -84,9 +84,6 @@ struct epoll_event
   epoll_data_t data;	/* User data variable */
 } EPOLL_PACKED;
 
-
-__BEGIN_DECLS
-
 /* Creates an epoll instance.  Returns an fd for the new instance.
    The "size" parameter is a hint specifying the number of file
    descriptors to be associated with the new instance.  The fd
@@ -114,6 +111,4 @@ extern int epoll_ctl (int __epfd, int __op, int __fd,
 extern int epoll_wait (int __epfd, struct epoll_event *__events,
 		       int __maxevents, int __timeout) __THROW;
 
-__END_DECLS
-
 #endif /* sys/epoll.h */
diff --git a/utils/sctp/include/netinet/sctp.h b/utils/sctp/include/netinet/sctp.h
index 51f5bfb..c302cdb 100644
--- a/utils/sctp/include/netinet/sctp.h
+++ b/utils/sctp/include/netinet/sctp.h
@@ -37,9 +37,7 @@
 #include <linux/types.h>
 #include <sys/socket.h>
 
-__BEGIN_DECLS
-
-typedef __s32 sctp_assoc_t;
+typedef int32_t sctp_assoc_t;
 
 /* Socket option layer for SCTP */
 #ifndef SOL_SCTP
@@ -658,7 +656,7 @@ struct sctp_assoc_value {
 struct sctp_paddrinfo {
 	sctp_assoc_t		spinfo_assoc_id;
 	struct sockaddr_storage	spinfo_address;
-	__s32			spinfo_state;
+	int32_t			spinfo_state;
 	__u32			spinfo_cwnd;
 	__u32			spinfo_srtt;
 	__u32			spinfo_rto;
@@ -693,7 +691,7 @@ enum sctp_spinfo_state {
  */
 struct sctp_status {
 	sctp_assoc_t		sstat_assoc_id;
-	__s32			sstat_state;
+	int32_t			sstat_state;
 	__u32			sstat_rwnd;
 	__u16			sstat_unackdata;
 	__u16			sstat_penddata;
@@ -862,6 +860,4 @@ int sctp_recvmsg(int s, void *msg, size_t len, struct sockaddr *from,
 /* Return the address length for an address family. */
 int sctp_getaddrlen(sa_family_t family);
 
-__END_DECLS
-
 #endif /* __linux_sctp_h__ */
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 05/23] guard mallocopt() with __GLIBC__
  2016-07-22  4:26 [LTP] [PATCH V3 01/23] Add knob to control whether numa support should be checked Khem Raj
                   ` (2 preceding siblings ...)
  2016-07-22  4:26 ` [LTP] [PATCH V3 04/23] Remove unused __BEGIN_DECLS and __END_DECLS Khem Raj
@ 2016-07-22  4:26 ` Khem Raj
  2016-07-26 15:44   ` Cyril Hrubis
  2016-07-22  4:26 ` [LTP] [PATCH V3 06/23] Use unsigned int instead of uint Khem Raj
                   ` (17 subsequent siblings)
  21 siblings, 1 reply; 54+ messages in thread
From: Khem Raj @ 2016-07-22  4:26 UTC (permalink / raw)
  To: ltp

mallocopt is not available on non glibc implementations

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 utils/benchmark/ebizzy-0.3/ebizzy.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/utils/benchmark/ebizzy-0.3/ebizzy.c b/utils/benchmark/ebizzy-0.3/ebizzy.c
index 5bb8eff..f9ccc8b 100644
--- a/utils/benchmark/ebizzy-0.3/ebizzy.c
+++ b/utils/benchmark/ebizzy-0.3/ebizzy.c
@@ -215,10 +215,12 @@ static void read_options(int argc, char *argv[])
 			"\"never mmap\" option specified\n");
 		usage();
 	}
-
+#ifdef __GLIBC__
 	if (never_mmap)
 		mallopt(M_MMAP_MAX, 0);
-
+#else
+	fprintf(stderr, "Platform does not support mallopt() API\n");
+#endif
 	if (chunk_size < record_size) {
 		fprintf(stderr, "Chunk size %u smaller than record size %u\n",
 			chunk_size, record_size);
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 06/23] Use unsigned int instead of uint
  2016-07-22  4:26 [LTP] [PATCH V3 01/23] Add knob to control whether numa support should be checked Khem Raj
                   ` (3 preceding siblings ...)
  2016-07-22  4:26 ` [LTP] [PATCH V3 05/23] guard mallocopt() with __GLIBC__ Khem Raj
@ 2016-07-22  4:26 ` Khem Raj
  2016-07-26 15:51   ` Cyril Hrubis
  2016-07-22  4:26 ` [LTP] [PATCH V3 07/23] ptrace: Use int instead of enum __ptrace_request Khem Raj
                   ` (16 subsequent siblings)
  21 siblings, 1 reply; 54+ messages in thread
From: Khem Raj @ 2016-07-22  4:26 UTC (permalink / raw)
  To: ltp

Fixes

error: unknown type name 'uint'

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 testcases/kernel/ipc/ipc_stress/shmem_test_04.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/ipc/ipc_stress/shmem_test_04.c b/testcases/kernel/ipc/ipc_stress/shmem_test_04.c
index 72c2e60..41aa3f4 100644
--- a/testcases/kernel/ipc/ipc_stress/shmem_test_04.c
+++ b/testcases/kernel/ipc/ipc_stress/shmem_test_04.c
@@ -116,7 +116,7 @@ typedef unsigned long ulong_t;
  * sys_error (): System error message function
  * error (): Error message function
  */
-static int mkemptyfile(uint);
+static int mkemptyfile(unsigned int);
 static void parse_args(int, char **);
 static void cleanup(int);
 static void setup_signal_handlers();
@@ -476,7 +476,7 @@ static void int_handler(int sig)
  *
  * Make an empty temporary file of a given size and return its descriptor.
  */
-static int mkemptyfile(uint size)
+static int mkemptyfile(unsigned int size)
 {
 #ifdef _LINUX_
 
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 07/23] ptrace: Use int instead of enum __ptrace_request
  2016-07-22  4:26 [LTP] [PATCH V3 01/23] Add knob to control whether numa support should be checked Khem Raj
                   ` (4 preceding siblings ...)
  2016-07-22  4:26 ` [LTP] [PATCH V3 06/23] Use unsigned int instead of uint Khem Raj
@ 2016-07-22  4:26 ` Khem Raj
       [not found]   ` <20160722042656.22346-7-raj.khem-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2016-07-22  4:26 ` [LTP] [PATCH V3 08/23] rt_sigaction/rt_sigprocmark: Replace SA_NOMASK with SA_NODEFER Khem Raj
                   ` (15 subsequent siblings)
  21 siblings, 1 reply; 54+ messages in thread
From: Khem Raj @ 2016-07-22  4:26 UTC (permalink / raw)
  To: ltp

__ptrace_request is only available with glibc

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 testcases/kernel/syscalls/ptrace/ptrace03.c           | 2 +-
 testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/syscalls/ptrace/ptrace03.c b/testcases/kernel/syscalls/ptrace/ptrace03.c
index a4028fc..f326b83 100644
--- a/testcases/kernel/syscalls/ptrace/ptrace03.c
+++ b/testcases/kernel/syscalls/ptrace/ptrace03.c
@@ -102,7 +102,7 @@ static pid_t unused_pid;
 static pid_t zero_pid;
 
 struct test_case_t {
-	enum __ptrace_request request;
+	int request;
 	pid_t *pid;
 	int exp_errno;
 } test_cases[] = {
diff --git a/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h b/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h
index ae538e9..83de9b4 100644
--- a/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h
+++ b/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h
@@ -130,7 +130,7 @@ static char *strings[] = {
 	SPT(KILL)
 	SPT(SINGLESTEP)
 };
-static inline char *strptrace(enum __ptrace_request request)
+static inline char *strptrace(int request)
 {
 	return strings[request];
 }
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 08/23] rt_sigaction/rt_sigprocmark: Replace SA_NOMASK with SA_NODEFER
  2016-07-22  4:26 [LTP] [PATCH V3 01/23] Add knob to control whether numa support should be checked Khem Raj
                   ` (5 preceding siblings ...)
  2016-07-22  4:26 ` [LTP] [PATCH V3 07/23] ptrace: Use int instead of enum __ptrace_request Khem Raj
@ 2016-07-22  4:26 ` Khem Raj
  2016-07-27 10:14   ` Cyril Hrubis
  2016-07-22  4:26 ` [LTP] [PATCH V3 09/23] mc_gethost: Use unsigned char instead of u_char Khem Raj
                   ` (14 subsequent siblings)
  21 siblings, 1 reply; 54+ messages in thread
From: Khem Raj @ 2016-07-22  4:26 UTC (permalink / raw)
  To: ltp

Fixes musl build failure e.g.
error: 'SA_NOMASK' undeclared here (not in a function)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c | 4 ++--
 testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c | 5 ++---
 testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c | 4 ++--
 testcases/kernel/syscalls/sigaction/sigaction02.c       | 2 +-
 testcases/misc/crash/crash01.c                          | 4 ++--
 testcases/misc/crash/crash02.c                          | 3 +--
 6 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c
index 5cf89cc..e07b974 100644
--- a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c
+++ b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction01.c
@@ -57,10 +57,10 @@ static void setup(void)
 
 static int test_flags[] =
     { SA_RESETHAND | SA_SIGINFO, SA_RESETHAND, SA_RESETHAND | SA_SIGINFO,
-SA_RESETHAND | SA_SIGINFO, SA_NOMASK };
+SA_RESETHAND | SA_SIGINFO, SA_NODEFER };
 char *test_flags_list[] =
     { "SA_RESETHAND|SA_SIGINFO", "SA_RESETHAND", "SA_RESETHAND|SA_SIGINFO",
-"SA_RESETHAND|SA_SIGINFO", "SA_NOMASK" };
+"SA_RESETHAND|SA_SIGINFO", "SA_NODEFER" };
 
 static void handler(int sig)
 {
diff --git a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c
index a1da743..594b260 100644
--- a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c
+++ b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction02.c
@@ -23,7 +23,6 @@
 /* Description: This tests the rt_sigaction() syscall                         */
 /*		rt_sigaction Expected EFAULT error check                      */
 /******************************************************************************/
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -55,10 +54,10 @@ void setup(void)
 
 static int test_flags[] =
     { SA_RESETHAND | SA_SIGINFO, SA_RESETHAND, SA_RESETHAND | SA_SIGINFO,
-SA_RESETHAND | SA_SIGINFO, SA_NOMASK };
+SA_RESETHAND | SA_SIGINFO, SA_NODEFER };
 char *test_flags_list[] =
     { "SA_RESETHAND|SA_SIGINFO", "SA_RESETHAND", "SA_RESETHAND|SA_SIGINFO",
-"SA_RESETHAND|SA_SIGINFO", "SA_NOMASK" };
+"SA_RESETHAND|SA_SIGINFO", "SA_NODEFER" };
 
 static struct test_case_t {
 	int exp_errno;
diff --git a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c
index 175d220..991c87f 100644
--- a/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c
+++ b/testcases/kernel/syscalls/rt_sigaction/rt_sigaction03.c
@@ -55,10 +55,10 @@ static void setup(void)
 
 static int test_flags[] =
     { SA_RESETHAND | SA_SIGINFO, SA_RESETHAND, SA_RESETHAND | SA_SIGINFO,
-SA_RESETHAND | SA_SIGINFO, SA_NOMASK };
+SA_RESETHAND | SA_SIGINFO, SA_NODEFER };
 char *test_flags_list[] =
     { "SA_RESETHAND|SA_SIGINFO", "SA_RESETHAND", "SA_RESETHAND|SA_SIGINFO",
-"SA_RESETHAND|SA_SIGINFO", "SA_NOMASK" };
+"SA_RESETHAND|SA_SIGINFO", "SA_NODEFER" };
 
 static struct test_case_t {
 	int exp_errno;
diff --git a/testcases/kernel/syscalls/sigaction/sigaction02.c b/testcases/kernel/syscalls/sigaction/sigaction02.c
index 641a04e..8641bfc 100644
--- a/testcases/kernel/syscalls/sigaction/sigaction02.c
+++ b/testcases/kernel/syscalls/sigaction/sigaction02.c
@@ -91,7 +91,7 @@ int set_handler(int sig, int sig_to_mask, int flag)
 
 	if (flag == 0) {
 		sa.sa_sigaction = (void *)handler;
-		sa.sa_flags = SA_NOMASK;
+		sa.sa_flags = SA_NODEFER;
 		sigemptyset(&sa.sa_mask);
 		sigaddset(&sa.sa_mask, sig_to_mask);
 		err = sigaction(sig, &sa, NULL);
diff --git a/testcases/misc/crash/crash01.c b/testcases/misc/crash/crash01.c
index 0574521..614b7e8 100644
--- a/testcases/misc/crash/crash01.c
+++ b/testcases/misc/crash/crash01.c
@@ -49,7 +49,7 @@ stress test at the same time you run other tests, like a multi-user
 benchmark.
 
 */
-
+#define _GNU_SOURCE
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -409,7 +409,7 @@ void my_signal(int sig, void (*func) ())
 
 	act.sa_handler = func;
 	memset(&act.sa_mask, 0x00, sizeof(sigset_t));
-	act.sa_flags = SA_NOMASK | SA_RESTART;
+	act.sa_flags = SA_NODEFER | SA_RESTART;
 	sigaction(sig, &act, 0);
 }
 
diff --git a/testcases/misc/crash/crash02.c b/testcases/misc/crash/crash02.c
index 00fee34..1aba3b9 100644
--- a/testcases/misc/crash/crash02.c
+++ b/testcases/misc/crash/crash02.c
@@ -49,7 +49,6 @@ TODO:
 	* Does a syscall is supposed to send SIGSEGV?
 */
 
-#define _GNU_SOURCE
 #include <sys/syscall.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -358,7 +357,7 @@ void my_signal(int sig, void (*func) ())
 
 	act.sa_handler = func;
 	memset(&act.sa_mask, 0x00, sizeof(sigset_t));
-	act.sa_flags = SA_NOMASK | SA_RESTART;
+	act.sa_flags = SA_NODEFER | SA_RESTART;
 	sigaction(sig, &act, 0);
 }
 
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 09/23] mc_gethost: Use unsigned char instead of u_char
  2016-07-22  4:26 [LTP] [PATCH V3 01/23] Add knob to control whether numa support should be checked Khem Raj
                   ` (6 preceding siblings ...)
  2016-07-22  4:26 ` [LTP] [PATCH V3 08/23] rt_sigaction/rt_sigprocmark: Replace SA_NOMASK with SA_NODEFER Khem Raj
@ 2016-07-22  4:26 ` Khem Raj
  2016-07-27 10:20   ` Cyril Hrubis
  2016-07-22  4:26 ` [LTP] [PATCH V3 10/23] sysconf01: Use _SC_2_C_VERSION conditionally Khem Raj
                   ` (13 subsequent siblings)
  21 siblings, 1 reply; 54+ messages in thread
From: Khem Raj @ 2016-07-22  4:26 UTC (permalink / raw)
  To: ltp

Fix build on musl
error: unknown type name 'u_char'

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 testcases/network/multicast/mc_gethost/mc_gethost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/network/multicast/mc_gethost/mc_gethost.c b/testcases/network/multicast/mc_gethost/mc_gethost.c
index 5b9a790..a5c5d01 100644
--- a/testcases/network/multicast/mc_gethost/mc_gethost.c
+++ b/testcases/network/multicast/mc_gethost/mc_gethost.c
@@ -25,7 +25,7 @@ int main(argc, argv)
 int argc;
 char **argv;
 {
-	u_char b_addr[IN6ADDRSZ];
+	unsigned char b_addr[IN6ADDRSZ];
 	struct hostent *host;
 	char **ap, **cp, *arg;
 	const char *prog = "amnesia";
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 10/23] sysconf01: Use _SC_2_C_VERSION conditionally
  2016-07-22  4:26 [LTP] [PATCH V3 01/23] Add knob to control whether numa support should be checked Khem Raj
                   ` (7 preceding siblings ...)
  2016-07-22  4:26 ` [LTP] [PATCH V3 09/23] mc_gethost: Use unsigned char instead of u_char Khem Raj
@ 2016-07-22  4:26 ` Khem Raj
  2016-08-01 15:36   ` Cyril Hrubis
  2016-07-22  4:26 ` [LTP] [PATCH V3 11/23] lapi: Use sig_t instead of sighandler_t Khem Raj
                   ` (12 subsequent siblings)
  21 siblings, 1 reply; 54+ messages in thread
From: Khem Raj @ 2016-07-22  4:26 UTC (permalink / raw)
  To: ltp

_SC_2_C_VERSION is not available on musl

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 testcases/kernel/syscalls/sysconf/sysconf01.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/testcases/kernel/syscalls/sysconf/sysconf01.c b/testcases/kernel/syscalls/sysconf/sysconf01.c
index 8542e77..7ebae23 100644
--- a/testcases/kernel/syscalls/sysconf/sysconf01.c
+++ b/testcases/kernel/syscalls/sysconf/sysconf01.c
@@ -102,7 +102,9 @@ int main(void)
 	test_sysconf(_SC_ATEXIT_MAX);
 	test_sysconf(_SC_2_C_BIND);
 	test_sysconf(_SC_2_C_DEV);
+#ifdef _SC_2_C_VERSION
 	test_sysconf(_SC_2_C_VERSION);
+#endif
 	/* 21 - 25 */
 	test_sysconf(_SC_2_CHAR_TERM);
 	test_sysconf(_SC_2_FORT_DEV);
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 11/23] lapi: Use sig_t instead of sighandler_t
  2016-07-22  4:26 [LTP] [PATCH V3 01/23] Add knob to control whether numa support should be checked Khem Raj
                   ` (8 preceding siblings ...)
  2016-07-22  4:26 ` [LTP] [PATCH V3 10/23] sysconf01: Use _SC_2_C_VERSION conditionally Khem Raj
@ 2016-07-22  4:26 ` Khem Raj
  2016-07-27 10:22   ` Cyril Hrubis
  2016-07-22  4:26 ` [LTP] [PATCH V3 12/23] trace_shed: Adapt to glibc 2.24 removal of union wait type Khem Raj
                   ` (11 subsequent siblings)
  21 siblings, 1 reply; 54+ messages in thread
From: Khem Raj @ 2016-07-22  4:26 UTC (permalink / raw)
  To: ltp

sighandler_t is GNU specific

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 include/lapi/rt_sigaction.h                      | 2 +-
 testcases/kernel/syscalls/rt_sigsuspend/Makefile | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/lapi/rt_sigaction.h b/include/lapi/rt_sigaction.h
index a107786..7efee33 100644
--- a/include/lapi/rt_sigaction.h
+++ b/include/lapi/rt_sigaction.h
@@ -34,7 +34,7 @@
 #define INVAL_SA_PTR ((void *)-1)
 
 struct kernel_sigaction {
-	__sighandler_t k_sa_handler;
+	sig_t k_sa_handler;
 	unsigned long sa_flags;
 	void (*sa_restorer) (void);
 	sigset_t sa_mask;
diff --git a/testcases/kernel/syscalls/rt_sigsuspend/Makefile b/testcases/kernel/syscalls/rt_sigsuspend/Makefile
index 37bc3a9..2ef86f0 100644
--- a/testcases/kernel/syscalls/rt_sigsuspend/Makefile
+++ b/testcases/kernel/syscalls/rt_sigsuspend/Makefile
@@ -19,4 +19,5 @@
 top_srcdir		?= ../../../..
 
 include $(top_srcdir)/include/mk/testcases.mk
+
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 12/23] trace_shed: Adapt to glibc 2.24 removal of union wait type
  2016-07-22  4:26 [LTP] [PATCH V3 01/23] Add knob to control whether numa support should be checked Khem Raj
                   ` (9 preceding siblings ...)
  2016-07-22  4:26 ` [LTP] [PATCH V3 11/23] lapi: Use sig_t instead of sighandler_t Khem Raj
@ 2016-07-22  4:26 ` Khem Raj
  2016-08-01 15:22   ` Cyril Hrubis
  2016-07-22  4:26 ` [LTP] [PATCH V3 13/23] vma03: fix page size offset as per page size alignment Khem Raj
                   ` (10 subsequent siblings)
  21 siblings, 1 reply; 54+ messages in thread
From: Khem Raj @ 2016-07-22  4:26 UTC (permalink / raw)
  To: ltp

This is now needed since glibc commit
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b49ab5f4503f36dcbf43f821f817da66b2931fe6;hp=5f5682b9654101ccaf375c2814cbddbe6033a725

The thread return status is
either -1 or pointer to the table. So there is no point in passing it to
WEXITSTATUS() and priting the value

fixes below error

trace_sched.c:425:16: error: invalid operands to binary & (have
'thread_sched_t * {aka struct <anonymous> *}' and 'int')
      thrd_ndx, WEXITSTATUS(status));

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 testcases/kernel/sched/tool/trace_sched.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/sched/tool/trace_sched.c b/testcases/kernel/sched/tool/trace_sched.c
index 7815686..71caf23 100644
--- a/testcases/kernel/sched/tool/trace_sched.c
+++ b/testcases/kernel/sched/tool/trace_sched.c
@@ -421,8 +421,8 @@ int main(int argc,		/* number of input parameters.                        */
 		} else {
 			if (status == (thread_sched_t *) - 1) {
 				fprintf(stderr,
-					"thread [%d] - process exited with errors %d\n",
-					thrd_ndx, WEXITSTATUS(status));
+					"thread [%d] - process exited with exit code -1\n",
+					thrd_ndx);
 				exit(-1);
 			} else {
 				exp_prio[thrd_ndx] = status->exp_prio;
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 13/23] vma03: fix page size offset as per page size alignment
  2016-07-22  4:26 [LTP] [PATCH V3 01/23] Add knob to control whether numa support should be checked Khem Raj
                   ` (10 preceding siblings ...)
  2016-07-22  4:26 ` [LTP] [PATCH V3 12/23] trace_shed: Adapt to glibc 2.24 removal of union wait type Khem Raj
@ 2016-07-22  4:26 ` Khem Raj
  2016-07-27 13:45   ` Cyril Hrubis
  2016-07-22  4:26 ` [LTP] [PATCH V3 14/23] shmat1: Cover GNU specific code under __USE_GNU Khem Raj
                   ` (9 subsequent siblings)
  21 siblings, 1 reply; 54+ messages in thread
From: Khem Raj @ 2016-07-22  4:26 UTC (permalink / raw)
  To: ltp

the offset the param of mmap2() doesn't align the page size, but,
this param allow must be a multiple of the page size as returned
by sysconf(_SC_PAGE_SIZE).meanwhile offset * 4096 must be a
multiple of the system page size, so modify the input param of offset
pgoff = (ULONG_MAX - 1)&(~((pgsz-1)>>12));

needed on ppc64 with 64K pagesize

Signed-off-by: Chuang Dong <Chuang.Dong@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 testcases/kernel/mem/vma/vma03.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/mem/vma/vma03.c b/testcases/kernel/mem/vma/vma03.c
index ad8a7b4..a539233 100644
--- a/testcases/kernel/mem/vma/vma03.c
+++ b/testcases/kernel/mem/vma/vma03.c
@@ -85,7 +85,7 @@ int main(int argc, char *argv[])
 		if (fd == -1)
 			tst_brkm(TBROK | TERRNO, NULL, "open %s", TESTFILE);
 
-		pgoff = ULONG_MAX - 1;
+		pgoff = (ULONG_MAX - 1)&(~((pgsz-1)>>12));
 		map = mmap2(NULL, pgsz, PROT_READ | PROT_WRITE, MAP_PRIVATE,
 			    fd, pgoff);
 		if (map == MAP_FAILED)
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 14/23] shmat1: Cover GNU specific code under __USE_GNU
  2016-07-22  4:26 [LTP] [PATCH V3 01/23] Add knob to control whether numa support should be checked Khem Raj
                   ` (11 preceding siblings ...)
  2016-07-22  4:26 ` [LTP] [PATCH V3 13/23] vma03: fix page size offset as per page size alignment Khem Raj
@ 2016-07-22  4:26 ` Khem Raj
  2016-07-27 14:17   ` Cyril Hrubis
  2016-07-22  4:26 ` [LTP] [PATCH V3 15/23] Add periodic output for long time test Khem Raj
                   ` (8 subsequent siblings)
  21 siblings, 1 reply; 54+ messages in thread
From: Khem Raj @ 2016-07-22  4:26 UTC (permalink / raw)
  To: ltp

on x86, we use uc_mcontext element from sigcontext
which is marked gnu-specific in glibc, this patch
adds this condition around the code

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 testcases/kernel/mem/mtest06/shmat1.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/mem/mtest06/shmat1.c b/testcases/kernel/mem/mtest06/shmat1.c
index 0d6d7a4..bee69f6 100644
--- a/testcases/kernel/mem/mtest06/shmat1.c
+++ b/testcases/kernel/mem/mtest06/shmat1.c
@@ -111,7 +111,7 @@ int done_shmat = 0;		/* disallow read and writes before shmat      */
 static void sig_handler(int signal,	/* signal number, set to handle SIGALRM       */
 			int code, struct ucontext *ut)
 {				/* contains pointer to sigcontext structure   */
-#ifdef __i386__
+#if defined(__i386__) && defined(__USE_GNU)
 	unsigned long except;	/* exception type.                            */
 	int ret = 0;		/* exit code from signal handler.             */
 	struct sigcontext *scp =	/* pointer to sigcontext structure            */
@@ -122,7 +122,7 @@ static void sig_handler(int signal,	/* signal number, set to handle SIGALRM
 		fprintf(stdout, "Test ended, success\n");
 		exit(0);
 	}
-#ifdef __i386__
+#if defined(__i386__) && defined(__USE_GNU)
 	else {
 		except = scp->trapno;
 		fprintf(stderr, "signal caught - [%d] ", signal);
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 15/23] Add periodic output for long time test.
  2016-07-22  4:26 [LTP] [PATCH V3 01/23] Add knob to control whether numa support should be checked Khem Raj
                   ` (12 preceding siblings ...)
  2016-07-22  4:26 ` [LTP] [PATCH V3 14/23] shmat1: Cover GNU specific code under __USE_GNU Khem Raj
@ 2016-07-22  4:26 ` Khem Raj
  2016-07-27 14:37   ` Cyril Hrubis
  2016-07-22  4:26 ` [LTP] [PATCH V3 16/23] Fix test_proc_kill hanging Khem Raj
                   ` (7 subsequent siblings)
  21 siblings, 1 reply; 54+ messages in thread
From: Khem Raj @ 2016-07-22  4:26 UTC (permalink / raw)
  To: ltp

From: Tudor Florea <tudor.florea@enea.com>

This is needed in context of having scripts running ltp tests and
waiting with a timeout for the output of the tests.

Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../kernel/controllers/memcg/stress/memcg_stress_test.sh      | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
index dc610f1..769da72 100755
--- a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
+++ b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
@@ -37,7 +37,8 @@ if [ "x$(grep -w memory /proc/cgroups | cut -f4)" != "x1" ]; then
         exit 0
 fi
 
-RUN_TIME=$(( 60 * 60 ))
+ONE_MINUTE=60
+RUN_TIME=60
 
 cleanup()
 {
@@ -62,7 +63,7 @@ do_mount()
 # $1 - Number of cgroups
 # $2 - Allocated how much memory in one process? in MB
 # $3 - The interval to touch memory in a process
-# $4 - How long does this test run ? in second
+# $4 - How long does this test run ? in minutes
 run_stress()
 {
 	do_mount;
@@ -81,7 +82,11 @@ run_stress()
 		eval /bin/kill -s SIGUSR1 \$pid$i 2> /dev/null
 	done
 
-	sleep $4
+	for i in $(seq 0 $(($4-1)))
+	do
+		eval echo "Started $i min ago. Still alive... " 
+		sleep $ONE_MINUTE
+	done
 
 	for i in $(seq 0 $(($1-1)))
 	do
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 16/23] Fix test_proc_kill hanging
  2016-07-22  4:26 [LTP] [PATCH V3 01/23] Add knob to control whether numa support should be checked Khem Raj
                   ` (13 preceding siblings ...)
  2016-07-22  4:26 ` [LTP] [PATCH V3 15/23] Add periodic output for long time test Khem Raj
@ 2016-07-22  4:26 ` Khem Raj
  2016-07-27 14:46   ` Cyril Hrubis
  2016-07-22  4:26 ` [LTP] [PATCH V3 17/23] initialize recursive mutex in a portable way Khem Raj
                   ` (6 subsequent siblings)
  21 siblings, 1 reply; 54+ messages in thread
From: Khem Raj @ 2016-07-22  4:26 UTC (permalink / raw)
  To: ltp

From: George Nita <george.nita@enea.com>

Sometimes the signal is delivered to memcg_process before the framework took
into consideration its pid entered in the tasks. Fixed by delaying the signal
send command.

Signed-off-by: George Nita <george.nita@enea.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 testcases/kernel/controllers/memcg/functional/memcg_lib.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
index c90d0a2..331e75b 100755
--- a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
+++ b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
@@ -220,8 +220,8 @@ test_proc_kill()
 
 	$TEST_PATH/memcg_process $2 -s $3 &
 	pid=$!
-	sleep 1
 	echo $pid > tasks
+	sleep 1
 
 	kill -s USR1 $pid 2> /dev/null
 	sleep 1
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 17/23] initialize recursive mutex in a portable way
  2016-07-22  4:26 [LTP] [PATCH V3 01/23] Add knob to control whether numa support should be checked Khem Raj
                   ` (14 preceding siblings ...)
  2016-07-22  4:26 ` [LTP] [PATCH V3 16/23] Fix test_proc_kill hanging Khem Raj
@ 2016-07-22  4:26 ` Khem Raj
  2016-07-27 15:30   ` Cyril Hrubis
  2016-07-22  4:26 ` [LTP] [PATCH V3 18/23] replace SIGCLD with SIGCHLD Khem Raj
                   ` (5 subsequent siblings)
  21 siblings, 1 reply; 54+ messages in thread
From: Khem Raj @ 2016-07-22  4:26 UTC (permalink / raw)
  To: ltp

PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is not in POSIX

use the portable way instead: pthread_once was designed for such
cases.

Link with libpthread wherever libltp is asked for

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 include/mk/testcases.mk                    |  2 +-
 lib/ltp.pc.in                              |  2 +-
 lib/newlib_tests/Makefile                  |  2 +-
 lib/tests/Makefile                         |  2 +-
 lib/tst_res.c                              | 18 +++++++++++++++++-
 testcases/kernel/containers/netns/Makefile |  2 +-
 testcases/kernel/containers/share/Makefile |  2 +-
 7 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/include/mk/testcases.mk b/include/mk/testcases.mk
index ea26d4f..eff0eee 100644
--- a/include/mk/testcases.mk
+++ b/include/mk/testcases.mk
@@ -49,7 +49,7 @@ CPPFLAGS	+= -I$(abs_top_builddir)/$(TKI_DIR)
 
 INSTALL_DIR	:= testcases/bin
 
-LDLIBS		+= -lltp
+LDLIBS		+= -lltp -lpthread
 
 $(APICMDS_DIR) $(LIBLTP_DIR) $(abs_top_builddir)/$(TKI_DIR): %:
 	mkdir -p "$@"
diff --git a/lib/ltp.pc.in b/lib/ltp.pc.in
index 9620129..63cd5f4 100644
--- a/lib/ltp.pc.in
+++ b/lib/ltp.pc.in
@@ -6,5 +6,5 @@ libdir=@libdir@
 Name: LTP
 Description: Linux Test Project
 Version: @VERSION@
-Libs: -L${libdir} -lltp
+Libs: -L${libdir} -lltp -lpthread
 Cflags: -I${includedir}
diff --git a/lib/newlib_tests/Makefile b/lib/newlib_tests/Makefile
index 0e4eeb8..9dd69fd 100644
--- a/lib/newlib_tests/Makefile
+++ b/lib/newlib_tests/Makefile
@@ -3,7 +3,7 @@ top_srcdir		?= ../..
 include $(top_srcdir)/include/mk/env_pre.mk
 
 CFLAGS			+= -W -Wall
-LDLIBS			+= -lltp
+LDLIBS			+= -lltp -lpthread
 
 test08: CFLAGS+=-pthread
 test09: CFLAGS+=-pthread
diff --git a/lib/tests/Makefile b/lib/tests/Makefile
index 73a0f16..bc4476d 100644
--- a/lib/tests/Makefile
+++ b/lib/tests/Makefile
@@ -3,7 +3,7 @@ top_srcdir		?= ../..
 include $(top_srcdir)/include/mk/env_pre.mk
 
 CFLAGS			+= -W
-LDLIBS			+= -lltp
+LDLIBS			+= -lltp -lpthread
 
 tst_cleanup_once: CFLAGS += -pthread
 
diff --git a/lib/tst_res.c b/lib/tst_res.c
index b388d0d..ab995f8 100644
--- a/lib/tst_res.c
+++ b/lib/tst_res.c
@@ -79,7 +79,8 @@ int TEST_ERRNO;
 	assert(strlen(buf) > 0);		\
 } while (0)
 
-static pthread_mutex_t tmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+static pthread_once_t tmutex_once = PTHREAD_ONCE_INIT;
+static pthread_mutex_t tmutex;
 
 static void check_env(void);
 static void tst_condense(int tnum, int ttype, const char *tmesg);
@@ -142,9 +143,20 @@ const char *strttype(int ttype)
 #include "errnos.h"
 #include "signame.h"
 
+static void init_tmutex(void)
+{
+	pthread_mutexattr_t attr;
+
+	pthread_mutexattr_init(&attr);
+	pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
+	pthread_mutex_init(&tmutex, &attr);
+	pthread_mutexattr_destroy(&attr);
+}
+
 static void tst_res__(const char *file, const int lineno, int ttype,
                       const char *arg_fmt, ...)
 {
+	pthread_once(&tmutex_once, init_tmutex);
 	pthread_mutex_lock(&tmutex);
 
 	char tmesg[USERMESG];
@@ -233,6 +245,7 @@ void tst_flush(void)
 {
 	NO_NEWLIB_ASSERT("Unknown", 0);
 
+	pthread_once(&tmutex_once, init_tmutex);
 	pthread_mutex_lock(&tmutex);
 
 	/*
@@ -369,6 +382,7 @@ void tst_exit(void)
 {
 	NO_NEWLIB_ASSERT("Unknown", 0);
 
+	pthread_once(&tmutex_once, init_tmutex);
 	pthread_mutex_lock(&tmutex);
 
 	tst_flush();
@@ -441,6 +455,7 @@ static int tst_brk_entered = 0;
 static void tst_brk__(const char *file, const int lineno, int ttype,
                       void (*func)(void), const char *arg_fmt, ...)
 {
+	pthread_once(&tmutex_once, init_tmutex);
 	pthread_mutex_lock(&tmutex);
 
 	char tmesg[USERMESG];
@@ -505,6 +520,7 @@ void tst_resm_hexd_(const char *file, const int lineno, int ttype,
 {
 	NO_NEWLIB_ASSERT(file, lineno);
 
+	pthread_once(&tmutex_once, init_tmutex);
 	pthread_mutex_lock(&tmutex);
 
 	char tmesg[USERMESG];
diff --git a/testcases/kernel/containers/netns/Makefile b/testcases/kernel/containers/netns/Makefile
index 3756a55..b2411cd 100644
--- a/testcases/kernel/containers/netns/Makefile
+++ b/testcases/kernel/containers/netns/Makefile
@@ -22,6 +22,6 @@ top_srcdir              ?= ../../../..
 include $(top_srcdir)/include/mk/testcases.mk
 include $(abs_srcdir)/../Makefile.inc
 
-LDLIBS                  := -lclone -lltp
+LDLIBS                  := -lclone -lltp -lpthread
 
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/kernel/containers/share/Makefile b/testcases/kernel/containers/share/Makefile
index 962d688..cd79f99 100644
--- a/testcases/kernel/containers/share/Makefile
+++ b/testcases/kernel/containers/share/Makefile
@@ -17,6 +17,6 @@ top_srcdir              ?= ../../../..
 include $(top_srcdir)/include/mk/testcases.mk
 include $(abs_srcdir)/../Makefile.inc
 
-LDLIBS                  := -lltp
+LDLIBS                  := -lltp -lpthread
 
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 18/23] replace SIGCLD with SIGCHLD
  2016-07-22  4:26 [LTP] [PATCH V3 01/23] Add knob to control whether numa support should be checked Khem Raj
                   ` (15 preceding siblings ...)
  2016-07-22  4:26 ` [LTP] [PATCH V3 17/23] initialize recursive mutex in a portable way Khem Raj
@ 2016-07-22  4:26 ` Khem Raj
  2016-07-27 16:24   ` Cyril Hrubis
  2016-07-22  4:26 ` [LTP] [PATCH V3 19/23] creat06: Include limits.h for PATH_MAX Khem Raj
                   ` (4 subsequent siblings)
  21 siblings, 1 reply; 54+ messages in thread
From: Khem Raj @ 2016-07-22  4:26 UTC (permalink / raw)
  To: ltp

SIGCLD is defined with SIGCHLD anyway

see

bits/signum.h:#define     SIGCLD          SIGCHLD /* Same as SIGCHLD(System V).  */

additionally these tests can now compile on systemd with
musl libc

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 doc/man3/tst_sig.3                               |  8 ++++----
 doc/man3/tst_tmpdir.3                            |  2 +-
 include/old/test.h                               |  4 ++--
 include/tst_cmd.h                                |  2 +-
 lib/signame.h                                    |  6 +++---
 lib/tst_sig.c                                    |  8 ++++----
 testcases/kernel/fs/doio/doio.c                  |  4 ++--
 testcases/kernel/fs/doio/growfiles.c             |  2 +-
 testcases/kernel/ipc/ipc_stress/signal_test_04.c |  2 +-
 testcases/kernel/ipc/ipc_stress/signals.h        |  2 +-
 testcases/kernel/syscalls/fcntl/fcntl11.c        |  8 ++++----
 testcases/kernel/syscalls/fcntl/fcntl17.c        |  8 ++++----
 testcases/kernel/syscalls/fcntl/fcntl19.c        |  8 ++++----
 testcases/kernel/syscalls/fcntl/fcntl20.c        |  8 ++++----
 testcases/kernel/syscalls/fcntl/fcntl21.c        |  8 ++++----
 testcases/kernel/syscalls/kill/kill02.c          |  6 +++---
 testcases/kernel/syscalls/kill/kill12.c          |  8 ++++----
 testcases/kernel/syscalls/mkdir/mkdir09.c        | 12 ++++++------
 testcases/kernel/syscalls/sighold/sighold02.c    |  2 +-
 tools/top-LTP/proc/sig.c                         |  2 +-
 20 files changed, 55 insertions(+), 55 deletions(-)

diff --git a/doc/man3/tst_sig.3 b/doc/man3/tst_sig.3
index 485c010..7550644 100644
--- a/doc/man3/tst_sig.3
+++ b/doc/man3/tst_sig.3
@@ -55,18 +55,18 @@ of exiting following an unexpected interruption by a signal.
 program.
 .P
 The \fIfork_flag\fR parameter is used to tell \fItst_sig\fR
-whether or not to ignore the SIGCLD signal caused by the death of a
+whether or not to ignore the SIGCHLD signal caused by the death of a
 child process that had previously been created by the
 \fIfork\fR(2) system call (see \fIsignal\fR(2) for more
-information on the SIGCLD signal).
+information on the SIGCHLD signal).
 .P
 Setting \fIfork_flag\fR to FORK will cause \fItst_sig\fR to
-ignore the SIGCLD signal.  This option should be set if the
+ignore the SIGCHLD signal.  This option should be set if the
 test program directly (eg. call \fIfork\fR(2)) or indirectly
 (eg. call \fIsystem\fR(3S)) creates a child process.
 .P
 Setting \fIfork_flag\fR to NOFORK will cause \fItst_sig\fR to
-treat the SIGCLD signal just as any other unexpected
+treat the SIGCHLD signal just as any other unexpected
 signal (ie. the \fIhandler\fR will be called).
 This option should be set by any test program which does not
 directly or indirectly create any child processes.
diff --git a/doc/man3/tst_tmpdir.3 b/doc/man3/tst_tmpdir.3
index 4baa359..b8a8d79 100644
--- a/doc/man3/tst_tmpdir.3
+++ b/doc/man3/tst_tmpdir.3
@@ -61,7 +61,7 @@ to \fBtst_tmpdir()\fR and should be called immediately prior to the test
 exiting via \fBtst_exit()\fR.
 .P
 \fBtst_rmdir()\fR uses the \fBsystem\fR(3S) library routine (which in turn
-calls \fBfork\fR(2)), so tests that use it \fBcannot\fR treat SIGCLD as an
+calls \fBfork\fR(2)), so tests that use it \fBcannot\fR treat SIGCHLD as an
 unexpected signal.
 .P
 Users may gain access to the name of the temporary directory by declaring the
diff --git a/include/old/test.h b/include/old/test.h
index 9c52a83..cb22961 100644
--- a/include/old/test.h
+++ b/include/old/test.h
@@ -72,8 +72,8 @@
 
 
 /* defines for unexpected signal setup routine (set_usig.c) */
-#define FORK    1		/* SIGCLD is to be ignored */
-#define NOFORK  0		/* SIGCLD is to be caught */
+#define FORK    1		/* SIGCHLD is to be ignored */
+#define NOFORK  0		/* SIGCHLD is to be caught */
 #define DEF_HANDLER SIG_ERR	/* tells set_usig() to use default signal handler */
 
 /*
diff --git a/include/tst_cmd.h b/include/tst_cmd.h
index 78c1822..9f4240e 100644
--- a/include/tst_cmd.h
+++ b/include/tst_cmd.h
@@ -92,7 +92,7 @@ static inline int tst_run_cmd(void (cleanup_fn)(void),
 }
 #endif
 
-/* Wrapper function for system(3), ignorcing SIGCLD signal.
+/* Wrapper function for system(3), ignorcing SIGCHLD signal.
  * @command: the command to be run.
  */
 int tst_system(const char *command);
diff --git a/lib/signame.h b/lib/signame.h
index 19d38d9..932ad1f 100644
--- a/lib/signame.h
+++ b/lib/signame.h
@@ -51,9 +51,9 @@ const char *tst_strsig(int sig)
 		PAIR(SIGSTKFLT)
 	#endif
 
-	#ifdef SIGCLD
-		/* SIGCLD same as SIGCHLD */
-		STRPAIR(SIGCHLD, "SIGCHLD/SIGCLD")
+	#ifdef SIGCHLD
+		/* SIGCHLD same as SIGCHLD */
+		STRPAIR(SIGCHLD, "SIGCHLD/SIGCHLD")
 	#else
 		PAIR(SIGCHLD)
 	#endif
diff --git a/lib/tst_sig.c b/lib/tst_sig.c
index 3af5ffd..36565e1 100644
--- a/lib/tst_sig.c
+++ b/lib/tst_sig.c
@@ -49,7 +49,7 @@
 		fork_flag - set to FORK or NOFORK depending upon whether the
 			calling program executes a fork() system call.  It
 			is normally the case that the calling program treats
-			SIGCLD as an expected signal if fork() is being used.
+			SIGCHLD as an expected signal if fork() is being used.
 
 		handler - a pointer to the unexpected signal handler to
 			be executed after an unexpected signal has been
@@ -82,7 +82,7 @@ static void (*tst_setup_signal(int, void (*)(int))) (int);
 
 /****************************************************************************
  * tst_sig() : set-up to catch unexpected signals.  fork_flag is set to NOFORK
- *    if SIGCLD is to be an "unexpected signal", otherwise it is set to
+ *    if SIGCHLD is to be an "unexpected signal", otherwise it is set to
  *    FORK.  cleanup points to a cleanup routine to be executed before
  *    tst_exit is called (cleanup is set to NULL if no cleanup is desired).
  *    handler is a pointer to the signal handling routine (if handler is
@@ -117,7 +117,7 @@ void tst_sig(int fork_flag, void (*handler) (), void (*cleanup) ())
 	for (sig = 1; sig < NSIG; sig++) {
 		/*
 		 * SIGKILL is never unexpected.
-		 * SIGCLD is only unexpected when
+		 * SIGCHLD is only unexpected when
 		 *    no forking is being done.
 		 * SIGINFO is used for file quotas and should be expected
 		 */
@@ -205,7 +205,7 @@ void tst_sig(int fork_flag, void (*handler) (), void (*cleanup) ())
 #endif
 			break;
 
-		case SIGCLD:
+		case SIGCHLD:
 			if (fork_flag == FORK)
 				continue;
 
diff --git a/testcases/kernel/fs/doio/doio.c b/testcases/kernel/fs/doio/doio.c
index 4b0dec5..5f65ef9 100644
--- a/testcases/kernel/fs/doio/doio.c
+++ b/testcases/kernel/fs/doio/doio.c
@@ -573,7 +573,7 @@ int main(int argc, char **argv)
 		case SIGTSTP:
 		case SIGSTOP:
 		case SIGCONT:
-		case SIGCLD:
+		case SIGCHLD:
 		case SIGBUS:
 		case SIGSEGV:
 		case SIGQUIT:
@@ -615,7 +615,7 @@ int main(int argc, char **argv)
 	}
 
 	sigemptyset(&block_mask);
-	sigaddset(&block_mask, SIGCLD);
+	sigaddset(&block_mask, SIGCHLD);
 	sigprocmask(SIG_BLOCK, &block_mask, &omask);
 
 	/*
diff --git a/testcases/kernel/fs/doio/growfiles.c b/testcases/kernel/fs/doio/growfiles.c
index 09e7f35..bbad230 100644
--- a/testcases/kernel/fs/doio/growfiles.c
+++ b/testcases/kernel/fs/doio/growfiles.c
@@ -1640,7 +1640,7 @@ int set_sig(void)
 #ifdef SIGRESTART
 		case SIGRESTART:
 #endif /* SIGRESTART */
-		case SIGCLD:
+		case SIGCHLD:
 			break;
 
 		default:
diff --git a/testcases/kernel/ipc/ipc_stress/signal_test_04.c b/testcases/kernel/ipc/ipc_stress/signal_test_04.c
index e33a46f..9ee75ce 100644
--- a/testcases/kernel/ipc/ipc_stress/signal_test_04.c
+++ b/testcases/kernel/ipc/ipc_stress/signal_test_04.c
@@ -147,7 +147,7 @@ int main(int argc, char **argv)
 	 * stop upon receiving the signal).
 	 *
 	 * Wait for the child process to receive the SIGSTOP signal
-	 * and send a corresponding SIGCLD interrupt to the parent.
+	 * and send a corresponding SIGCHLD interrupt to the parent.
 	 *
 	 * Send SIGKILL signal to child process (child process
 	 * will exit upon receiving the signal).
diff --git a/testcases/kernel/ipc/ipc_stress/signals.h b/testcases/kernel/ipc/ipc_stress/signals.h
index a842123..d9b6e14 100644
--- a/testcases/kernel/ipc/ipc_stress/signals.h
+++ b/testcases/kernel/ipc/ipc_stress/signals.h
@@ -38,7 +38,7 @@ char * signames [] =
  "SIGALRM", //         14      // Alarm clock (POSIX).
  "SIGTERM", //         15      // Termination (ANSI).
  "SIGSTKFLT", //       16      // Stack fault.
- "SIGCLD/SIGCHLD", //  SIGCHLD // Same as SIGCHLD (System V).
+ "SIGCHLD/SIGCHLD", //  SIGCHLD // Same as SIGCHLD (System V).
  //"SIGCHLD", //       17      // Child status has changed (POSIX).
  "SIGCONT", //         18      // Continue (POSIX).
  "SIGSTOP", //         19      // Stop, unblockable (POSIX).
diff --git a/testcases/kernel/syscalls/fcntl/fcntl11.c b/testcases/kernel/syscalls/fcntl/fcntl11.c
index fa6ce53..2de2b6c 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl11.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl11.c
@@ -105,10 +105,10 @@ void setup(void)
 	memset(&act, 0, sizeof(act));
 	act.sa_handler = catch_child;
 	sigemptyset(&act.sa_mask);
-	sigaddset(&act.sa_mask, SIGCLD);
-	if ((sigaction(SIGCLD, &act, NULL)) < 0)
+	sigaddset(&act.sa_mask, SIGCHLD);
+	if ((sigaction(SIGCHLD, &act, NULL)) < 0)
 		tst_brkm(TBROK | TERRNO, cleanup,
-			 "sigaction(SIGCLD, ..) failed");
+			 "sigaction(SIGCHLD, ..) failed");
 }
 
 void do_child(void)
@@ -227,7 +227,7 @@ void stop_child(void)
 {
 	struct flock fl;
 
-	signal(SIGCLD, SIG_DFL);
+	signal(SIGCHLD, SIG_DFL);
 	fl.l_type = STOP;
 	parent_put(&fl);
 	wait(0);
diff --git a/testcases/kernel/syscalls/fcntl/fcntl17.c b/testcases/kernel/syscalls/fcntl/fcntl17.c
index 229e490..e055f1a 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl17.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl17.c
@@ -150,9 +150,9 @@ int setup(void)
 	memset(&act, 0, sizeof(act));
 	act.sa_handler = catch_child;
 	sigemptyset(&act.sa_mask);
-	sigaddset(&act.sa_mask, SIGCLD);
-	if (sigaction(SIGCLD, &act, NULL) < 0) {
-		tst_resm(TFAIL, "SIGCLD signal setup failed, errno: %d", errno);
+	sigaddset(&act.sa_mask, SIGCHLD);
+	if (sigaction(SIGCHLD, &act, NULL) < 0) {
+		tst_resm(TFAIL, "SIGCHLD signal setup failed, errno: %d", errno);
 		return 1;
 	}
 	return 0;
@@ -390,7 +390,7 @@ void stop_children(void)
 {
 	int arg;
 
-	signal(SIGCLD, SIG_DFL);
+	signal(SIGCHLD, SIG_DFL);
 	arg = STOP;
 	child_free(child_pipe1[1], arg);
 	child_free(child_pipe2[1], arg);
diff --git a/testcases/kernel/syscalls/fcntl/fcntl19.c b/testcases/kernel/syscalls/fcntl/fcntl19.c
index a542cfc..88c91d6 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl19.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl19.c
@@ -112,9 +112,9 @@ void setup(void)
 	memset(&act, 0, sizeof(act));
 	act.sa_handler = catch_child;
 	sigemptyset(&act.sa_mask);
-	sigaddset(&act.sa_mask, SIGCLD);
-	if ((sigaction(SIGCLD, &act, NULL)) < 0) {
-		tst_resm(TFAIL, "SIGCLD signal setup failed, errno: %d", errno);
+	sigaddset(&act.sa_mask, SIGCHLD);
+	if ((sigaction(SIGCHLD, &act, NULL)) < 0) {
+		tst_resm(TFAIL, "SIGCHLD signal setup failed, errno: %d", errno);
 		fail = 1;
 	}
 }
@@ -265,7 +265,7 @@ void stop_child(void)
 {
 	struct flock fl;
 
-	signal(SIGCLD, SIG_DFL);
+	signal(SIGCHLD, SIG_DFL);
 	fl.l_type = STOP;
 	parent_put(&fl);
 	wait(0);
diff --git a/testcases/kernel/syscalls/fcntl/fcntl20.c b/testcases/kernel/syscalls/fcntl/fcntl20.c
index aa06bab..99fd783 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl20.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl20.c
@@ -109,9 +109,9 @@ void setup(void)
 	memset(&act, 0, sizeof(act));
 	act.sa_handler = catch_child;
 	sigemptyset(&act.sa_mask);
-	sigaddset(&act.sa_mask, SIGCLD);
-	if (sigaction(SIGCLD, &act, NULL) == -1)
-		tst_brkm(TFAIL | TERRNO, cleanup, "SIGCLD signal setup failed");
+	sigaddset(&act.sa_mask, SIGCHLD);
+	if (sigaction(SIGCHLD, &act, NULL) == -1)
+		tst_brkm(TFAIL | TERRNO, cleanup, "SIGCHLD signal setup failed");
 }
 
 void cleanup(void)
@@ -264,7 +264,7 @@ void stop_child(void)
 {
 	struct flock fl;
 
-	signal(SIGCLD, SIG_DFL);
+	signal(SIGCHLD, SIG_DFL);
 	fl.l_type = STOP;
 	parent_put(&fl);
 	wait(0);
diff --git a/testcases/kernel/syscalls/fcntl/fcntl21.c b/testcases/kernel/syscalls/fcntl/fcntl21.c
index 5307021..8f1a67c 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl21.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl21.c
@@ -110,9 +110,9 @@ void setup(void)
 	memset(&act, 0, sizeof(act));
 	act.sa_handler = catch_child;
 	sigemptyset(&act.sa_mask);
-	sigaddset(&act.sa_mask, SIGCLD);
-	if ((sigaction(SIGCLD, &act, NULL)) < 0) {
-		tst_resm(TFAIL, "SIGCLD signal setup failed, errno: %d", errno);
+	sigaddset(&act.sa_mask, SIGCHLD);
+	if ((sigaction(SIGCHLD, &act, NULL)) < 0) {
+		tst_resm(TFAIL, "SIGCHLD signal setup failed, errno: %d", errno);
 		fail = 1;
 	}
 }
@@ -272,7 +272,7 @@ void stop_child(void)
 {
 	struct flock fl;
 
-	signal(SIGCLD, SIG_DFL);
+	signal(SIGCHLD, SIG_DFL);
 	fl.l_type = STOP;
 	parent_put(&fl);
 	wait(0);
diff --git a/testcases/kernel/syscalls/kill/kill02.c b/testcases/kernel/syscalls/kill/kill02.c
index 9d6cc68..08360dd 100644
--- a/testcases/kernel/syscalls/kill/kill02.c
+++ b/testcases/kernel/syscalls/kill/kill02.c
@@ -701,7 +701,7 @@ void setup(void)
 
 	/*
 	 *  Set to catch unexpected signals.
-	 *  SIGCLD is set to be ignored because we do not wait for termination status.
+	 *  SIGCHLD is set to be ignored because we do not wait for termination status.
 	 *  SIGUSR1 is set to be ignored because this is the signal we are using for
 	 *  the test and we are not concerned with the parent getting it.
 	 */
@@ -713,9 +713,9 @@ void setup(void)
 			 "signal(SIGUSR1, SIG_IGN) failed");
 	}
 
-	if (signal(SIGCLD, SIG_IGN) == SIG_ERR) {
+	if (signal(SIGCHLD, SIG_IGN) == SIG_ERR) {
 		tst_brkm(TBROK | TERRNO, NULL,
-			 "signal(SIGCLD, SIG_IGN) failed");
+			 "signal(SIGCHLD, SIG_IGN) failed");
 	}
 
 	TEST_PAUSE;
diff --git a/testcases/kernel/syscalls/kill/kill12.c b/testcases/kernel/syscalls/kill/kill12.c
index 7a47a4a..d7c4147 100644
--- a/testcases/kernel/syscalls/kill/kill12.c
+++ b/testcases/kernel/syscalls/kill/kill12.c
@@ -98,7 +98,7 @@ int main(int argc, char **argv)
 
 	exno = 1;
 
-	if (sigset(SIGCLD, chsig) == SIG_ERR) {
+	if (sigset(SIGCHLD, chsig) == SIG_ERR) {
 		fprintf(temp, "\tsigset failed, errno = %d\n", errno);
 		fail_exit();
 	}
@@ -128,7 +128,7 @@ int main(int argc, char **argv)
 				sleep(1);
 
 			kill(pid, sig);	/* child should ignroe this sig */
-			kill(pid, SIGCLD);	/* child should exit */
+			kill(pid, SIGCHLD);	/* child should exit */
 
 #ifdef BCS
 			while ((npid = wait(&status)) != pid
@@ -222,14 +222,14 @@ void do_child(void)
 	int exno = 1;
 
 #ifdef UCLINUX
-	if (sigset(SIGCLD, chsig) == SIG_ERR) {
+	if (sigset(SIGCHLD, chsig) == SIG_ERR) {
 		fprintf(temp, "\tsigset failed, errno = %d\n", errno);
 		fail_exit();
 	}
 #endif
 
 	sigset(sig, SIG_IGN);	/* set to ignore signal */
-	kill(getppid(), SIGCLD);	/* tell parent we are ready */
+	kill(getppid(), SIGCHLD);	/* tell parent we are ready */
 	while (!chflag)
 		sleep(1);	/* wait for parent */
 
diff --git a/testcases/kernel/syscalls/mkdir/mkdir09.c b/testcases/kernel/syscalls/mkdir/mkdir09.c
index 41c20e9..07b4fb8 100644
--- a/testcases/kernel/syscalls/mkdir/mkdir09.c
+++ b/testcases/kernel/syscalls/mkdir/mkdir09.c
@@ -122,10 +122,10 @@ int main(int argc, char *argv[])
 
 	}
 
-	/* Set up to catch SIGCLD signal */
-	if (signal(SIGCLD, chld) == SIG_ERR) {
+	/* Set up to catch SIGCHLD signal */
+	if (signal(SIGCHLD, chld) == SIG_ERR) {
 		tst_brkm(TFAIL, cleanup,
-			 "Error setting up SIGCLD signal, ERRNO = %d", errno);
+			 "Error setting up SIGCHLD signal, ERRNO = %d", errno);
 
 	}
 
@@ -236,9 +236,9 @@ int runtest(void)
 		tst_brkm(TFAIL, cleanup,
 			 "Error resetting SIGTERM signal, ERRNO = %d", errno);
 	}
-	if (signal(SIGCLD, SIG_DFL) == SIG_ERR) {
+	if (signal(SIGCHLD, SIG_DFL) == SIG_ERR) {
 		tst_brkm(TFAIL, cleanup,
-			 "Error resetting SIGCLD signal, ERRNO = %d", errno);
+			 "Error resetting SIGCHLD signal, ERRNO = %d", errno);
 	}
 
 	if (test_time) {
@@ -372,7 +372,7 @@ void term(int sig)
 
 void chld(int sig)
 {
-	/* Routine to handle SIGCLD signal. */
+	/* Routine to handle SIGCHLD signal. */
 
 	sigchld++;
 	if (jump) {
diff --git a/testcases/kernel/syscalls/sighold/sighold02.c b/testcases/kernel/syscalls/sighold/sighold02.c
index e3076fb..be01874 100644
--- a/testcases/kernel/syscalls/sighold/sighold02.c
+++ b/testcases/kernel/syscalls/sighold/sighold02.c
@@ -77,7 +77,7 @@ static int sigs_map[NUMSIGS];
 static int skip_sig(int sig)
 {
 	switch (sig) {
-	case SIGCLD:
+	case SIGCHLD:
 	case SIGKILL:
 	case SIGALRM:
 	case SIGSTOP:
diff --git a/tools/top-LTP/proc/sig.c b/tools/top-LTP/proc/sig.c
index 1cfad86..0f9bdee 100644
--- a/tools/top-LTP/proc/sig.c
+++ b/tools/top-LTP/proc/sig.c
@@ -23,7 +23,7 @@
  * You get SIGSTKFLT and SIGUNUSED instead on i386, m68k, ppc, and arm.
  * (this is a Linux & libc bug -- both must be fixed)
  *
- * Total garbage: SIGIO SIGINFO SIGIOT SIGLOST SIGCLD
+ * Total garbage: SIGIO SIGINFO SIGIOT SIGLOST SIGCHLD
  *                 (popular ones are handled as aliases)
  * Nearly garbage: SIGSTKFLT SIGUNUSED (nothing else to fill slots)
  */
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 19/23] creat06: Include limits.h for PATH_MAX
  2016-07-22  4:26 [LTP] [PATCH V3 01/23] Add knob to control whether numa support should be checked Khem Raj
                   ` (16 preceding siblings ...)
  2016-07-22  4:26 ` [LTP] [PATCH V3 18/23] replace SIGCLD with SIGCHLD Khem Raj
@ 2016-07-22  4:26 ` Khem Raj
  2016-08-01 12:49   ` Cyril Hrubis
  2016-07-22  4:26 ` [LTP] [PATCH V3 20/23] fcntl34: Replace pthread_yield() with sched_yield() Khem Raj
                   ` (3 subsequent siblings)
  21 siblings, 1 reply; 54+ messages in thread
From: Khem Raj @ 2016-07-22  4:26 UTC (permalink / raw)
  To: ltp

Glibc includes limits.h indirectly and this error goes hidden
but musl is less pardoning

Fixes errors like

creat06.c:81:23: error: ‘PATH_MAX’ undeclared here (not in a function)
 static char long_name[PATH_MAX+2];
                       ^~~~~~~~

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 testcases/kernel/syscalls/creat/creat06.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/testcases/kernel/syscalls/creat/creat06.c b/testcases/kernel/syscalls/creat/creat06.c
index bb27d03..165c1de 100644
--- a/testcases/kernel/syscalls/creat/creat06.c
+++ b/testcases/kernel/syscalls/creat/creat06.c
@@ -51,6 +51,7 @@
 
 #include <errno.h>
 #include <string.h>
+#include <limits.h>
 #include <pwd.h>
 #include <sys/mman.h>
 #include <sys/types.h>
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 20/23] fcntl34: Replace pthread_yield() with sched_yield()
  2016-07-22  4:26 [LTP] [PATCH V3 01/23] Add knob to control whether numa support should be checked Khem Raj
                   ` (17 preceding siblings ...)
  2016-07-22  4:26 ` [LTP] [PATCH V3 19/23] creat06: Include limits.h for PATH_MAX Khem Raj
@ 2016-07-22  4:26 ` Khem Raj
  2016-08-01 12:57   ` Cyril Hrubis
  2016-07-22  4:26 ` [LTP] [PATCH V3 21/23] rename 'sigset' var to avoid shadowing with libc symbol sigset Khem Raj
                   ` (2 subsequent siblings)
  21 siblings, 1 reply; 54+ messages in thread
From: Khem Raj @ 2016-07-22  4:26 UTC (permalink / raw)
  To: ltp

sched_yield() is specified in POSIX, helps compiling with musl

home/root/work/ltp/testcases/kernel/syscalls/fcntl/fcntl34.c:88: undefined reference to `pthread_yield'
collect2: error: ld returned 1 exit status
make: *** [<builtin>: fcntl34] Error 1

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 testcases/kernel/syscalls/fcntl/fcntl34.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/fcntl/fcntl34.c b/testcases/kernel/syscalls/fcntl/fcntl34.c
index c72951e..a1c0c44 100644
--- a/testcases/kernel/syscalls/fcntl/fcntl34.c
+++ b/testcases/kernel/syscalls/fcntl/fcntl34.c
@@ -23,6 +23,7 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <pthread.h>
+#include <sched.h>
 
 #include "lapi/fcntl.h"
 #include "tst_test.h"
@@ -84,7 +85,7 @@ void *thread_fn_01(void *arg)
 		if (fcntl(fd, F_OFD_SETLKW, &lck) == -1)
 			tst_brk(TBROK | TERRNO, "fcntl() failed");
 
-		pthread_yield();
+		sched_yield();
 	}
 
 	SAFE_CLOSE(fd);
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 21/23] rename 'sigset' var to avoid shadowing with libc symbol sigset
  2016-07-22  4:26 [LTP] [PATCH V3 01/23] Add knob to control whether numa support should be checked Khem Raj
                   ` (18 preceding siblings ...)
  2016-07-22  4:26 ` [LTP] [PATCH V3 20/23] fcntl34: Replace pthread_yield() with sched_yield() Khem Raj
@ 2016-07-22  4:26 ` Khem Raj
  2016-08-01 14:19   ` Cyril Hrubis
  2016-07-22  4:26 ` [LTP] [PATCH V3 22/23] pec: Replace obsoleted SA_ONESHOT with SA_RESETHAND Khem Raj
  2016-07-22  4:26 ` [LTP] [PATCH V3 23/23] shmem_test_04: Include sys/types.h for caddr_t Khem Raj
  21 siblings, 1 reply; 54+ messages in thread
From: Khem Raj @ 2016-07-22  4:26 UTC (permalink / raw)
  To: ltp

Fixes errors like

epoll_pwait01.c:44:17: error: ‘sigset’ redeclared as different kind of symbol
 static sigset_t sigset;
                 ^~~~~~
In file included from ../../../../include/old/test.h:38:0,
                 from epoll_pwait01.c:36:
/usr/include/signal.h:231:8: note: previous declaration of ‘sigset’ was here
 void (*sigset(int, void (*)(int)))(int);
        ^~~~~~

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 testcases/kernel/controllers/cgroup_fj/cgroup_fj_proc.c  |  6 +++---
 .../kernel/controllers/cpuctl_fj/cpuctl_fj_cpu-hog.c     |  6 +++---
 .../cpuset/cpuset_load_balance_test/cpuset_cpu_hog.c     | 16 ++++++++--------
 .../cpuset/cpuset_memory_spread_test/cpuset_mem_hog.c    |  8 ++++----
 testcases/kernel/fs/doio/doio.c                          |  6 +++---
 testcases/kernel/syscalls/epoll_pwait/epoll_pwait01.c    |  8 ++++----
 testcases/kernel/syscalls/sigsuspend/sigsuspend01.c      |  6 +++---
 testcases/kernel/syscalls/truncate/truncate03.c          |  8 ++++----
 .../conformance/interfaces/sched_setparam/1-1.c          |  8 ++++----
 9 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/testcases/kernel/controllers/cgroup_fj/cgroup_fj_proc.c b/testcases/kernel/controllers/cgroup_fj/cgroup_fj_proc.c
index 880cb76..93bc8b7 100644
--- a/testcases/kernel/controllers/cgroup_fj/cgroup_fj_proc.c
+++ b/testcases/kernel/controllers/cgroup_fj/cgroup_fj_proc.c
@@ -40,7 +40,7 @@ void sighandler(UNUSED int signo)
 
 int main(void)
 {
-	sigset_t sigset;
+	sigset_t signalset;
 	struct sigaction sa;
 	pid_t pid;
 	int status;
@@ -54,11 +54,11 @@ int main(void)
 	if (sigaction(SIGUSR1, &sa, NULL) < 0)
 		err(1, "sigaction()");
 
-	if (sigemptyset(&sigset) < 0)
+	if (sigemptyset(&signalset) < 0)
 		err(1, "sigemptyset()");
 
 	/* wait for the signal SIGUSR1 to start testing */
-	sigsuspend(&sigset);
+	sigsuspend(&signalset);
 	if (errno != EINTR)
 		err(1, "sigsuspend()");
 
diff --git a/testcases/kernel/controllers/cpuctl_fj/cpuctl_fj_cpu-hog.c b/testcases/kernel/controllers/cpuctl_fj/cpuctl_fj_cpu-hog.c
index 3f300c7..da1c312 100644
--- a/testcases/kernel/controllers/cpuctl_fj/cpuctl_fj_cpu-hog.c
+++ b/testcases/kernel/controllers/cpuctl_fj/cpuctl_fj_cpu-hog.c
@@ -43,7 +43,7 @@ void sighandler(UNUSED int signo)
 
 int main(void)
 {
-	sigset_t sigset;
+	sigset_t signalset;
 	struct sigaction sa;
 
 	sa.sa_handler = sighandler;
@@ -54,10 +54,10 @@ int main(void)
 	if (sigaction(SIGUSR1, &sa, NULL) < 0)
 		err(1, "sigaction()");
 
-	if (sigemptyset(&sigset) < 0)
+	if (sigemptyset(&signalset) < 0)
 		err(1, "sigemptyset()");
 
-	sigsuspend(&sigset);
+	sigsuspend(&signalset);
 	if (errno != EINTR)
 		err(1, "sigsuspend()");
 
diff --git a/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_cpu_hog.c b/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_cpu_hog.c
index de81f26..8a6ec26 100644
--- a/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_cpu_hog.c
+++ b/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_cpu_hog.c
@@ -161,7 +161,7 @@ void checkopt(int argc, char **argv)
 int cpu_hog(void)
 {
 	double f = 2744545.34456455;
-	sigset_t sigset;
+	sigset_t signalset;
 	struct cpuset *cp = NULL;
 	struct bitmask *cpumask = NULL;
 	int cpu;
@@ -180,12 +180,12 @@ int cpu_hog(void)
 		goto err1;
 	}
 
-	if (sigemptyset(&sigset) < 0) {
+	if (sigemptyset(&signalset) < 0) {
 		ret = -1;
 		goto err2;
 	}
 
-	sigsuspend(&sigset);
+	sigsuspend(&signalset);
 
 	if (cpuset_cpusetofpid(cp, 0) < 0) {
 		ret = -1;
@@ -249,7 +249,7 @@ int main(int argc, char **argv)
 	int i = 0;
 	pid_t pid;
 	pid_t *childpids = NULL;
-	sigset_t sigset;
+	sigset_t signalset;
 	int status = 0;
 	int ret = 0;
 
@@ -260,7 +260,7 @@ int main(int argc, char **argv)
 		exit(EXIT_FAILURE);
 	}
 
-	if (sigemptyset(&sigset) < 0) {
+	if (sigemptyset(&signalset) < 0) {
 		warn("sigemptyset failed");
 		report_result("2\n");
 		exit(EXIT_FAILURE);
@@ -275,7 +275,7 @@ int main(int argc, char **argv)
 	memset(childpids, 0, (nprocs) * sizeof(pid_t));
 
 	report_result("0\n");
-	sigsuspend(&sigset);
+	sigsuspend(&signalset);
 	for (; i < nprocs; i++) {
 		pid = fork();
 		if (pid == -1) {
@@ -294,10 +294,10 @@ int main(int argc, char **argv)
 	report_result("0\n");
 
 	while (!end) {
-		if (sigemptyset(&sigset) < 0)
+		if (sigemptyset(&signalset) < 0)
 			ret = -1;
 		else
-			sigsuspend(&sigset);
+			sigsuspend(&signalset);
 
 		if (ret || end) {
 			for (i = 0; i < nprocs; i++) {
diff --git a/testcases/kernel/controllers/cpuset/cpuset_memory_spread_test/cpuset_mem_hog.c b/testcases/kernel/controllers/cpuset/cpuset_memory_spread_test/cpuset_mem_hog.c
index 6ca6663..56e039e 100644
--- a/testcases/kernel/controllers/cpuset/cpuset_memory_spread_test/cpuset_mem_hog.c
+++ b/testcases/kernel/controllers/cpuset/cpuset_memory_spread_test/cpuset_mem_hog.c
@@ -71,13 +71,13 @@ int page_cache_hog(void)
 
 int mem_hog(void)
 {
-	sigset_t sigset;
+	sigset_t signalset;
 	int fd;
 	int ret = 0;
 
-	if (sigemptyset(&sigset) < 0)
+	if (sigemptyset(&signalset) < 0)
 		err(1, "sigemptyset()");
-	sigsuspend(&sigset);
+	sigsuspend(&signalset);
 
 	while (!end) {
 		ret = page_cache_hog();
@@ -96,7 +96,7 @@ int mem_hog(void)
 
 		close(fd);
 
-		sigsuspend(&sigset);
+		sigsuspend(&signalset);
 	}
 
 	return ret;
diff --git a/testcases/kernel/fs/doio/doio.c b/testcases/kernel/fs/doio/doio.c
index 5f65ef9..be68999 100644
--- a/testcases/kernel/fs/doio/doio.c
+++ b/testcases/kernel/fs/doio/doio.c
@@ -4743,7 +4743,7 @@ int aio_wait(int aio_id)
 #ifdef RECALL_SIZEOF
 	long mask[RECALL_SIZEOF];
 #endif
-	sigset_t sigset;
+	sigset_t signalset;
 	struct aio_info *aiop;
 #ifdef CRAY
 	struct iosw *ioswlist[1];
@@ -4762,11 +4762,11 @@ int aio_wait(int aio_id)
 		break;
 
 	case A_SIGNAL:
-		sigemptyset(&sigset);
+		sigemptyset(&signalset);
 		sighold(aiop->sig);
 
 		while (!aiop->signalled || !aiop->done) {
-			sigsuspend(&sigset);
+			sigsuspend(&signalset);
 			sighold(aiop->sig);
 		}
 		break;
diff --git a/testcases/kernel/syscalls/epoll_pwait/epoll_pwait01.c b/testcases/kernel/syscalls/epoll_pwait/epoll_pwait01.c
index 4f8448e..ed05da8 100644
--- a/testcases/kernel/syscalls/epoll_pwait/epoll_pwait01.c
+++ b/testcases/kernel/syscalls/epoll_pwait/epoll_pwait01.c
@@ -41,7 +41,7 @@ char *TCID = "epoll_pwait01";
 int TST_TOTAL = 2;
 
 static int epfd, fds[2];
-static sigset_t sigset;
+static sigset_t signalset;
 static struct epoll_event epevs;
 static struct sigaction sa;
 
@@ -64,7 +64,7 @@ int main(int ac, char **av)
 	for (lc = 0; TEST_LOOPING(lc); lc++) {
 		tst_count = 0;
 
-		do_test(&sigset);
+		do_test(&signalset);
 		do_test(NULL);
 	}
 
@@ -83,10 +83,10 @@ static void setup(void)
 
 	TEST_PAUSE;
 
-	if (sigemptyset(&sigset) == -1)
+	if (sigemptyset(&signalset) == -1)
 		tst_brkm(TFAIL | TERRNO, NULL, "sigemptyset() failed");
 
-	if (sigaddset(&sigset, SIGUSR1) == -1)
+	if (sigaddset(&signalset, SIGUSR1) == -1)
 		tst_brkm(TFAIL | TERRNO, NULL, "sigaddset() failed");
 
 	sa.sa_flags = 0;
diff --git a/testcases/kernel/syscalls/sigsuspend/sigsuspend01.c b/testcases/kernel/syscalls/sigsuspend/sigsuspend01.c
index b84f986..b9542e7 100644
--- a/testcases/kernel/syscalls/sigsuspend/sigsuspend01.c
+++ b/testcases/kernel/syscalls/sigsuspend/sigsuspend01.c
@@ -83,7 +83,7 @@ char *TCID = "sigsuspend01";
 int TST_TOTAL = 1;
 
 struct sigaction sa_new;	/* struct to hold signal info */
-sigset_t sigset;		/* signal set to hold signal lists */
+sigset_t signalset;		/* signal set to hold signal lists */
 sigset_t sigset1;
 sigset_t sigset2;
 
@@ -111,7 +111,7 @@ int main(int ac, char **av)
 		 * of the process and suspend process execution till
 		 * receipt of a signal 'SIGALRM'.
 		 */
-		TEST(sigsuspend(&sigset));
+		TEST(sigsuspend(&signalset));
 
 		/* Reset the alarm timer */
 		alarm(0);
@@ -160,7 +160,7 @@ void setup(void)
 	 * Initialise the signal sets with the list that
 	 * excludes/includes  all system-defined signals.
 	 */
-	if (sigemptyset(&sigset) == -1) {
+	if (sigemptyset(&signalset) == -1) {
 		tst_brkm(TFAIL, cleanup,
 			 "sigemptyset() failed, errno=%d : %s",
 			 errno, strerror(errno));
diff --git a/testcases/kernel/syscalls/truncate/truncate03.c b/testcases/kernel/syscalls/truncate/truncate03.c
index 60881c9..2e97f45 100644
--- a/testcases/kernel/syscalls/truncate/truncate03.c
+++ b/testcases/kernel/syscalls/truncate/truncate03.c
@@ -119,7 +119,7 @@ void setup(void)
 	struct passwd *ltpuser;
 	char *bad_addr;
 	struct rlimit rlim;
-	sigset_t sigset;
+	sigset_t signalset;
 
 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
 
@@ -157,9 +157,9 @@ void setup(void)
 	rlim.rlim_max = MAX_FSIZE;
 	SAFE_SETRLIMIT(cleanup, RLIMIT_FSIZE, &rlim);
 
-	sigemptyset(&sigset);
-	sigaddset(&sigset, SIGXFSZ);
-	TEST(sigprocmask(SIG_BLOCK, &sigset, NULL));
+	sigemptyset(&signalset);
+	sigaddset(&signalset, SIGXFSZ);
+	TEST(sigprocmask(SIG_BLOCK, &signalset, NULL));
 	if (TEST_RETURN != 0)
 		tst_brkm(TBROK | TTERRNO, cleanup, "sigprocmask");
 }
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/1-1.c
index 8674e2f..f7cfc9e 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/1-1.c
@@ -22,18 +22,18 @@
 
 void child_proc()
 {
-	sigset_t sigset;
+	sigset_t signalset;
 	int sig;
 
-	if (sigemptyset(&sigset) != 0) {
+	if (sigemptyset(&signalset) != 0) {
 		perror("An error occurs when calling sigemptyset()");
 		exit(1);
 	}
-	if (sigaddset(&sigset, SIGUSR1) != 0) {
+	if (sigaddset(&signalset, SIGUSR1) != 0) {
 		perror("An error occurs when calling sigaddset()");
 		exit(1);
 	}
-	if (sigwait(&sigset, &sig) != 0) {
+	if (sigwait(&signalset, &sig) != 0) {
 		perror("An error occurs when calling sigwait()");
 		exit(1);
 	}
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 22/23] pec: Replace obsoleted SA_ONESHOT with SA_RESETHAND
  2016-07-22  4:26 [LTP] [PATCH V3 01/23] Add knob to control whether numa support should be checked Khem Raj
                   ` (19 preceding siblings ...)
  2016-07-22  4:26 ` [LTP] [PATCH V3 21/23] rename 'sigset' var to avoid shadowing with libc symbol sigset Khem Raj
@ 2016-07-22  4:26 ` Khem Raj
  2016-08-01 14:30   ` Cyril Hrubis
  2016-07-22  4:26 ` [LTP] [PATCH V3 23/23] shmem_test_04: Include sys/types.h for caddr_t Khem Raj
  21 siblings, 1 reply; 54+ messages in thread
From: Khem Raj @ 2016-07-22  4:26 UTC (permalink / raw)
  To: ltp

This is needed especially for musl, for glibc _GNU_SOURCE
is added by libc-features.h automatically. which defines SA_ONESHOT

Fixes

pec_listener.c: In function ‘main’:
pec_listener.c:233:27: error: ‘SA_ONESHOT’ undeclared (first use in this function)
  sigint_action.sa_flags = SA_ONESHOT;
                           ^~~~~~~~~~

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 testcases/kernel/connectors/pec/pec_listener.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/connectors/pec/pec_listener.c b/testcases/kernel/connectors/pec/pec_listener.c
index a1beb13..d11e4dc 100644
--- a/testcases/kernel/connectors/pec/pec_listener.c
+++ b/testcases/kernel/connectors/pec/pec_listener.c
@@ -230,7 +230,7 @@ int main(int argc, char **argv)
 	struct sockaddr_nl src_addr;
 	struct pollfd pfd;
 
-	sigint_action.sa_flags = SA_ONESHOT;
+	sigint_action.sa_flags = SA_RESETHAND;
 	sigint_action.sa_handler = &sigint_handler;
 	sigaction(SIGINT, &sigint_action, NULL);
 
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 23/23] shmem_test_04: Include sys/types.h for caddr_t
  2016-07-22  4:26 [LTP] [PATCH V3 01/23] Add knob to control whether numa support should be checked Khem Raj
                   ` (20 preceding siblings ...)
  2016-07-22  4:26 ` [LTP] [PATCH V3 22/23] pec: Replace obsoleted SA_ONESHOT with SA_RESETHAND Khem Raj
@ 2016-07-22  4:26 ` Khem Raj
  2016-08-01 14:34   ` Cyril Hrubis
  21 siblings, 1 reply; 54+ messages in thread
From: Khem Raj @ 2016-07-22  4:26 UTC (permalink / raw)
  To: ltp

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 testcases/kernel/ipc/ipc_stress/shmem_test_04.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/testcases/kernel/ipc/ipc_stress/shmem_test_04.c b/testcases/kernel/ipc/ipc_stress/shmem_test_04.c
index 41aa3f4..01cf62b 100644
--- a/testcases/kernel/ipc/ipc_stress/shmem_test_04.c
+++ b/testcases/kernel/ipc/ipc_stress/shmem_test_04.c
@@ -65,6 +65,7 @@
 #include <signal.h>
 #include <stdint.h>
 #include <sys/mman.h>
+#include <sys/types.h>
 
 #ifdef _LINUX_
 typedef unsigned long ulong_t;
-- 
2.9.0


^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 02/23] Add knob to control tirpc support
  2016-07-22  4:26 ` [LTP] [PATCH V3 02/23] Add knob to control tirpc support Khem Raj
@ 2016-07-26 14:35   ` Cyril Hrubis
  2016-07-26 14:56     ` Khem Raj
  0 siblings, 1 reply; 54+ messages in thread
From: Cyril Hrubis @ 2016-07-26 14:35 UTC (permalink / raw)
  To: ltp

Hi!
> allow to disable tirpc. Helps to disable it at top level for eg. musl it
> does not yet work.

This is the same as the numa one, should be done in the m4/ltp-tirpc.m4

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 02/23] Add knob to control tirpc support
  2016-07-26 14:35   ` Cyril Hrubis
@ 2016-07-26 14:56     ` Khem Raj
  0 siblings, 0 replies; 54+ messages in thread
From: Khem Raj @ 2016-07-26 14:56 UTC (permalink / raw)
  To: ltp

On Tue, Jul 26, 2016 at 7:35 AM, Cyril Hrubis <chrubis@suse.cz> wrote:
> Hi!
>> allow to disable tirpc. Helps to disable it at top level for eg. musl it
>> does not yet work.
>
> This is the same as the numa one, should be done in the m4/ltp-tirpc.m4

OK. I have few other patches related to configure which I havent yet submitted
I will fix redo it and send it with the second set.

>
> --
> Cyril Hrubis
> chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 03/23] Remove including error.h, its unused
  2016-07-22  4:26 ` [LTP] [PATCH V3 03/23] Remove including error.h, its unused Khem Raj
@ 2016-07-26 15:05   ` Cyril Hrubis
  0 siblings, 0 replies; 54+ messages in thread
From: Cyril Hrubis @ 2016-07-26 15:05 UTC (permalink / raw)
  To: ltp

Hi!
Pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 04/23] Remove unused __BEGIN_DECLS and __END_DECLS
  2016-07-22  4:26 ` [LTP] [PATCH V3 04/23] Remove unused __BEGIN_DECLS and __END_DECLS Khem Raj
@ 2016-07-26 15:39   ` Cyril Hrubis
  0 siblings, 0 replies; 54+ messages in thread
From: Cyril Hrubis @ 2016-07-26 15:39 UTC (permalink / raw)
  To: ltp

Hi!
> Replace __s32 definitions with int32_t
> its not a generally available typedef

Are you sure that __s32 is the only one missing?

Since all the __sXX and __uXX types are defined in a file included in
/usr/include/asm-generic/types.h (int-ll64.h on x86_64) which is a part
of linux-headers package. This rather looks like something is wrong with
your kernel headers.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 05/23] guard mallocopt() with __GLIBC__
  2016-07-22  4:26 ` [LTP] [PATCH V3 05/23] guard mallocopt() with __GLIBC__ Khem Raj
@ 2016-07-26 15:44   ` Cyril Hrubis
  0 siblings, 0 replies; 54+ messages in thread
From: Cyril Hrubis @ 2016-07-26 15:44 UTC (permalink / raw)
  To: ltp

Hi!
> +#ifdef __GLIBC__
>  	if (never_mmap)
>  		mallopt(M_MMAP_MAX, 0);
> -
> +#else
> +	fprintf(stderr, "Platform does not support mallopt() API\n");

Shouldn't be this message printed only if (never_mmap) ?

> +#endif

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 06/23] Use unsigned int instead of uint
  2016-07-22  4:26 ` [LTP] [PATCH V3 06/23] Use unsigned int instead of uint Khem Raj
@ 2016-07-26 15:51   ` Cyril Hrubis
  0 siblings, 0 replies; 54+ messages in thread
From: Cyril Hrubis @ 2016-07-26 15:51 UTC (permalink / raw)
  To: ltp

Hi!
Pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [LTP] [PATCH V3 07/23] ptrace: Use int instead of enum __ptrace_request
  2016-07-22  4:26 ` [LTP] [PATCH V3 07/23] ptrace: Use int instead of enum __ptrace_request Khem Raj
@ 2016-07-26 16:03       ` Cyril Hrubis
  0 siblings, 0 replies; 54+ messages in thread
From: Cyril Hrubis @ 2016-07-26 16:03 UTC (permalink / raw)
  To: Khem Raj
  Cc: ltp-cunTk1MwBs91InPhgRC9rw, libc-alpha-9JcytcrH/bA+uJoB2kUjGw,
	linux-man-u79uwXL29TY76Z2rM5mHXA

Hi!
> __ptrace_request is only available with glibc
> 
> Signed-off-by: Khem Raj <raj.khem-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  testcases/kernel/syscalls/ptrace/ptrace03.c           | 2 +-
>  testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/testcases/kernel/syscalls/ptrace/ptrace03.c b/testcases/kernel/syscalls/ptrace/ptrace03.c
> index a4028fc..f326b83 100644
> --- a/testcases/kernel/syscalls/ptrace/ptrace03.c
> +++ b/testcases/kernel/syscalls/ptrace/ptrace03.c
> @@ -102,7 +102,7 @@ static pid_t unused_pid;
>  static pid_t zero_pid;
>  
>  struct test_case_t {
> -	enum __ptrace_request request;
> +	int request;
>  	pid_t *pid;
>  	int exp_errno;
>  } test_cases[] = {
> diff --git a/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h b/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h
> index ae538e9..83de9b4 100644
> --- a/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h
> +++ b/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h
> @@ -130,7 +130,7 @@ static char *strings[] = {
>  	SPT(KILL)
>  	SPT(SINGLESTEP)
>  };
> -static inline char *strptrace(enum __ptrace_request request)
> +static inline char *strptrace(int request)
>  {
>  	return strings[request];
>  }

The enum __ptrace_request is used to describe the function prototype in
the ptrace() manual page so one can argue that it's part of the official
API.

If I remeber right, it's missing in musl libc and the code in question
fails to compile.

CCing glibc ML and also man-pages ML to see if the type is used in
manual page intentionally or not.

-- 
Cyril Hrubis
chrubis-AlSwsSmVLrQ@public.gmane.org
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 07/23] ptrace: Use int instead of enum __ptrace_request
@ 2016-07-26 16:03       ` Cyril Hrubis
  0 siblings, 0 replies; 54+ messages in thread
From: Cyril Hrubis @ 2016-07-26 16:03 UTC (permalink / raw)
  To: ltp

Hi!
> __ptrace_request is only available with glibc
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  testcases/kernel/syscalls/ptrace/ptrace03.c           | 2 +-
>  testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/testcases/kernel/syscalls/ptrace/ptrace03.c b/testcases/kernel/syscalls/ptrace/ptrace03.c
> index a4028fc..f326b83 100644
> --- a/testcases/kernel/syscalls/ptrace/ptrace03.c
> +++ b/testcases/kernel/syscalls/ptrace/ptrace03.c
> @@ -102,7 +102,7 @@ static pid_t unused_pid;
>  static pid_t zero_pid;
>  
>  struct test_case_t {
> -	enum __ptrace_request request;
> +	int request;
>  	pid_t *pid;
>  	int exp_errno;
>  } test_cases[] = {
> diff --git a/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h b/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h
> index ae538e9..83de9b4 100644
> --- a/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h
> +++ b/testcases/kernel/syscalls/ptrace/spawn_ptrace_child.h
> @@ -130,7 +130,7 @@ static char *strings[] = {
>  	SPT(KILL)
>  	SPT(SINGLESTEP)
>  };
> -static inline char *strptrace(enum __ptrace_request request)
> +static inline char *strptrace(int request)
>  {
>  	return strings[request];
>  }

The enum __ptrace_request is used to describe the function prototype in
the ptrace() manual page so one can argue that it's part of the official
API.

If I remeber right, it's missing in musl libc and the code in question
fails to compile.

CCing glibc ML and also man-pages ML to see if the type is used in
manual page intentionally or not.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 08/23] rt_sigaction/rt_sigprocmark: Replace SA_NOMASK with SA_NODEFER
  2016-07-22  4:26 ` [LTP] [PATCH V3 08/23] rt_sigaction/rt_sigprocmark: Replace SA_NOMASK with SA_NODEFER Khem Raj
@ 2016-07-27 10:14   ` Cyril Hrubis
  2016-07-27 15:14     ` Khem Raj
  0 siblings, 1 reply; 54+ messages in thread
From: Cyril Hrubis @ 2016-07-27 10:14 UTC (permalink / raw)
  To: ltp

Hi!
> --- a/testcases/misc/crash/crash01.c
> +++ b/testcases/misc/crash/crash01.c
> @@ -49,7 +49,7 @@ stress test at the same time you run other tests, like a multi-user
>  benchmark.
>  
>  */
> -
> +#define _GNU_SOURCE
>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <string.h>
> @@ -409,7 +409,7 @@ void my_signal(int sig, void (*func) ())
>  
>  	act.sa_handler = func;
>  	memset(&act.sa_mask, 0x00, sizeof(sigset_t));
> -	act.sa_flags = SA_NOMASK | SA_RESTART;
> +	act.sa_flags = SA_NODEFER | SA_RESTART;
>  	sigaction(sig, &act, 0);
>  }
>  
> diff --git a/testcases/misc/crash/crash02.c b/testcases/misc/crash/crash02.c
> index 00fee34..1aba3b9 100644
> --- a/testcases/misc/crash/crash02.c
> +++ b/testcases/misc/crash/crash02.c
> @@ -49,7 +49,6 @@ TODO:
>  	* Does a syscall is supposed to send SIGSEGV?
>  */
>  
> -#define _GNU_SOURCE
>  #include <sys/syscall.h>
>  #include <stdio.h>
>  #include <stdlib.h>
> @@ -358,7 +357,7 @@ void my_signal(int sig, void (*func) ())
>  
>  	act.sa_handler = func;
>  	memset(&act.sa_mask, 0x00, sizeof(sigset_t));
> -	act.sa_flags = SA_NOMASK | SA_RESTART;
> +	act.sa_flags = SA_NODEFER | SA_RESTART;
>  	sigaction(sig, &act, 0);
>  }

What is the reason to add #define _GNU_SOURCE to crash01 and to remove
it from crash02? That looks like unintended change to me.

The rest is obviously OK.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 09/23] mc_gethost: Use unsigned char instead of u_char
  2016-07-22  4:26 ` [LTP] [PATCH V3 09/23] mc_gethost: Use unsigned char instead of u_char Khem Raj
@ 2016-07-27 10:20   ` Cyril Hrubis
  0 siblings, 0 replies; 54+ messages in thread
From: Cyril Hrubis @ 2016-07-27 10:20 UTC (permalink / raw)
  To: ltp

Hi!
Pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 11/23] lapi: Use sig_t instead of sighandler_t
  2016-07-22  4:26 ` [LTP] [PATCH V3 11/23] lapi: Use sig_t instead of sighandler_t Khem Raj
@ 2016-07-27 10:22   ` Cyril Hrubis
  2016-07-27 15:15     ` Khem Raj
  0 siblings, 1 reply; 54+ messages in thread
From: Cyril Hrubis @ 2016-07-27 10:22 UTC (permalink / raw)
  To: ltp

Hi!
> --- a/testcases/kernel/syscalls/rt_sigsuspend/Makefile
> +++ b/testcases/kernel/syscalls/rt_sigsuspend/Makefile
> @@ -19,4 +19,5 @@
>  top_srcdir		?= ../../../..
>  
>  include $(top_srcdir)/include/mk/testcases.mk
> +
>  include $(top_srcdir)/include/mk/generic_leaf_target.mk

Again this added newline is unintended change that should not have been
part of this patch.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 13/23] vma03: fix page size offset as per page size alignment
  2016-07-22  4:26 ` [LTP] [PATCH V3 13/23] vma03: fix page size offset as per page size alignment Khem Raj
@ 2016-07-27 13:45   ` Cyril Hrubis
  0 siblings, 0 replies; 54+ messages in thread
From: Cyril Hrubis @ 2016-07-27 13:45 UTC (permalink / raw)
  To: ltp

Hi!
I've reworded the commit message and added a comment to the test code as
well and pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 14/23] shmat1: Cover GNU specific code under __USE_GNU
  2016-07-22  4:26 ` [LTP] [PATCH V3 14/23] shmat1: Cover GNU specific code under __USE_GNU Khem Raj
@ 2016-07-27 14:17   ` Cyril Hrubis
  2016-07-27 15:20     ` Khem Raj
  0 siblings, 1 reply; 54+ messages in thread
From: Cyril Hrubis @ 2016-07-27 14:17 UTC (permalink / raw)
  To: ltp

Hi!
> +#if defined(__i386__) && defined(__USE_GNU)

Hmm, shouldn't this rather be defined(__GLIBC__) ?

As far as I can tell __USE_GNU is enabled if _GNU_SOURCE is defined
while __GLIBC__ is defined in glibc unconditionally.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 15/23] Add periodic output for long time test.
  2016-07-22  4:26 ` [LTP] [PATCH V3 15/23] Add periodic output for long time test Khem Raj
@ 2016-07-27 14:37   ` Cyril Hrubis
  2016-07-27 15:21     ` Tudor Florea
  0 siblings, 1 reply; 54+ messages in thread
From: Cyril Hrubis @ 2016-07-27 14:37 UTC (permalink / raw)
  To: ltp

Hi!
> diff --git a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
> index dc610f1..769da72 100755
> --- a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
> +++ b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
> @@ -37,7 +37,8 @@ if [ "x$(grep -w memory /proc/cgroups | cut -f4)" != "x1" ]; then
>          exit 0
>  fi
>  
> -RUN_TIME=$(( 60 * 60 ))
> +ONE_MINUTE=60
> +RUN_TIME=60
>  
>  cleanup()
>  {
> @@ -62,7 +63,7 @@ do_mount()
>  # $1 - Number of cgroups
>  # $2 - Allocated how much memory in one process? in MB
>  # $3 - The interval to touch memory in a process
> -# $4 - How long does this test run ? in second
> +# $4 - How long does this test run ? in minutes
>  run_stress()
>  {
>  	do_mount;
> @@ -81,7 +82,11 @@ run_stress()
>  		eval /bin/kill -s SIGUSR1 \$pid$i 2> /dev/null
>  	done
>  
> -	sleep $4
> +	for i in $(seq 0 $(($4-1)))
                   ^
	for i in $(seq 1 $4); do
> +		eval echo "Started $i min ago. Still alive... " 

                Why is this eval here?

		Also can we be a bit less verbose?

		What about just printing one dot (.) each minute and
		print a newline each ten minutes as well?

> +		sleep $ONE_MINUTE

                There is no need for the ONE_MINUTE abstraction, just do
		sleep 60 here.

> +	done
>  
>  	for i in $(seq 0 $(($1-1)))
>  	do
> -- 
> 2.9.0
> 
> 
> -- 
> Mailing list info: https://lists.linux.it/listinfo/ltp

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 16/23] Fix test_proc_kill hanging
  2016-07-22  4:26 ` [LTP] [PATCH V3 16/23] Fix test_proc_kill hanging Khem Raj
@ 2016-07-27 14:46   ` Cyril Hrubis
  0 siblings, 0 replies; 54+ messages in thread
From: Cyril Hrubis @ 2016-07-27 14:46 UTC (permalink / raw)
  To: ltp

Hi!
> diff --git a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
> index c90d0a2..331e75b 100755
> --- a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
> +++ b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
> @@ -220,8 +220,8 @@ test_proc_kill()
>  
>  	$TEST_PATH/memcg_process $2 -s $3 &
>  	pid=$!
> -	sleep 1
>  	echo $pid > tasks
> +	sleep 1

Hmm are you sure that this fixes race condition where the test is not
attached to the group while the signal is send?

I would say that the kernel should guarantee that once the echo returns
back to userspace the processes is attached. Anything else would be
terribly racy.

There is different race condition as well, and this one is between the
memcg_process setting up the signal handler and the stress test testing
the signal that may be the cause for a random failures as well.

>  	kill -s USR1 $pid 2> /dev/null
>  	sleep 1
> -- 
> 2.9.0
> 
> 
> -- 
> Mailing list info: https://lists.linux.it/listinfo/ltp

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 08/23] rt_sigaction/rt_sigprocmark: Replace SA_NOMASK with SA_NODEFER
  2016-07-27 10:14   ` Cyril Hrubis
@ 2016-07-27 15:14     ` Khem Raj
  2016-07-27 15:35       ` Cyril Hrubis
  0 siblings, 1 reply; 54+ messages in thread
From: Khem Raj @ 2016-07-27 15:14 UTC (permalink / raw)
  To: ltp


> On Jul 27, 2016, at 3:14 AM, Cyril Hrubis <chrubis@suse.cz> wrote:
> 
> Hi!
>> --- a/testcases/misc/crash/crash01.c
>> +++ b/testcases/misc/crash/crash01.c
>> @@ -49,7 +49,7 @@ stress test at the same time you run other tests, like a multi-user
>> benchmark.
>> 
>> */
>> -
>> +#define _GNU_SOURCE
>> #include <stdio.h>
>> #include <stdlib.h>
>> #include <string.h>
>> @@ -409,7 +409,7 @@ void my_signal(int sig, void (*func) ())
>> 
>> 	act.sa_handler = func;
>> 	memset(&act.sa_mask, 0x00, sizeof(sigset_t));
>> -	act.sa_flags = SA_NOMASK | SA_RESTART;
>> +	act.sa_flags = SA_NODEFER | SA_RESTART;
>> 	sigaction(sig, &act, 0);
>> }
>> 
>> diff --git a/testcases/misc/crash/crash02.c b/testcases/misc/crash/crash02.c
>> index 00fee34..1aba3b9 100644
>> --- a/testcases/misc/crash/crash02.c
>> +++ b/testcases/misc/crash/crash02.c
>> @@ -49,7 +49,6 @@ TODO:
>> 	* Does a syscall is supposed to send SIGSEGV?
>> */
>> 
>> -#define _GNU_SOURCE
>> #include <sys/syscall.h>
>> #include <stdio.h>
>> #include <stdlib.h>
>> @@ -358,7 +357,7 @@ void my_signal(int sig, void (*func) ())
>> 
>> 	act.sa_handler = func;
>> 	memset(&act.sa_mask, 0x00, sizeof(sigset_t));
>> -	act.sa_flags = SA_NOMASK | SA_RESTART;
>> +	act.sa_flags = SA_NODEFER | SA_RESTART;
>> 	sigaction(sig, &act, 0);
>> }
> 
> What is the reason to add #define _GNU_SOURCE to crash01 and to remove
> it from crash02? That looks like unintended change to me.

The define was needed only for these SA_* symbols which are removed
so I removed the define as well.

> 
> The rest is obviously OK.
> 
> --
> Cyril Hrubis
> chrubis@suse.cz

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.linux.it/pipermail/ltp/attachments/20160727/f531c8de/attachment.sig>

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 11/23] lapi: Use sig_t instead of sighandler_t
  2016-07-27 10:22   ` Cyril Hrubis
@ 2016-07-27 15:15     ` Khem Raj
  2016-07-27 16:03       ` Cyril Hrubis
  0 siblings, 1 reply; 54+ messages in thread
From: Khem Raj @ 2016-07-27 15:15 UTC (permalink / raw)
  To: ltp


> On Jul 27, 2016, at 3:22 AM, Cyril Hrubis <chrubis@suse.cz> wrote:
> 
> Hi!
>> --- a/testcases/kernel/syscalls/rt_sigsuspend/Makefile
>> +++ b/testcases/kernel/syscalls/rt_sigsuspend/Makefile
>> @@ -19,4 +19,5 @@
>> top_srcdir		?= ../../../..
>> 
>> include $(top_srcdir)/include/mk/testcases.mk
>> +
>> include $(top_srcdir)/include/mk/generic_leaf_target.mk
> 
> Again this added newline is unintended change that should not have been
> part of this patch.

overusing from my side. Do you want me to send a v4 ?


> 
> --
> Cyril Hrubis
> chrubis@suse.cz

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.linux.it/pipermail/ltp/attachments/20160727/39e052df/attachment.sig>

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 14/23] shmat1: Cover GNU specific code under __USE_GNU
  2016-07-27 14:17   ` Cyril Hrubis
@ 2016-07-27 15:20     ` Khem Raj
  0 siblings, 0 replies; 54+ messages in thread
From: Khem Raj @ 2016-07-27 15:20 UTC (permalink / raw)
  To: ltp


> On Jul 27, 2016, at 7:17 AM, Cyril Hrubis <chrubis@suse.cz> wrote:
> 
> Hi!
>> +#if defined(__i386__) && defined(__USE_GNU)
> 
> Hmm, shouldn't this rather be defined(__GLIBC__) ?
> 
> As far as I can tell __USE_GNU is enabled if _GNU_SOURCE is defined
> while __GLIBC__ is defined in glibc unconditionally.

Probably, yes

> 
> --
> Cyril Hrubis
> chrubis@suse.cz

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.linux.it/pipermail/ltp/attachments/20160727/30dae79a/attachment.sig>

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 15/23] Add periodic output for long time test.
  2016-07-27 14:37   ` Cyril Hrubis
@ 2016-07-27 15:21     ` Tudor Florea
  2016-07-27 15:33       ` Cyril Hrubis
  0 siblings, 1 reply; 54+ messages in thread
From: Tudor Florea @ 2016-07-27 15:21 UTC (permalink / raw)
  To: ltp

Hi
This patch was needed to avoid the timeout of the script used to parse
the redirected output of the test. That being said don't have any strong
arguments (pro or cons) of cleaning up or improving the patch.
To be pedantic, I think that a newline for every 10 minutes is a little
too seldom; maybe just adding a new line every 5 minute is acceptable.
I hope that helps,
  Tudor.

On 27/07/2016 17:37, Cyril Hrubis wrote:
> Hi!
>> diff --git a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
>> index dc610f1..769da72 100755
>> --- a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
>> +++ b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
>> @@ -37,7 +37,8 @@ if [ "x$(grep -w memory /proc/cgroups | cut -f4)" != "x1" ]; then
>>          exit 0
>>  fi
>>  
>> -RUN_TIME=$(( 60 * 60 ))
>> +ONE_MINUTE=60
>> +RUN_TIME=60
>>  
>>  cleanup()
>>  {
>> @@ -62,7 +63,7 @@ do_mount()
>>  # $1 - Number of cgroups
>>  # $2 - Allocated how much memory in one process? in MB
>>  # $3 - The interval to touch memory in a process
>> -# $4 - How long does this test run ? in second
>> +# $4 - How long does this test run ? in minutes
>>  run_stress()
>>  {
>>  	do_mount;
>> @@ -81,7 +82,11 @@ run_stress()
>>  		eval /bin/kill -s SIGUSR1 \$pid$i 2> /dev/null
>>  	done
>>  
>> -	sleep $4
>> +	for i in $(seq 0 $(($4-1)))
>                    ^
> 	for i in $(seq 1 $4); do
>> +		eval echo "Started $i min ago. Still alive... " 
> 
>                 Why is this eval here?
> 
> 		Also can we be a bit less verbose?
> 
> 		What about just printing one dot (.) each minute and
> 		print a newline each ten minutes as well?
> 
>> +		sleep $ONE_MINUTE
> 
>                 There is no need for the ONE_MINUTE abstraction, just do
> 		sleep 60 here.
> 
>> +	done
>>  
>>  	for i in $(seq 0 $(($1-1)))
>>  	do
>> -- 
>> 2.9.0
>>
>>
>> -- 
>> Mailing list info: https://lists.linux.it/listinfo/ltp
> 

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 17/23] initialize recursive mutex in a portable way
  2016-07-22  4:26 ` [LTP] [PATCH V3 17/23] initialize recursive mutex in a portable way Khem Raj
@ 2016-07-27 15:30   ` Cyril Hrubis
  0 siblings, 0 replies; 54+ messages in thread
From: Cyril Hrubis @ 2016-07-27 15:30 UTC (permalink / raw)
  To: ltp

Hi!
> diff --git a/include/mk/testcases.mk b/include/mk/testcases.mk
> index ea26d4f..eff0eee 100644
> --- a/include/mk/testcases.mk
> +++ b/include/mk/testcases.mk
> @@ -49,7 +49,7 @@ CPPFLAGS	+= -I$(abs_top_builddir)/$(TKI_DIR)
>  
>  INSTALL_DIR	:= testcases/bin
>  
> -LDLIBS		+= -lltp
> +LDLIBS		+= -lltp -lpthread
>  
>  $(APICMDS_DIR) $(LIBLTP_DIR) $(abs_top_builddir)/$(TKI_DIR): %:
>  	mkdir -p "$@"
> diff --git a/lib/ltp.pc.in b/lib/ltp.pc.in
> index 9620129..63cd5f4 100644
> --- a/lib/ltp.pc.in
> +++ b/lib/ltp.pc.in
> @@ -6,5 +6,5 @@ libdir=@libdir@
>  Name: LTP
>  Description: Linux Test Project
>  Version: @VERSION@
> -Libs: -L${libdir} -lltp
> +Libs: -L${libdir} -lltp -lpthread
>  Cflags: -I${includedir}
> diff --git a/lib/newlib_tests/Makefile b/lib/newlib_tests/Makefile
> index 0e4eeb8..9dd69fd 100644
> --- a/lib/newlib_tests/Makefile
> +++ b/lib/newlib_tests/Makefile
> @@ -3,7 +3,7 @@ top_srcdir		?= ../..
>  include $(top_srcdir)/include/mk/env_pre.mk
>  
>  CFLAGS			+= -W -Wall
> -LDLIBS			+= -lltp
> +LDLIBS			+= -lltp -lpthread
>  
>  test08: CFLAGS+=-pthread
>  test09: CFLAGS+=-pthread
> diff --git a/lib/tests/Makefile b/lib/tests/Makefile
> index 73a0f16..bc4476d 100644
> --- a/lib/tests/Makefile
> +++ b/lib/tests/Makefile
> @@ -3,7 +3,7 @@ top_srcdir		?= ../..
>  include $(top_srcdir)/include/mk/env_pre.mk
>  
>  CFLAGS			+= -W
> -LDLIBS			+= -lltp
> +LDLIBS			+= -lltp -lpthread
>  
>  tst_cleanup_once: CFLAGS += -pthread

This causes everything to be linked with pthreads which is enough for my
NACK for this patch.

> diff --git a/lib/tst_res.c b/lib/tst_res.c
> index b388d0d..ab995f8 100644
> --- a/lib/tst_res.c
> +++ b/lib/tst_res.c
> @@ -79,7 +79,8 @@ int TEST_ERRNO;
>  	assert(strlen(buf) > 0);		\
>  } while (0)
>  
> -static pthread_mutex_t tmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
> +static pthread_once_t tmutex_once = PTHREAD_ONCE_INIT;
> +static pthread_mutex_t tmutex;
>  
>  static void check_env(void);
>  static void tst_condense(int tnum, int ttype, const char *tmesg);
> @@ -142,9 +143,20 @@ const char *strttype(int ttype)
>  #include "errnos.h"
>  #include "signame.h"
>  
> +static void init_tmutex(void)
> +{
> +	pthread_mutexattr_t attr;
> +
> +	pthread_mutexattr_init(&attr);
> +	pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
> +	pthread_mutex_init(&tmutex, &attr);
> +	pthread_mutexattr_destroy(&attr);
> +}
> +
>  static void tst_res__(const char *file, const int lineno, int ttype,
>                        const char *arg_fmt, ...)
>  {
> +	pthread_once(&tmutex_once, init_tmutex);
>  	pthread_mutex_lock(&tmutex);
>  
>  	char tmesg[USERMESG];
> @@ -233,6 +245,7 @@ void tst_flush(void)
>  {
>  	NO_NEWLIB_ASSERT("Unknown", 0);
>  
> +	pthread_once(&tmutex_once, init_tmutex);
>  	pthread_mutex_lock(&tmutex);
>  
>  	/*
> @@ -369,6 +382,7 @@ void tst_exit(void)
>  {
>  	NO_NEWLIB_ASSERT("Unknown", 0);
>  
> +	pthread_once(&tmutex_once, init_tmutex);
>  	pthread_mutex_lock(&tmutex);
>  
>  	tst_flush();
> @@ -441,6 +455,7 @@ static int tst_brk_entered = 0;
>  static void tst_brk__(const char *file, const int lineno, int ttype,
>                        void (*func)(void), const char *arg_fmt, ...)
>  {
> +	pthread_once(&tmutex_once, init_tmutex);
>  	pthread_mutex_lock(&tmutex);
>  
>  	char tmesg[USERMESG];
> @@ -505,6 +520,7 @@ void tst_resm_hexd_(const char *file, const int lineno, int ttype,
>  {
>  	NO_NEWLIB_ASSERT(file, lineno);
>  
> +	pthread_once(&tmutex_once, init_tmutex);
>  	pthread_mutex_lock(&tmutex);
>  

I do not like this.

I guess the easiest solution would be to eliminate the need for the
mutex to be recursive.

Which may be possible if we turn the T_exitval into counters and use
atomic operations to increment them which should us free from guarding
T_exitval updates called from tst_print() which are called from all over
the place. Or we can get rid of T_mode keeping only the default VERBOSE
behavior, which should have the same efect...

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 15/23] Add periodic output for long time test.
  2016-07-27 15:21     ` Tudor Florea
@ 2016-07-27 15:33       ` Cyril Hrubis
  0 siblings, 0 replies; 54+ messages in thread
From: Cyril Hrubis @ 2016-07-27 15:33 UTC (permalink / raw)
  To: ltp

Hi!
> This patch was needed to avoid the timeout of the script used to parse
> the redirected output of the test. That being said don't have any strong
> arguments (pro or cons) of cleaning up or improving the patch.
> To be pedantic, I think that a newline for every 10 minutes is a little
> too seldom; maybe just adding a new line every 5 minute is acceptable.

Newline per five lines is OK as well. Having 12 lines of output is still
much better than having 60.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 08/23] rt_sigaction/rt_sigprocmark: Replace SA_NOMASK with SA_NODEFER
  2016-07-27 15:14     ` Khem Raj
@ 2016-07-27 15:35       ` Cyril Hrubis
  0 siblings, 0 replies; 54+ messages in thread
From: Cyril Hrubis @ 2016-07-27 15:35 UTC (permalink / raw)
  To: ltp

Hi!
> >> +#define _GNU_SOURCE
> >> #include <stdio.h>
> >> #include <stdlib.h>
> >> #include <string.h>
> >> @@ -409,7 +409,7 @@ void my_signal(int sig, void (*func) ())
> >> 
> >> 	act.sa_handler = func;
> >> 	memset(&act.sa_mask, 0x00, sizeof(sigset_t));
> >> -	act.sa_flags = SA_NOMASK | SA_RESTART;
> >> +	act.sa_flags = SA_NODEFER | SA_RESTART;
> >> 	sigaction(sig, &act, 0);
> >> }
> >> 
> >> diff --git a/testcases/misc/crash/crash02.c b/testcases/misc/crash/crash02.c
> >> index 00fee34..1aba3b9 100644
> >> --- a/testcases/misc/crash/crash02.c
> >> +++ b/testcases/misc/crash/crash02.c
> >> @@ -49,7 +49,6 @@ TODO:
> >> 	* Does a syscall is supposed to send SIGSEGV?
> >> */
> >> 
> >> -#define _GNU_SOURCE
> >> #include <sys/syscall.h>
> >> #include <stdio.h>
> >> #include <stdlib.h>
> >> @@ -358,7 +357,7 @@ void my_signal(int sig, void (*func) ())
> >> 
> >> 	act.sa_handler = func;
> >> 	memset(&act.sa_mask, 0x00, sizeof(sigset_t));
> >> -	act.sa_flags = SA_NOMASK | SA_RESTART;
> >> +	act.sa_flags = SA_NODEFER | SA_RESTART;
> >> 	sigaction(sig, &act, 0);
> >> }
> > 
> > What is the reason to add #define _GNU_SOURCE to crash01 and to remove
> > it from crash02? That looks like unintended change to me.
> 
> The define was needed only for these SA_* symbols which are removed
> so I removed the define as well.

Hmm, so why the patch adds it to crash01.c at all?

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 11/23] lapi: Use sig_t instead of sighandler_t
  2016-07-27 15:15     ` Khem Raj
@ 2016-07-27 16:03       ` Cyril Hrubis
  0 siblings, 0 replies; 54+ messages in thread
From: Cyril Hrubis @ 2016-07-27 16:03 UTC (permalink / raw)
  To: ltp

Hi!
> overusing from my side. Do you want me to send a v4 ?

Looking at it again, the sig_t is BSD specific one and may not be
defined on older glibc.

So the safest bet would be to define it as:

void (*k_sa_handler)(int);

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 18/23] replace SIGCLD with SIGCHLD
  2016-07-22  4:26 ` [LTP] [PATCH V3 18/23] replace SIGCLD with SIGCHLD Khem Raj
@ 2016-07-27 16:24   ` Cyril Hrubis
  0 siblings, 0 replies; 54+ messages in thread
From: Cyril Hrubis @ 2016-07-27 16:24 UTC (permalink / raw)
  To: ltp

Hi!
> -	#ifdef SIGCLD
> -		/* SIGCLD same as SIGCHLD */
> -		STRPAIR(SIGCHLD, "SIGCHLD/SIGCLD")
> +	#ifdef SIGCHLD
> +		/* SIGCHLD same as SIGCHLD */
> +		STRPAIR(SIGCHLD, "SIGCHLD/SIGCHLD")
>  	#else
>  		PAIR(SIGCHLD)
>  	#endif

I had to fix this part, since obviously it does not make sense anymore
and all of it needed to be replaced by just PAIR(SIGCHLD);

> --- a/testcases/kernel/ipc/ipc_stress/signals.h
> +++ b/testcases/kernel/ipc/ipc_stress/signals.h
> @@ -38,7 +38,7 @@ char * signames [] =
>   "SIGALRM", //         14      // Alarm clock (POSIX).
>   "SIGTERM", //         15      // Termination (ANSI).
>   "SIGSTKFLT", //       16      // Stack fault.
> - "SIGCLD/SIGCHLD", //  SIGCHLD // Same as SIGCHLD (System V).
> + "SIGCHLD/SIGCHLD", //  SIGCHLD // Same as SIGCHLD (System V).
>   //"SIGCHLD", //       17      // Child status has changed (POSIX).
>   "SIGCONT", //         18      // Continue (POSIX).
>   "SIGSTOP", //         19      // Stop, unblockable (POSIX).

And here as well.


And pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 19/23] creat06: Include limits.h for PATH_MAX
  2016-07-22  4:26 ` [LTP] [PATCH V3 19/23] creat06: Include limits.h for PATH_MAX Khem Raj
@ 2016-08-01 12:49   ` Cyril Hrubis
  0 siblings, 0 replies; 54+ messages in thread
From: Cyril Hrubis @ 2016-08-01 12:49 UTC (permalink / raw)
  To: ltp

Hi!
Pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 20/23] fcntl34: Replace pthread_yield() with sched_yield()
  2016-07-22  4:26 ` [LTP] [PATCH V3 20/23] fcntl34: Replace pthread_yield() with sched_yield() Khem Raj
@ 2016-08-01 12:57   ` Cyril Hrubis
  0 siblings, 0 replies; 54+ messages in thread
From: Cyril Hrubis @ 2016-08-01 12:57 UTC (permalink / raw)
  To: ltp

Hi!
Pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 21/23] rename 'sigset' var to avoid shadowing with libc symbol sigset
  2016-07-22  4:26 ` [LTP] [PATCH V3 21/23] rename 'sigset' var to avoid shadowing with libc symbol sigset Khem Raj
@ 2016-08-01 14:19   ` Cyril Hrubis
  0 siblings, 0 replies; 54+ messages in thread
From: Cyril Hrubis @ 2016-08-01 14:19 UTC (permalink / raw)
  To: ltp

Hi!
Pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 22/23] pec: Replace obsoleted SA_ONESHOT with SA_RESETHAND
  2016-07-22  4:26 ` [LTP] [PATCH V3 22/23] pec: Replace obsoleted SA_ONESHOT with SA_RESETHAND Khem Raj
@ 2016-08-01 14:30   ` Cyril Hrubis
  0 siblings, 0 replies; 54+ messages in thread
From: Cyril Hrubis @ 2016-08-01 14:30 UTC (permalink / raw)
  To: ltp

Hi!
Pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 23/23] shmem_test_04: Include sys/types.h for caddr_t
  2016-07-22  4:26 ` [LTP] [PATCH V3 23/23] shmem_test_04: Include sys/types.h for caddr_t Khem Raj
@ 2016-08-01 14:34   ` Cyril Hrubis
  0 siblings, 0 replies; 54+ messages in thread
From: Cyril Hrubis @ 2016-08-01 14:34 UTC (permalink / raw)
  To: ltp

Hi!
The caddr_t is legacy BSD type it should rather be replaced with void *.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 12/23] trace_shed: Adapt to glibc 2.24 removal of union wait type
  2016-07-22  4:26 ` [LTP] [PATCH V3 12/23] trace_shed: Adapt to glibc 2.24 removal of union wait type Khem Raj
@ 2016-08-01 15:22   ` Cyril Hrubis
  0 siblings, 0 replies; 54+ messages in thread
From: Cyril Hrubis @ 2016-08-01 15:22 UTC (permalink / raw)
  To: ltp

Hi!
Pushed with a few changes to the commit description, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [LTP] [PATCH V3 10/23] sysconf01: Use _SC_2_C_VERSION conditionally
  2016-07-22  4:26 ` [LTP] [PATCH V3 10/23] sysconf01: Use _SC_2_C_VERSION conditionally Khem Raj
@ 2016-08-01 15:36   ` Cyril Hrubis
  0 siblings, 0 replies; 54+ messages in thread
From: Cyril Hrubis @ 2016-08-01 15:36 UTC (permalink / raw)
  To: ltp

Hi!
> _SC_2_C_VERSION is not available on musl

Looks like it has been removed from minimal required set of system
variables in newer POSIXes.

> ---
>  testcases/kernel/syscalls/sysconf/sysconf01.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/testcases/kernel/syscalls/sysconf/sysconf01.c b/testcases/kernel/syscalls/sysconf/sysconf01.c
> index 8542e77..7ebae23 100644
> --- a/testcases/kernel/syscalls/sysconf/sysconf01.c
> +++ b/testcases/kernel/syscalls/sysconf/sysconf01.c
> @@ -102,7 +102,9 @@ int main(void)
>  	test_sysconf(_SC_ATEXIT_MAX);
>  	test_sysconf(_SC_2_C_BIND);
>  	test_sysconf(_SC_2_C_DEV);
> +#ifdef _SC_2_C_VERSION
>  	test_sysconf(_SC_2_C_VERSION);
> +#endif

I've added an else branch that prints TCONF so that the number of tests
is always the same and pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 54+ messages in thread

end of thread, other threads:[~2016-08-01 15:36 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-22  4:26 [LTP] [PATCH V3 01/23] Add knob to control whether numa support should be checked Khem Raj
2016-07-22  4:26 ` [LTP] [PATCH V3 02/23] Add knob to control tirpc support Khem Raj
2016-07-26 14:35   ` Cyril Hrubis
2016-07-26 14:56     ` Khem Raj
2016-07-22  4:26 ` [LTP] [PATCH V3 03/23] Remove including error.h, its unused Khem Raj
2016-07-26 15:05   ` Cyril Hrubis
2016-07-22  4:26 ` [LTP] [PATCH V3 04/23] Remove unused __BEGIN_DECLS and __END_DECLS Khem Raj
2016-07-26 15:39   ` Cyril Hrubis
2016-07-22  4:26 ` [LTP] [PATCH V3 05/23] guard mallocopt() with __GLIBC__ Khem Raj
2016-07-26 15:44   ` Cyril Hrubis
2016-07-22  4:26 ` [LTP] [PATCH V3 06/23] Use unsigned int instead of uint Khem Raj
2016-07-26 15:51   ` Cyril Hrubis
2016-07-22  4:26 ` [LTP] [PATCH V3 07/23] ptrace: Use int instead of enum __ptrace_request Khem Raj
     [not found]   ` <20160722042656.22346-7-raj.khem-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-07-26 16:03     ` Cyril Hrubis
2016-07-26 16:03       ` Cyril Hrubis
2016-07-22  4:26 ` [LTP] [PATCH V3 08/23] rt_sigaction/rt_sigprocmark: Replace SA_NOMASK with SA_NODEFER Khem Raj
2016-07-27 10:14   ` Cyril Hrubis
2016-07-27 15:14     ` Khem Raj
2016-07-27 15:35       ` Cyril Hrubis
2016-07-22  4:26 ` [LTP] [PATCH V3 09/23] mc_gethost: Use unsigned char instead of u_char Khem Raj
2016-07-27 10:20   ` Cyril Hrubis
2016-07-22  4:26 ` [LTP] [PATCH V3 10/23] sysconf01: Use _SC_2_C_VERSION conditionally Khem Raj
2016-08-01 15:36   ` Cyril Hrubis
2016-07-22  4:26 ` [LTP] [PATCH V3 11/23] lapi: Use sig_t instead of sighandler_t Khem Raj
2016-07-27 10:22   ` Cyril Hrubis
2016-07-27 15:15     ` Khem Raj
2016-07-27 16:03       ` Cyril Hrubis
2016-07-22  4:26 ` [LTP] [PATCH V3 12/23] trace_shed: Adapt to glibc 2.24 removal of union wait type Khem Raj
2016-08-01 15:22   ` Cyril Hrubis
2016-07-22  4:26 ` [LTP] [PATCH V3 13/23] vma03: fix page size offset as per page size alignment Khem Raj
2016-07-27 13:45   ` Cyril Hrubis
2016-07-22  4:26 ` [LTP] [PATCH V3 14/23] shmat1: Cover GNU specific code under __USE_GNU Khem Raj
2016-07-27 14:17   ` Cyril Hrubis
2016-07-27 15:20     ` Khem Raj
2016-07-22  4:26 ` [LTP] [PATCH V3 15/23] Add periodic output for long time test Khem Raj
2016-07-27 14:37   ` Cyril Hrubis
2016-07-27 15:21     ` Tudor Florea
2016-07-27 15:33       ` Cyril Hrubis
2016-07-22  4:26 ` [LTP] [PATCH V3 16/23] Fix test_proc_kill hanging Khem Raj
2016-07-27 14:46   ` Cyril Hrubis
2016-07-22  4:26 ` [LTP] [PATCH V3 17/23] initialize recursive mutex in a portable way Khem Raj
2016-07-27 15:30   ` Cyril Hrubis
2016-07-22  4:26 ` [LTP] [PATCH V3 18/23] replace SIGCLD with SIGCHLD Khem Raj
2016-07-27 16:24   ` Cyril Hrubis
2016-07-22  4:26 ` [LTP] [PATCH V3 19/23] creat06: Include limits.h for PATH_MAX Khem Raj
2016-08-01 12:49   ` Cyril Hrubis
2016-07-22  4:26 ` [LTP] [PATCH V3 20/23] fcntl34: Replace pthread_yield() with sched_yield() Khem Raj
2016-08-01 12:57   ` Cyril Hrubis
2016-07-22  4:26 ` [LTP] [PATCH V3 21/23] rename 'sigset' var to avoid shadowing with libc symbol sigset Khem Raj
2016-08-01 14:19   ` Cyril Hrubis
2016-07-22  4:26 ` [LTP] [PATCH V3 22/23] pec: Replace obsoleted SA_ONESHOT with SA_RESETHAND Khem Raj
2016-08-01 14:30   ` Cyril Hrubis
2016-07-22  4:26 ` [LTP] [PATCH V3 23/23] shmem_test_04: Include sys/types.h for caddr_t Khem Raj
2016-08-01 14:34   ` Cyril Hrubis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.