Module: xenomai-forge
Branch: next
Commit: 3ccf6a7f4812b8de76ab05628e398b3c74a81afc
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=3ccf6a7f4812b8de76ab05628e398b3c74a81afc

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sat Aug 30 10:03:48 2014 +0200

testsuite/smokey/fork-exec: detect lack of fork() support

---

 testsuite/smokey/fork-exec/fork-exec.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/testsuite/smokey/fork-exec/fork-exec.c 
b/testsuite/smokey/fork-exec/fork-exec.c
index 49e8694..5e620da 100644
--- a/testsuite/smokey/fork-exec/fork-exec.c
+++ b/testsuite/smokey/fork-exec/fork-exec.c
@@ -11,6 +11,7 @@
 #include <errno.h>
 #include <error.h>
 #include <xeno_config.h>
+#include <boilerplate/libc.h>
 #include <smokey/smokey.h>
 
 smokey_test_plugin(fork_exec,
@@ -34,6 +35,10 @@ static int run_fork_exec(struct smokey_test *t, int argc, 
char *const argv[])
 
        switch (fork()) {
        case -1:
+               if (errno == ENOSYS) {
+                       smokey_note("fork() not available -- discarding test");
+                       return 0;
+               }
                error(1, errno, "fork");
        case 0:
                /*


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to