2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 22:05:36 +00:00

test/zdtm: Do not use hard coded PAGE_SIZE value

Since the page size may be different from an architecture/a system to
another it should not be hard coded to 4096.

As a consequence, several tests are failing on ppc64 due to a wrong page
size value.

This fix belongs to sysconf to get the current page size.

Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Reviewed-by: Christopher Covington <cov@codeaurora.org>
Acked-by: Andrew Vagin <avagin@odin.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Laurent Dufour
2015-07-01 17:32:37 +02:00
committed by Pavel Emelyanov
parent 209693d49b
commit cf4496beba
2 changed files with 2 additions and 2 deletions

View File

@@ -2,9 +2,10 @@
#define _VIMITESU_H_
#include <sys/types.h>
#include <unistd.h>
#ifndef PAGE_SIZE
# define PAGE_SIZE 4096
# define PAGE_SIZE (unsigned int)(sysconf(_SC_PAGESIZE))
#endif
#ifndef PR_SET_CHILD_SUBREAPER

View File

@@ -14,7 +14,6 @@
#define MAP_SIZE (1UL << 20)
#define MEM_SIZE (1UL << 29)
#define PAGE_SIZE 4096
const char *test_doc = "create random mappings and touch memory";