[CRIU] [PATCH 8/9] zdtm/static/maps03: don't run for 32-bit
Kir Kolyshkin
kir at openvz.org
Wed Mar 29 15:21:19 PDT 2017
When this test is compiled on ARMv7, we get this:
> maps03.c: In function 'main':
> maps03.c:15:31: error: result of '10l << 30' requires 35 bits
> to represent, but 'long int' only has 32 bits [-Werror=shift-overflow=]
> mem = (void *)mmap(NULL, (10L << 30), PROT_READ | PROT_WRITE,
> ^~
Surely, the nature of the test looks like it needs 64-bit addressing.
Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
test/zdtm/static/maps03.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/test/zdtm/static/maps03.c b/test/zdtm/static/maps03.c
index c4aba19..f2bf795 100644
--- a/test/zdtm/static/maps03.c
+++ b/test/zdtm/static/maps03.c
@@ -1,8 +1,16 @@
#include <stdlib.h>
#include <unistd.h>
#include <sys/mman.h>
+#include <limits.h>
#include "zdtmtst.h"
+#if (LONG_MAX == 2147483647L) /* 32 bit */
+
+#define TEST_SKIP_REASON "64-bit arch required"
+#include "skip-me.c"
+
+#else
+
const char *test_doc = "Test for huge VMA area";
const char *test_author = "Cyrill Gorcunov <gorcunov at openvz.org>";
@@ -36,3 +44,4 @@ int main(int argc, char **argv)
return 0;
}
+#endif
--
2.9.3
More information about the CRIU
mailing list