Ticket #1812: sigsuspend.diff
File sigsuspend.diff, 2.6 KB (added by , 16 years ago) |
---|
-
src/tests/system/libroot/posix/posixtestsuite/run_posix_tests.sh
135 135 conformance/interfaces/sigset/sigset_10-1 136 136 echo "" 137 137 echo "sigsuspend()" 138 echo "FIXME: haiku' sigsuspend can not 'wake up' yet."138 conformance/interfaces/sigsuspend/sigsuspend_6-1 139 139 } 140 140 141 141 142 all_tests() 142 143 { 143 144 standard_tests -
src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sigsuspend/6-1.c
49 49 sigemptyset(&tempmask); 50 50 51 51 if (sigaction(SIGUSR1, &act, 0) == -1) { 52 perror(" Unexpected error while attempting to pre-conditions");52 perror("sigsuspend_6-1: Unexpected error while attempting to pre-conditions"); 53 53 return 3; 54 54 } 55 55 56 printf("s uspending child\n");56 printf("sigsuspend_6-1: suspending child\n"); 57 57 if (sigsuspend(&tempmask) != -1) { 58 perror("sigsuspend error");58 perror("sigsuspend_6-1: sigsuspend error"); 59 59 return 1; 60 60 } 61 printf(" returned from suspend\n");61 printf("sigsuspend_6-1: returned from suspend\n"); 62 62 63 63 sleep(1); 64 64 return 2; … … 70 70 /* parent */ 71 71 sleep(1); 72 72 73 printf(" parent sending child a SIGUSR1 signal\n");73 printf("sigsuspend_6-1: parent sending child a SIGUSR1 signal\n"); 74 74 kill (pid, SIGUSR1); 75 75 76 76 if (wait(&s) == -1) { 77 perror(" Unexpected error while setting up test "77 perror("sigsuspend_6-1: Unexpected error while setting up test " 78 78 "pre-conditions"); 79 79 return PTS_UNRESOLVED; 80 80 } 81 81 82 82 exit_status = WEXITSTATUS(s); 83 83 84 printf(" Exit status from child is %d\n", exit_status);84 printf("sigsuspend_6-1: Exit status from child is %d\n", exit_status); 85 85 86 86 if (exit_status == 1) { 87 printf(" Test FAILED\n");87 printf("sigsuspend_6-1: Test FAILED\n"); 88 88 return PTS_FAIL; 89 89 } 90 90 … … 97 97 return PTS_UNRESOLVED; 98 98 } 99 99 100 printf(" Child didn't exit with any of the expected return codes\n");100 printf("sigsuspend_6-1: Child didn't exit with any of the expected return codes\n"); 101 101 return PTS_UNRESOLVED; 102 102 } 103 103 }