mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 01:51:29 +00:00
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:
parent
2e5014cb8b
commit
2467698569
@ -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 \
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
1
memcheck/tests/sigprocmask.stderr.exp2
Normal file
1
memcheck/tests/sigprocmask.stderr.exp2
Normal file
@ -0,0 +1 @@
|
||||
__NR_sigprocmask not supported on this platform
|
||||
Loading…
x
Reference in New Issue
Block a user