[CRIU] [PATCH 1/3] tests/arm/compat: don't build maps03 test

Dmitry Safonov dsafonov at virtuozzo.com
Tue Aug 30 06:18:32 PDT 2016


From: Dmitry Safonov <0x7f454c46 at gmail.com>

Fixes:
maps03.c: In function 'main':
maps03.c:15:32: 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,
                                ^~
maps03.c:22:9: error: result of '4l << 30' requires 34 bits to represent, but 'long int' only has 32 bits [-Werror=shift-overflow=]
  mem[4L << 30] = 1;
         ^~
maps03.c:23:9: error: result of '8l << 30' requires 35 bits to represent, but 'long int' only has 32 bits [-Werror=shift-overflow=]
  mem[8L << 30] = 2;
         ^~
maps03.c:30:13: error: result of '4l << 30' requires 34 bits to represent, but 'long int' only has 32 bits [-Werror=shift-overflow=]
  if (mem[4L << 30] != 1 || mem[8L << 30] != 2) {
             ^~
maps03.c:30:35: error: result of '8l << 30' requires 35 bits to represent, but 'long int' only has 32 bits [-Werror=shift-overflow=]
  if (mem[4L << 30] != 1 || mem[8L << 30] != 2) {
                                   ^~

Proceses virtual address space is smaller than 4Gb - omit this test for
those archs.

Signed-off-by: Dmitry Safonov <0x7f454c46 at gmail.com>
---
 test/zdtm/static/Makefile | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/test/zdtm/static/Makefile b/test/zdtm/static/Makefile
index e5248ca18a74..c5a1584e7eb1 100644
--- a/test/zdtm/static/Makefile
+++ b/test/zdtm/static/Makefile
@@ -7,7 +7,7 @@ override CPPFLAGS += -I$(LIBDIR)
 CFLAGS	= -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
 CFLAGS	+= $(USERCFLAGS)
 
-TST_NOFILE	=				\
+TST_NOFILE	:=				\
 		busyloop00			\
 		sleeping00			\
 		pid00				\
@@ -81,7 +81,6 @@ TST_NOFILE	=				\
 		sem				\
 		maps01				\
 		maps02				\
-		maps03				\
 		maps04				\
 		maps05				\
 		mlock_setuid			\
@@ -154,6 +153,12 @@ TST_NOFILE	=				\
 		helper_zombie_child		\
 #		jobctl00			\
 
+ifneq ($(SRCARCH),arm)
+ifneq ($(COMPAT_TEST),y)
+        TST_NOFILE += maps03
+endif
+endif
+
 TST_FILE	=				\
 		maps06				\
 		write_read00			\
-- 
2.9.0



More information about the CRIU mailing list