diff --git a/winsup/testsuite/ChangeLog b/winsup/testsuite/ChangeLog index ed2c5cb31..6e0c23145 100644 --- a/winsup/testsuite/ChangeLog +++ b/winsup/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-02-10 Christopher Faylor + + * winsup.api/known_bugs.tcl: Remove dup05, fcntl07B, lseek04, select03, + unlink06. + 2005-01-09 Christopher Faylor * cygrun.c (main): Fix exit code so that it reflects UNIX style. diff --git a/winsup/testsuite/winsup.api/known_bugs.tcl b/winsup/testsuite/winsup.api/known_bugs.tcl index 0af25ab02..e063ee6bb 100644 --- a/winsup/testsuite/winsup.api/known_bugs.tcl +++ b/winsup/testsuite/winsup.api/known_bugs.tcl @@ -1,8 +1,4 @@ -set xfail_list [list dup03 dup05 \ - fcntl05 fcntl07B \ - lseek04 select03 \ - setgroups01 setuid02 \ - ulimit01 unlink06 unlink08 \ +set xfail_list [list dup03 \ + fcntl05 setgroups01 setuid02 \ + ulimit01 unlink08 \ sample-fail sample-miscompile] - - diff --git a/winsup/testsuite/winsup.api/mmaptest03.c b/winsup/testsuite/winsup.api/mmaptest03.c index 2af191237..8046f0bf8 100644 --- a/winsup/testsuite/winsup.api/mmaptest03.c +++ b/winsup/testsuite/winsup.api/mmaptest03.c @@ -18,6 +18,8 @@ sigset_t unblock_sigsegv; jmp_buf r; +static const char *msg; +static const char *what; /* filler for file */ char const line[] = "y1 y1 y1 y1 y1 y1 y1 y1 y1 y1 y1 y1 y1 y1 y1 y1 y1"; @@ -25,6 +27,7 @@ void perror_exit (const char *str) { printf ("%s: %s\n", str, strerror (errno)); + fflush (stdout); exit (1); } @@ -32,6 +35,13 @@ void sigsegv (int unused) { sigprocmask (SIG_UNBLOCK, &unblock_sigsegv, 0); + if (msg) + { + char buf[132]; + sprintf (buf, "%s %s\n", what, msg); + write (1, buf, strlen (buf)); + msg = NULL; + } longjmp (r, 1); } @@ -82,7 +92,16 @@ main(int argc, char **argv) if (setjmp (r)) perror_exit ("SEGV in fork"); - pid = fork(); + if ((pid = fork())) + { + // write (1, "continuing in parent\n", strlen ("continuing in parent\n")); + what = "parent"; + } + else + { + // write (1, "continuing in child\n", strlen ("continuing in child\n")); + what = "child"; + } if (pid == -1) perror_exit ("fork failed"); @@ -90,7 +109,9 @@ main(int argc, char **argv) if (setjmp (r)) perror_exit (pid ? "SEGV in parent" : "SEGV in child"); + msg = "testing buf1"; c = buf1[0]; + msg = "testing buf2"; c = buf2[0]; if (setjmp (r)) @@ -101,6 +122,7 @@ main(int argc, char **argv) if (setjmp (r) == 0) { + msg = "testing buf1 after unmap"; c = buf1[0]; perror_exit (pid ? "no SEGV in parent after munmap" : "no SEGV in child after munmap"); } @@ -108,6 +130,7 @@ main(int argc, char **argv) if (setjmp (r)) perror_exit (pid ? "SEGV in parent after munmap" : "SEGV in child after munmap"); + msg = "testing buf2 again"; c = buf2[0]; if (setjmp (r)) @@ -121,7 +144,10 @@ main(int argc, char **argv) waitpid (pid, &status, 0); unlink ("y.txt"); if (!WIFEXITED (status) || WEXITSTATUS (status)) - return 1; + { + printf ("forked process exited with status %p\n", (char *) status); + return 1; + } } return 0;