0002-test-skip-test-for-non-mmu-case.patch 988 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. From fd8d6c5d6bebff0b3a106364e26e75399880b34b Mon Sep 17 00:00:00 2001
  2. From: Waldemar Brodkorb <wbx@openadk.org>
  3. Date: Thu, 28 Aug 2014 22:49:10 +0200
  4. Subject: [PATCH 2/2] test: skip test for non-mmu case
  5. Non-mmu targets have no fork(). In the case of vfork(),
  6. we can not test communication between parent and child
  7. in this way.
  8. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
  9. ---
  10. test/librt/shmtest.c | 12 ++++++++++++
  11. 1 file changed, 12 insertions(+)
  12. diff --git a/test/librt/shmtest.c b/test/librt/shmtest.c
  13. index a14302d..2be09cc 100644
  14. --- a/test/librt/shmtest.c
  15. +++ b/test/librt/shmtest.c
  16. @@ -14,6 +14,8 @@
  17. #include <sys/stat.h>
  18. #include <sys/wait.h>
  19. +#ifdef __ARCH_USE_MMU__
  20. +
  21. #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
  22. char shared_name[] = "/sharetest";
  23. @@ -102,3 +104,13 @@ int main(void) {
  24. }
  25. return 0;
  26. }
  27. +
  28. +#else
  29. +
  30. +int main(void)
  31. +{
  32. + printf("Skipping test on non-mmu host!\n");
  33. + return EXIT_SUCCESS;
  34. +}
  35. +
  36. +#endif
  37. --
  38. 1.8.5.2 (Apple Git-48)