summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog4
-rw-r--r--tests/deleted.c14
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