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:
committed by
Pavel Emelyanov
parent
209693d49b
commit
cf4496beba
@@ -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
|
||||
|
@@ -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";
|
||||
|
||||
|
Reference in New Issue
Block a user