OSDN Git Service

* winsup.api/msgtest.c (main): Revert to use the SIGSYS signal handler.
authorcorinna <corinna>
Thu, 20 Nov 2003 18:25:36 +0000 (18:25 +0000)
committercorinna <corinna>
Thu, 20 Nov 2003 18:25:36 +0000 (18:25 +0000)
* winsup.api/semtest.c (main): Ditto.
* winsup.api/shmtest.c (main): Ditto.

winsup/testsuite/ChangeLog
winsup/testsuite/winsup.api/msgtest.c
winsup/testsuite/winsup.api/semtest.c
winsup/testsuite/winsup.api/shmtest.c

index f39650b..33fb66d 100644 (file)
@@ -1,3 +1,9 @@
+2003-11-20  Corinna Vinschen  <corinna@vinschen.de>
+
+       * winsup.api/msgtest.c (main): Revert to use the SIGSYS signal handler.
+       * winsup.api/semtest.c (main): Ditto.
+       * winsup.api/shmtest.c (main): Ditto.
+
 2003-11-19  Corinna Vinschen  <corinna@vinschen.de>
 
        * winsup.api/msgtest.c: New file derived from FreeBSD, testing
index 6fc69bf..e002a7f 100644 (file)
@@ -108,7 +108,6 @@ main(int argc, char *argv[])
 
        Tst_count = 0;
 
-#if 0
        /*
         * Install a SIGSYS handler so that we can exit gracefully if
         * System V Message Queue support isn't in the kernel.
@@ -117,8 +116,7 @@ main(int argc, char *argv[])
        sigemptyset(&sa.sa_mask);
        sa.sa_flags = 0;
        if (sigaction(SIGSYS, &sa, NULL) == -1)
-               err(1, "sigaction SIGSYS");
-#endif
+               tst_brkm (TBROK, cleanup, "sigaction SIGSYS");
 
        /*
         * Install and SIGCHLD handler to deal with all possible exit
@@ -140,19 +138,7 @@ main(int argc, char *argv[])
         */
        child_pid = getpid();
 
-#if 0
-       /*
-        * Make sure that when the sender exits, the message queue is
-        * removed.
-        */
-       if (atexit(cleanup) == -1)
-               err(1, "atexit");
-#endif
-
        sender_msqid = msgget(msgkey, IPC_CREAT | 0640);
-       if (sender_msqid == -1 && errno == ENOSYS)
-               tst_brkm (TRETR, cleanup,
-                "System V Message Queue support is not present in the kernel");
        tst_resm (sender_msqid == -1 ? TFAIL : TPASS, "sender calls msgget");
 
        tst_resm (msgctl(sender_msqid, IPC_STAT, &m_ds) == -1 ? TFAIL : TPASS,
index 7f1f75e..dfb8c08 100644 (file)
@@ -104,7 +104,6 @@ main(int argc, char *argv[])
 
        Tst_count = 0;
 
-#if 0
        /*
         * Install a SIGSYS handler so that we can exit gracefully if
         * System V Semaphore support isn't in the kernel.
@@ -113,8 +112,7 @@ main(int argc, char *argv[])
        sigemptyset(&sa.sa_mask);
        sa.sa_flags = 0;
        if (sigaction(SIGSYS, &sa, NULL) == -1)
-               err(1, "sigaction SIGSYS");
-#endif
+               tst_brkm (TBROK, cleanup, "sigaction SIGSYS");
 
        /*
         * Install and SIGCHLD handler to deal with all possible exit
@@ -137,9 +135,6 @@ main(int argc, char *argv[])
        child_pid = getpid();
 
        sender_semid = semget(semkey, 1, IPC_CREAT | 0640);
-       if (sender_semid == -1 && errno == ENOSYS)
-               tst_brkm (TRETR, cleanup,
-                   "System V Semaphore support is not present in the kernel");
        tst_resm (sender_semid == -1 ? TFAIL : TPASS, "sender calls semget");
        
        sun.buf = &s_ds;
index e1f3816..54a2493 100644 (file)
@@ -90,7 +90,6 @@ main(argc, argv)
 
        Tst_count = 0;
 
-#if 0
        /*
         * Install a SIGSYS handler so that we can exit gracefully if
         * System V Shared Memory support isn't in the kernel.
@@ -99,8 +98,7 @@ main(argc, argv)
        sigemptyset(&sa.sa_mask);
        sa.sa_flags = 0;
        if (sigaction(SIGSYS, &sa, NULL) == -1)
-               err(1, "sigaction SIGSYS");
-#endif
+               tst_brkm (TBROK, cleanup, "sigaction SIGSYS");
 
        /*
         * Install and SIGCHLD handler to deal with all possible exit
@@ -125,9 +123,6 @@ main(argc, argv)
        child_pid = getpid();
 
        sender_shmid = shmget(shmkey, pgsize, IPC_CREAT | 0640);
-       if (sender_shmid == -1 && errno == ENOSYS)
-               tst_brkm (TRETR, cleanup,
-               "System V Shared Memory support is not present in the kernel");
        tst_resm (sender_shmid == -1 ? TFAIL : TPASS, "sender calls shmget");
 
        tst_resm (shmctl(sender_shmid, IPC_STAT, &s_ds) == -1 ? TFAIL : TPASS,