[CRIU] [PATCH] zdtm: define PAGE_SIZE in zdtmtst.h

Andrey Vagin avagin at openvz.org
Thu Jul 11 06:22:09 EDT 2013


From: Andrew Vagin <avagin at openvz.org>

This patches fixes compilation on Raspberry Pi and
removes a few defines from tests.

msg.c: In function ‘test_msg’:
msg.c:41:11: error: ‘PAGE_SIZE’ undeclared (first use in this function)

CC: Alexander Kartashov <alekskartashov at parallels.com>
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 test/zdtm/lib/zdtmtst.h           | 4 ++++
 test/zdtm/live/static/maps01.c    | 1 -
 test/zdtm/live/static/maps04.c    | 1 -
 test/zdtm/live/static/mem-touch.c | 1 -
 4 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/test/zdtm/lib/zdtmtst.h b/test/zdtm/lib/zdtmtst.h
index 323b70e..b538eab 100644
--- a/test/zdtm/lib/zdtmtst.h
+++ b/test/zdtm/lib/zdtmtst.h
@@ -3,6 +3,10 @@
 
 #include <sys/types.h>
 
+#ifndef PAGE_SIZE
+# define PAGE_SIZE 4096
+#endif
+
 /* set up test */
 extern void test_ext_init(int argc, char **argv);
 extern void test_init(int argc, char **argv);
diff --git a/test/zdtm/live/static/maps01.c b/test/zdtm/live/static/maps01.c
index 30c8bfd..22340a7 100644
--- a/test/zdtm/live/static/maps01.c
+++ b/test/zdtm/live/static/maps01.c
@@ -11,7 +11,6 @@
 #include <linux/limits.h>
 #include "zdtmtst.h"
 
-#define PAGE_SIZE 4096
 #define MEM_SIZE (1L << 30)
 #define MEM_OFFSET (1L << 29)
 #define MEM_OFFSET2 (MEM_SIZE - PAGE_SIZE)
diff --git a/test/zdtm/live/static/maps04.c b/test/zdtm/live/static/maps04.c
index daf841e..aba85c0 100644
--- a/test/zdtm/live/static/maps04.c
+++ b/test/zdtm/live/static/maps04.c
@@ -11,7 +11,6 @@
 #include <linux/limits.h>
 #include "zdtmtst.h"
 
-#define PAGE_SIZE 4096
 #define MEM_SIZE (1L << 29)
 
 const char *test_doc	= "Test big mappings";
diff --git a/test/zdtm/live/static/mem-touch.c b/test/zdtm/live/static/mem-touch.c
index c1e3ab2..ac17f6f 100644
--- a/test/zdtm/live/static/mem-touch.c
+++ b/test/zdtm/live/static/mem-touch.c
@@ -11,7 +11,6 @@ const char *test_doc	= "Check changing memory";
 const char *test_author	= "Pavel Emelyanov <xemul at parallels.com>";
 
 #define MEM_PAGES	16
-#define PAGE_SIZE	4096
 
 int main(int argc, char **argv)
 {
-- 
1.8.3.1



More information about the CRIU mailing list