Commit cf4496be authored by Laurent Dufour's avatar Laurent Dufour Committed by Pavel Emelyanov

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: 's avatarLaurent Dufour <ldufour@linux.vnet.ibm.com>
Reviewed-by: 's avatarChristopher Covington <cov@codeaurora.org>
Acked-by: 's avatarAndrew Vagin <avagin@odin.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 209693d4
......@@ -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";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment