Skip to contentSkip to conversation

syscalls/rt_sigqueueinfo01: rewrote testcase

PATCH New Christian Amann 2 participants 3 messages May 8, 2019 – Jun 12, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 syscalls/rt_sigqueueinfo01: rewrote testcase

The previous implementation only tested if the syscall can be called at all. Now it also checks if the correct signal and data is sent and received.

---

Notes:
Kept header file in case of future additions.
Other than that: included all suggestions from v2 of this patch.
+ added solution to avoid 'tst_brk(TFAIL, ...)'

 testcases/kernel/syscalls/rt_sigqueueinfo/Makefile |   2 +
 .../syscalls/rt_sigqueueinfo/rt_sigqueueinfo.h     |  17 ++
 .../syscalls/rt_sigqueueinfo/rt_sigqueueinfo01.c   | 189 +++++++++++----------
 3 files changed, 121 insertions(+), 87 deletions(-)
 create mode 100644 testcases/kernel/syscalls/rt_sigqueueinfo/rt_sigqueueinfo.h
testcases/kernel/syscalls/rt_sigqueueinfo/Makefile +2 -0
index 2ef86f06f..498ba8e31 100644
@@ -21,3 +21,5 @@ top_srcdir		?= ../../../..
 include $(top_srcdir)/include/mk/testcases.mk
 
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
+
+rt_sigqueueinfo01: CFLAGS += -pthread
testcases/kernel/syscalls/rt_sigqueueinfo/rt_sigqueueinfo.h new file +17 -0
new file mode 100644
index 000000000..1489afadf
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2019 SUSE LLC
+ * Author: Christian Amann <[email protected]>
+ */
+
+#ifndef __RT_SIGQUEUEINFO_H__
+#define __RT_SIGQUEUEINFO_H__
+
+#include "lapi/syscalls.h"
+
+static int sys_rt_sigqueueinfo(pid_t tgid, int sig, siginfo_t *uinfo)
+{
+	return tst_syscall(__NR_rt_sigqueueinfo, tgid, sig, uinfo);
+}
+
+#endif /* __RT_SIGQUEUEINFO_H__ */
testcases/kernel/syscalls/rt_sigqueueinfo/rt_sigqueueinfo01.c +102 -87

204 lines not on this page · raw message

Signature · 1 line
2.16.4
Applied
#2 lore raw

PATCH v3 1/1 syscalls/rt_sigqueueinfo01: rewrote testcase

Hi Christian,

Quoted 6 lines
Quoted 5 lines

The previous implementation only tested if the syscall can be called at all. Now it also checks if the correct signal and data is sent and received.

Merged, thanks for your work!

Kind regards,
Petr