The memcheck/tests/sigprocmask test is designed to test that we handle

the old style sigprocmask system call correctly without corrupting
memory when we copy out the new (larger) signal mask into the user
provided old (smaller) signal mask.

It therefore makes no sense to run it on amd64 or any other platform
which only has the newer rt_sigprocmask system call, and indeed it
wasn't working because we weren't passing the extra argument which
that call expects.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4990
This commit is contained in:
Tom Hughes 2005-11-02 15:46:07 +00:00
parent 2e5014cb8b
commit 2467698569
3 changed files with 13 additions and 9 deletions

View File

@ -73,7 +73,7 @@ EXTRA_DIST = $(noinst_SCRIPTS) \
sigaltstack.stderr.exp sigaltstack.vgtest \
sigkill.stderr.exp sigkill.stderr.exp2 sigkill.vgtest \
signal2.stderr.exp signal2.stdout.exp signal2.vgtest \
sigprocmask.stderr.exp sigprocmask.vgtest \
sigprocmask.stderr.exp sigprocmask.stderr.exp2 sigprocmask.vgtest \
stack_changes.stderr.exp stack_changes.stdout.exp stack_changes.vgtest \
strchr.stderr.exp strchr.stderr.exp2 strchr.vgtest \
str_tester.stderr.exp str_tester.vgtest \

View File

@ -9,12 +9,9 @@
int main(void)
{
int x[6], *s, *os, i, sysno;
int x[6], *s, *os, i;
sysno = __NR_rt_sigprocmask;
#ifdef __NR_sigprocmask
sysno = __NR_sigprocmask;
#endif
x[0] = 0x11111111;
x[1] = 0x89abcdef;
@ -30,7 +27,7 @@ int main(void)
// blocked as perl has been known to leave some signals blocked
// when starting child processes which can cause failures in
// this test unless we reset things here.
syscall(sysno, SIG_SETMASK, os, NULL);
syscall(__NR_sigprocmask, SIG_SETMASK, os, NULL);
fprintf(stderr, "before\n");
for (i = 0; i < 6; i++) {
@ -38,7 +35,7 @@ int main(void)
}
fprintf(stderr, "\n");
syscall(sysno, SIG_BLOCK, s, os);
syscall(__NR_sigprocmask, SIG_BLOCK, s, os);
fprintf(stderr, "after1\n");
for (i = 0; i < 6; i++) {
@ -46,13 +43,19 @@ int main(void)
}
fprintf(stderr, "\n");
syscall(sysno, SIG_BLOCK, s, os);
syscall(__NR_sigprocmask, SIG_BLOCK, s, os);
fprintf(stderr, "after2\n");
for (i = 0; i < 6; i++) {
fprintf(stderr, "%x ", x[i]);
}
fprintf(stderr, "\n");
#else
fprintf(stderr, "__NR_sigprocmask not supported on this platform\n");
#endif
return(0);
}

View File

@ -0,0 +1 @@
__NR_sigprocmask not supported on this platform