* [LTP] [PATCH 1/2] syscalls/rt_sigsuspend01: ignore reserved signals
@ 2018-11-09 1:46 Steve Muckle
2018-11-09 1:46 ` [LTP] [PATCH 2/2] syscalls/sighold02: " Steve Muckle
2018-11-13 12:51 ` [LTP] [PATCH 1/2] syscalls/rt_sigsuspend01: " Cyril Hrubis
0 siblings, 2 replies; 4+ messages in thread
From: Steve Muckle @ 2018-11-09 1:46 UTC (permalink / raw)
To: ltp
Some signals may be internally used by the C library. Do not attempt to
verify these.
Change-Id: Ia5b8148c9273b9d13001b07824e9d55680382519
---
.../syscalls/rt_sigsuspend/rt_sigsuspend01.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c b/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c
index c8c228a47..edc913b44 100644
--- a/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c
+++ b/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c
@@ -87,19 +87,22 @@ int main(int ac, char **av)
SIGSETSIZE));
TEST(alarm(0));
if (result == -1 && TEST_ERRNO != EINTR) {
+ int i;
TEST(ltp_syscall(__NR_rt_sigprocmask, SIG_UNBLOCK, 0,
&set2, SIGSETSIZE));
- if (TEST_RETURN == -1) {
+ if (TEST_RETURN == -1)
tst_brkm(TFAIL | TTERRNO, cleanup,
"rt_sigprocmask failed");
- } else if (memcmp(&set1, &set2,
- sizeof(unsigned long))) {
- tst_brkm(TFAIL | TTERRNO, cleanup,
+ for (i = 1; i < SIGRTMAX; i++) {
+ if (i >= __SIGRTMIN && i < SIGRTMIN)
+ continue;
+ if (sigismember(&set1, i) !=
+ sigismember(&set2, i))
+ tst_brkm(TFAIL | TTERRNO, cleanup,
"rt_sigsuspend failed to "
"preserve signal mask");
- } else {
- tst_resm(TPASS, "rt_sigsuspend PASSED");
}
+ tst_resm(TPASS, "rt_sigsuspend PASSED");
} else {
tst_resm(TFAIL | TTERRNO, "rt_sigsuspend failed");
}
--
2.19.1.930.g4563a0d9d0-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [LTP] [PATCH 2/2] syscalls/sighold02: ignore reserved signals
2018-11-09 1:46 [LTP] [PATCH 1/2] syscalls/rt_sigsuspend01: ignore reserved signals Steve Muckle
@ 2018-11-09 1:46 ` Steve Muckle
2018-11-13 12:49 ` Cyril Hrubis
2018-11-13 12:51 ` [LTP] [PATCH 1/2] syscalls/rt_sigsuspend01: " Cyril Hrubis
1 sibling, 1 reply; 4+ messages in thread
From: Steve Muckle @ 2018-11-09 1:46 UTC (permalink / raw)
To: ltp
Some signals may be internally used by the C library. Do not attempt to
verify these.
Change-Id: If5a6a9bd7bbeceacde6904393c7452d927fa7522
---
testcases/kernel/syscalls/sighold/sighold02.c | 19 +++----------------
1 file changed, 3 insertions(+), 16 deletions(-)
diff --git a/testcases/kernel/syscalls/sighold/sighold02.c b/testcases/kernel/syscalls/sighold/sighold02.c
index fdd0e736d..d1d4b0b06 100644
--- a/testcases/kernel/syscalls/sighold/sighold02.c
+++ b/testcases/kernel/syscalls/sighold/sighold02.c
@@ -55,16 +55,6 @@
# define NSIG _NSIG
#endif
-/* Needed for NPTL */
-#define SIGCANCEL 32
-#define SIGTIMER 33
-
-/* Reserved in Android's bionic libc */
-#ifdef __ANDROID__
-# define SIGLIBCORE 34
-# define SIGDEBUGGERD 35
-#endif
-
/* ensure NUMSIGS is defined */
#ifndef NUMSIGS
# define NUMSIGS NSIG
@@ -83,17 +73,14 @@ static int sigs_map[NUMSIGS];
static int skip_sig(int sig)
{
+ if (sig >= __SIGRTMIN && sig < SIGRTMIN)
+ return 1;
+
switch (sig) {
case SIGCHLD:
case SIGKILL:
case SIGALRM:
case SIGSTOP:
- case SIGCANCEL:
- case SIGTIMER:
-#ifdef __ANDROID__
- case SIGLIBCORE:
- case SIGDEBUGGERD:
-#endif
return 1;
default:
return 0;
--
2.19.1.930.g4563a0d9d0-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [LTP] [PATCH 2/2] syscalls/sighold02: ignore reserved signals
2018-11-09 1:46 ` [LTP] [PATCH 2/2] syscalls/sighold02: " Steve Muckle
@ 2018-11-13 12:49 ` Cyril Hrubis
0 siblings, 0 replies; 4+ messages in thread
From: Cyril Hrubis @ 2018-11-13 12:49 UTC (permalink / raw)
To: ltp
Hi!
> Some signals may be internally used by the C library. Do not attempt to
> verify these.
This is a nice cleanup, applied, thanks.
> Change-Id: If5a6a9bd7bbeceacde6904393c7452d927fa7522
I've removed this tag and added your Signed-off-by here.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 4+ messages in thread
* [LTP] [PATCH 1/2] syscalls/rt_sigsuspend01: ignore reserved signals
2018-11-09 1:46 [LTP] [PATCH 1/2] syscalls/rt_sigsuspend01: ignore reserved signals Steve Muckle
2018-11-09 1:46 ` [LTP] [PATCH 2/2] syscalls/sighold02: " Steve Muckle
@ 2018-11-13 12:51 ` Cyril Hrubis
1 sibling, 0 replies; 4+ messages in thread
From: Cyril Hrubis @ 2018-11-13 12:51 UTC (permalink / raw)
To: ltp
Hi!
Looking at the test code it's complete mess, there is quite a lot
useless code as well. Let me clean up that first, I will do that today,
then we can fix it.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-11-13 12:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-09 1:46 [LTP] [PATCH 1/2] syscalls/rt_sigsuspend01: ignore reserved signals Steve Muckle
2018-11-09 1:46 ` [LTP] [PATCH 2/2] syscalls/sighold02: " Steve Muckle
2018-11-13 12:49 ` Cyril Hrubis
2018-11-13 12:51 ` [LTP] [PATCH 1/2] syscalls/rt_sigsuspend01: " 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.