diff options
| author | Ulf Hermann <[email protected]> | 2017-04-04 13:10:09 +0200 |
|---|---|---|
| committer | Ulf Hermann <[email protected]> | 2017-05-08 09:35:50 +0000 |
| commit | 416741d54a7dbebbd7a8dce75254f27d3a5ccd11 (patch) | |
| tree | 2125160497661cd011b2c35e09074546a12ea332 /tests | |
| parent | 264c5144a282af15875435a93c6574efc006b5ac (diff) | |
Skip deleted test if fork(2) is unavailable
Change-Id: Ib52e92c34c5bd387b1e6310bb42d9102a639f262
Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ChangeLog | 4 | ||||
| -rw-r--r-- | tests/deleted.c | 14 |
2 files changed, 18 insertions, 0 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index c2619d04..611b88a7 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,5 +1,9 @@ 2017-05-04 Ulf Hermann <[email protected]> + * deleted.c: If fork() is unavailable, skip the test. + +2017-05-04 Ulf Hermann <[email protected]> + * allfcts.c: Use fprintf and exit rather than err and errx. * buildid.c: Likewise. * debugaltlink.c: Likewise. 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 |
