about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-06-07 23:24:07 +0000
committerUlrich Drepper <drepper@redhat.com>2003-06-07 23:24:07 +0000
commitede0f73aeabe62589f6ca19a6987f48aa0d06184 (patch)
treeac07c3302ed95c712447d2387fcf3321f2e22e01
parente1d8e1b7c54c5f25d77426f6d9fada8858431ade (diff)
downloadglibc-ede0f73aeabe62589f6ca19a6987f48aa0d06184.tar.gz
glibc-ede0f73aeabe62589f6ca19a6987f48aa0d06184.tar.xz
glibc-ede0f73aeabe62589f6ca19a6987f48aa0d06184.zip
Update.
	* test-skeleton.c (main): If EXPECTED_STATUS is defined check that
	returned status from child matches.
-rw-r--r--ChangeLog3
-rw-r--r--test-skeleton.c11
2 files changed, 14 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index ac725242e8..98a1dcd19b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
 
+	* test-skeleton.c (main): If EXPECTED_STATUS is defined check that
+	returned status from child matches.
+
 	* Makeconfig (gnulib): Add -lgcc_eh once again.
 
 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
diff --git a/test-skeleton.c b/test-skeleton.c
index e03e74fda6..b9764285f0 100644
--- a/test-skeleton.c
+++ b/test-skeleton.c
@@ -333,5 +333,16 @@ main (int argc, char *argv[])
     }
 
   /* Simply exit with the return value of the test.  */
+#ifndef EXPECTED_STATUS
   return WEXITSTATUS (status);
+#else
+  if (WEXITSTATUS (status) != EXPECTED_STATUS)
+    {
+      fprintf (stderr, "Expected status %d, got %d\n",
+	       EXPECTED_STATUS, WEXITSTATUS (status));
+      exit (1);
+    }
+
+  return 0;
+#endif
 }