]> Zhao Yanbai Git Server - minix.git/commitdiff
IPC test set fixes:
authorDavid van Moolenbroek <david@minix3.org>
Tue, 26 Jan 2010 08:05:33 +0000 (08:05 +0000)
committerDavid van Moolenbroek <david@minix3.org>
Tue, 26 Jan 2010 08:05:33 +0000 (08:05 +0000)
- restore original UID before deleting test directory
- do not assume that SIGUSR1 signal is set to default action

test/ipc/semget/semget02.c
test/ipc/semop/semop02.c
test/ipc/shmt/shmt04.c
test/ipc/shmt/shmt06.c

index 8efd18c4cc42480985f8ad1a1f4416e594ee91a6..fd1a2eb68b24cd3491840ba7addcd0bc7fcd2473 100644 (file)
@@ -182,6 +182,7 @@ cleanup(void)
        rm_sema(sem_id_1);
 
        /* Remove the temporary directory */
+       seteuid(getuid());
        tst_rmdir();
 
        /*
index 448de6e913d3d350aa6848cf96e91662d1d898a1..a842bfa7c9fb62db87f4920f1490ef0fc7f13dc2 100644 (file)
@@ -209,6 +209,7 @@ cleanup(void)
        rm_sema(sem_id_2);
 
        /* Remove the temporary directory */
+       seteuid(getuid());
        tst_rmdir();
 
        /*
index 1035cd98e07dc8399a411fffcbb53c758675352e..5d0ec3c4584482b805504236e05fd77ad18071aa 100644 (file)
@@ -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);
index e3ba11dd64e1197b69e20c49ee5b48017e24724a..54e829dcc77612ccab297279e6d3864050af4fc8 100644 (file)
@@ -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);