summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/malloc/tst-mallocfork.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/test/malloc/tst-mallocfork.c b/test/malloc/tst-mallocfork.c
index edd9c39..e9e5133 100644
--- a/test/malloc/tst-mallocfork.c
+++ b/test/malloc/tst-mallocfork.c
@@ -9,10 +9,12 @@
#include <sys/wait.h>
#include "../test-skeleton.h"
+#ifdef __ARCH_USE_MMU__
+
static void
sig_handler (int signum)
{
- pid_t child = vfork ();
+ pid_t child = fork ();
if (child == 0)
exit (0);
TEMP_FAILURE_RETRY (waitpid (child, NULL, 0));
@@ -35,7 +37,7 @@ do_test (void)
}
/* Create a child that sends the signal to be caught. */
- pid_t child = vfork ();
+ pid_t child = fork ();
if (child == 0)
{
if (kill (parent, SIGALRM) == -1)
@@ -48,5 +50,16 @@ do_test (void)
return 0;
}
+#else
+
+static int
+do_test (void)
+{
+ printf("Skipping test on non-mmu host!\n");
+ return EXIT_SUCCESS;
+}
+
+#endif
+
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"