Ticket #1812: sigsuspend.diff

File sigsuspend.diff, 2.6 KB (added by kaoutsis, 16 years ago)
  • src/tests/system/libroot/posix/posixtestsuite/run_posix_tests.sh

     
    135135    conformance/interfaces/sigset/sigset_10-1
    136136    echo ""
    137137    echo "sigsuspend()"
    138     echo "FIXME: haiku' sigsuspend can not 'wake up' yet."
     138    conformance/interfaces/sigsuspend/sigsuspend_6-1
    139139}
    140140
     141
    141142all_tests()
    142143{
    143144    standard_tests
  • src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sigsuspend/6-1.c

     
    4949            sigemptyset(&tempmask);
    5050
    5151            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");
    5353                    return 3;
    5454            }
    5555
    56         printf("suspending child\n");
     56        printf("sigsuspend_6-1: suspending child\n");
    5757            if (sigsuspend(&tempmask) != -1) {
    58                     perror("sigsuspend error");
     58                    perror("sigsuspend_6-1: sigsuspend error");
    5959            return 1;
    6060        }
    61             printf("returned from suspend\n");
     61            printf("sigsuspend_6-1: returned from suspend\n");
    6262
    6363        sleep(1);
    6464        return 2;
     
    7070        /* parent */
    7171        sleep(1);
    7272
    73         printf("parent sending child a SIGUSR1 signal\n");
     73        printf("sigsuspend_6-1: parent sending child a SIGUSR1 signal\n");
    7474        kill (pid, SIGUSR1);
    7575
    7676        if (wait(&s) == -1) {
    77             perror("Unexpected error while setting up test "
     77            perror("sigsuspend_6-1: Unexpected error while setting up test "
    7878                   "pre-conditions");
    7979            return PTS_UNRESOLVED;
    8080        }
    8181
    8282        exit_status = WEXITSTATUS(s);
    8383
    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);
    8585
    8686                if (exit_status == 1) {
    87             printf("Test FAILED\n");
     87            printf("sigsuspend_6-1: Test FAILED\n");
    8888                        return PTS_FAIL;
    8989                }
    9090
     
    9797                        return PTS_UNRESOLVED;
    9898                }
    9999
    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");
    101101        return PTS_UNRESOLVED;
    102102    }
    103103}