test_dir = "/tmp";
}
- /* If we are not expected to fork run the function immediately. */
- if (direct)
- return TEST_FUNCTION;
+ /* Make sure we see all message, even those on stdout. */
+ setvbuf (stdout, NULL, _IONBF, 0);
/* make sure temporary files are deleted. */
atexit (delete_temp_files);
+ /* Call the initializing function, if one is available. */
+#ifdef PREPARE
+ PREPARE (argc, argv);
+#endif
+
+ /* If we are not expected to fork run the function immediately. */
+ if (direct)
+ return TEST_FUNCTION;
+
/* Set up the test environment:
- prevent core dumps
- set up the timer
fprintf (stderr, "Incorrect signal from child: got `%s', need `%s'\n",
strsignal (WTERMSIG (status)), strsignal (EXPECTED_SIGNAL));
else
- fprintf (stderr, "Incorrect signal from child: got `%s'\n",
+ fprintf (stderr, "Didn't expect signal from child: got `%s'\n",
strsignal (WTERMSIG (status)));
exit (1);
}