aboutsummaryrefslogtreecommitdiff
path: root/winsup/testsuite
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-02-10 17:48:30 +0000
committerChristopher Faylor <me@cgf.cx>2005-02-10 17:48:30 +0000
commit292a8156c6ecc1d8f9689a59c6119df4e3efb914 (patch)
treeba252c69f5dfcd222c747d92a6f3a7a0a650b3a9 /winsup/testsuite
parent78a04600f9b2dac96b06e26a62fc34becdcc6ffb (diff)
downloadnewlib-292a8156c6ecc1d8f9689a59c6119df4e3efb914.zip
newlib-292a8156c6ecc1d8f9689a59c6119df4e3efb914.tar.gz
newlib-292a8156c6ecc1d8f9689a59c6119df4e3efb914.tar.bz2
* winsup.api/known_bugs.tcl: Remove dup05, fcntl07B, lseek04, select03,
unlink06.
Diffstat (limited to 'winsup/testsuite')
-rw-r--r--winsup/testsuite/ChangeLog5
-rw-r--r--winsup/testsuite/winsup.api/known_bugs.tcl10
-rw-r--r--winsup/testsuite/winsup.api/mmaptest03.c30
3 files changed, 36 insertions, 9 deletions
diff --git a/winsup/testsuite/ChangeLog b/winsup/testsuite/ChangeLog
index ed2c5cb..6e0c231 100644
--- a/winsup/testsuite/ChangeLog
+++ b/winsup/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2005-02-10 Christopher Faylor <cgf@timesys.com>
+
+ * winsup.api/known_bugs.tcl: Remove dup05, fcntl07B, lseek04, select03,
+ unlink06.
+
2005-01-09 Christopher Faylor <cgf@timesys.com>
* 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 0af25ab..e063ee6 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 2af1912..8046f0b 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;