From 416741d54a7dbebbd7a8dce75254f27d3a5ccd11 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 4 Apr 2017 13:10:09 +0200 Subject: Skip deleted test if fork(2) is unavailable Change-Id: Ib52e92c34c5bd387b1e6310bb42d9102a639f262 Reviewed-by: Christian Kandeler --- tests/ChangeLog | 4 ++++ tests/deleted.c | 14 ++++++++++++++ 2 files changed, 18 insertions(+) (limited to 'tests') diff --git a/tests/ChangeLog b/tests/ChangeLog index c2619d04..611b88a7 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +2017-05-04 Ulf Hermann + + * deleted.c: If fork() is unavailable, skip the test. + 2017-05-04 Ulf Hermann * allfcts.c: Use fprintf and exit rather than err and errx. diff --git a/tests/deleted.c b/tests/deleted.c index 6be35bc2..f11cb1b6 100644 --- a/tests/deleted.c +++ b/tests/deleted.c @@ -29,6 +29,18 @@ extern void libfunc (void); +#if !HAVE_DECL_FORK + +int +main (int argc __attribute__ ((unused)), char **argv) +{ + fprintf (stderr, "%s: fork() not supported for this architecture\n", + argv[0]); + return 77; +} + +#else + int main (int argc __attribute__ ((unused)), char **argv __attribute__ ((unused))) { @@ -56,3 +68,5 @@ main (int argc __attribute__ ((unused)), char **argv __attribute__ ((unused))) printf ("%d\n", pid); return EXIT_SUCCESS; } + +#endif -- cgit v1.2.3