From: David van Moolenbroek Date: Tue, 26 Jan 2010 08:05:33 +0000 (+0000) Subject: IPC test set fixes: X-Git-Tag: v3.1.6~28 X-Git-Url: http://zhaoyanbai.com/repos/icons/apache_pb.png?a=commitdiff_plain;h=f23a37e10f854b23c13915e2d32371cac3a52aee;p=minix.git IPC test set fixes: - restore original UID before deleting test directory - do not assume that SIGUSR1 signal is set to default action --- diff --git a/test/ipc/semget/semget02.c b/test/ipc/semget/semget02.c index 8efd18c4c..fd1a2eb68 100644 --- a/test/ipc/semget/semget02.c +++ b/test/ipc/semget/semget02.c @@ -182,6 +182,7 @@ cleanup(void) rm_sema(sem_id_1); /* Remove the temporary directory */ + seteuid(getuid()); tst_rmdir(); /* diff --git a/test/ipc/semop/semop02.c b/test/ipc/semop/semop02.c index 448de6e91..a842bfa7c 100644 --- a/test/ipc/semop/semop02.c +++ b/test/ipc/semop/semop02.c @@ -209,6 +209,7 @@ cleanup(void) rm_sema(sem_id_2); /* Remove the temporary directory */ + seteuid(getuid()); tst_rmdir(); /* diff --git a/test/ipc/shmt/shmt04.c b/test/ipc/shmt/shmt04.c index 1035cd98e..5d0ec3c45 100644 --- a/test/ipc/shmt/shmt04.c +++ b/test/ipc/shmt/shmt04.c @@ -79,6 +79,8 @@ int main(void) key = (key_t) getpid() ; + signal(SIGUSR1, SIG_DFL); + sigemptyset(&sigset); sigaddset(&sigset,SIGUSR1); sigprocmask(SIG_BLOCK,&sigset,NULL); diff --git a/test/ipc/shmt/shmt06.c b/test/ipc/shmt/shmt06.c index e3ba11dd6..54e829dcc 100644 --- a/test/ipc/shmt/shmt06.c +++ b/test/ipc/shmt/shmt06.c @@ -79,6 +79,8 @@ int main(void) key = (key_t)getpid() ; + signal(SIGUSR1, SIG_DFL); + sigemptyset(&sigset); sigaddset(&sigset,SIGUSR1); sigprocmask(SIG_BLOCK,&sigset,NULL);