[PATCH] mm, hugepages: fix size in hugetlb mremap() test

From: Yosry Ahmed
Date: Tue Nov 23 2021 - 15:46:50 EST


The hugetlb vma mremap() test mentions in the header comment that it
uses 10MB worth of huge pages, when it actually uses 1GB. This causes
the test to fail on devices with smaller memories.

Signed-off-by: Yosry Ahmed <yosryahmed@xxxxxxxxxx>
---
tools/testing/selftests/vm/hugepage-mremap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/vm/hugepage-mremap.c b/tools/testing/selftests/vm/hugepage-mremap.c
index 257df94697a5..551e68f97926 100644
--- a/tools/testing/selftests/vm/hugepage-mremap.c
+++ b/tools/testing/selftests/vm/hugepage-mremap.c
@@ -18,7 +18,7 @@
#include <linux/userfaultfd.h>
#include <sys/ioctl.h>

-#define LENGTH (1UL * 1024 * 1024 * 1024)
+#define LENGTH (10UL * 1024 * 1024)

#define PROTECTION (PROT_READ | PROT_WRITE | PROT_EXEC)
#define FLAGS (MAP_SHARED | MAP_ANONYMOUS)
--
2.34.0.rc2.393.gf8c9666880-goog