diff mbox

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

Message ID 1409474640-4870-2-git-send-email-wbx@openadk.org
State Rejected
Commit ff48662bbadd3d49fabe6fdfeb8e8181d4c80b06
Headers show

Commit Message

Waldemar Brodkorb Aug. 31, 2014, 8:43 a.m. UTC
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(+)

Comments

Bernhard Reutner-Fischer Sept. 4, 2014, 11:26 a.m. UTC | #1
On 31 August 2014 10:43, Waldemar Brodkorb <wbx@openadk.org> wrote:
> Non-mmu targets have no fork(). In the case of vfork(),
> we can not test communication between parent and child
> in this way.

Let's just not compile it then.
ff48662bbadd3d49fabe6fdfeb8e8181d4c80b06
thanks,
diff mbox

Patch

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