* test-skeleton.c (main): If EXPECTED_STATUS is defined check that
	returned status from child matches.
This commit is contained in:
Ulrich Drepper 2003-06-07 23:24:07 +00:00
parent e1d8e1b7c5
commit ede0f73aea
2 changed files with 14 additions and 0 deletions

View File

@ -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>

View File

@ -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
}