[PATCH 2/3] test: skip test for non-mmu case

Waldemar Brodkorb wbx at openadk.org
Sun Aug 31 08:43:59 UTC 2014


Non-mmu targets have no fork(). In the case of vfork(),
we can not test communication between parent and child
in this way.

Signed-off-by: Waldemar Brodkorb <wbx at openadk.org>
---
 test/librt/shmtest.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/test/librt/shmtest.c b/test/librt/shmtest.c
index a14302d..2be09cc 100644
--- a/test/librt/shmtest.c
+++ b/test/librt/shmtest.c
@@ -14,6 +14,8 @@
 #include <sys/stat.h>
 #include <sys/wait.h>
 
+#ifdef __ARCH_USE_MMU__
+
 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
 
 char shared_name[] = "/sharetest";
@@ -102,3 +104,13 @@ int main(void) {
 	}
 	return 0;
 }
+
+#else
+
+int main(void)
+{
+	printf("Skipping test on non-mmu host!\n");
+	return EXIT_SUCCESS;
+}
+
+#endif
-- 
1.8.5.2 (Apple Git-48)



More information about the uClibc mailing list