Skip to contentSkip to conversation

syscalls: add rt_tgsigqueueinfo() test-case

PATCH New Sumit Garg 2 participants 2 messages Mar 6, 2019

lore
Share & tools
lore

Sumit Garg

author
#0 lore raw

PATCH v3 1/1 syscalls: add rt_tgsigqueueinfo() test-case

This tests the rt_tgsigqueueinfo() syscall used to queue a signal and data to the single thread specified by the combination of tgid, a thread group ID, and tid, a thread in that thread group.

Also this test implement 3 cases differing on the basis of signal sender:
- Sender and receiver is the same thread.
- Sender is parent of the thread.
- Sender is different thread.

---

Changes in v3:
1. Remove usage of non asyn-safe function in signal handler.
2. Use checkpoint library for synchronization.
3. Fix possible race condition.
4. Miscellaneous fixes.

Changes in v2:
1. Add following cases where the sender differs:
- parent -> thread
- thread1 -> thread2
2. Add verification of signal and data delivered by rt_tgsigqueueinfo().

 runtest/syscalls                                   |   1 +
 .../kernel/syscalls/rt_tgsigqueueinfo/.gitignore   |   1 +
 .../kernel/syscalls/rt_tgsigqueueinfo/Makefile     |  10 ++
 .../rt_tgsigqueueinfo/rt_tgsigqueueinfo01.c        | 180 +++++++++++++++++++++
 4 files changed, 192 insertions(+)
 create mode 100644 testcases/kernel/syscalls/rt_tgsigqueueinfo/.gitignore
 create mode 100644 testcases/kernel/syscalls/rt_tgsigqueueinfo/Makefile
 create mode 100644 testcases/kernel/syscalls/rt_tgsigqueueinfo/rt_tgsigqueueinfo01.c
runtest/syscalls +1 -0
index 78a1f78..f6c2f1b 100644
@@ -999,6 +999,7 @@ rt_sigprocmask01 rt_sigprocmask01
 rt_sigprocmask02 rt_sigprocmask02
 rt_sigqueueinfo01 rt_sigqueueinfo01
 rt_sigsuspend01 rt_sigsuspend01
+rt_tgsigqueueinfo01 rt_tgsigqueueinfo01
 
 sbrk01 sbrk01
 sbrk02 sbrk02
testcases/kernel/syscalls/rt_tgsigqueueinfo/.gitignore new file +1 -0
new file mode 100644
index 0000000..f9ffa58
@@ -0,0 +1 @@
+rt_tgsigqueueinfo01
testcases/kernel/syscalls/rt_tgsigqueueinfo/Makefile new file +10 -0
new file mode 100644
index 0000000..035ca64
@@ -0,0 +1,10 @@
+# Copyright (c) 2019 - Linaro Limited. All rights reserved.
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+top_srcdir             ?= ../../../..
+
+rt_tgsigqueueinfo01: CFLAGS+=-pthread
+
+include $(top_srcdir)/include/mk/testcases.mk
+
+include $(top_srcdir)/include/mk/generic_leaf_target.mk
testcases/kernel/syscalls/rt_tgsigqueueinfo/rt_tgsigqueueinfo01.c new file +180 -0

180 lines not on this page · raw message

Signature · 1 line
2.7.4