summaryrefslogtreecommitdiff
path: root/toolchain/uclibc/patches/0.9.34-git/0002-test-skip-test-for-non-mmu-case.patch
blob: 344aab57bf12c933d8cae98f46400f89bf1053b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From fd8d6c5d6bebff0b3a106364e26e75399880b34b Mon Sep 17 00:00:00 2001
From: Waldemar Brodkorb <wbx@openadk.org>
Date: Thu, 28 Aug 2014 22:49:10 +0200
Subject: [PATCH 2/2] test: skip test for non-mmu case

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@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)