All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] hugeshmat04: don't attach at specific address
@ 2021-09-21 16:45 Jan Stancek
  2021-09-22  6:34 ` Li Wang
  2021-09-23  8:50 ` [LTP] [PATCH v2] hugeshmat04: try to find unmapped range for test Jan Stancek
  0 siblings, 2 replies; 8+ messages in thread
From: Jan Stancek @ 2021-09-21 16:45 UTC (permalink / raw)
  To: ltp, liwan

The test intermittently fails on ppc64le, when heap
happens to overlap with segment that the test is trying
to attach at 1GB boundary.

Let the kernel find suitable address.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
 testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat04.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat04.c b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat04.c
index e9bb9fbf7b4b..75f61de066d7 100644
--- a/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat04.c
+++ b/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat04.c
@@ -22,7 +22,6 @@
 #include "hugetlb.h"
 
 #define SIZE	(1024 * 1024 * 1024)
-#define BOUNDARY (1024 * 1024 * 1024)
 
 static long huge_free;
 static long huge_free2;
@@ -54,7 +53,7 @@ static void shared_hugepage(void)
 	if (shmid < 0)
 		tst_brk(TBROK | TERRNO, "shmget");
 
-	buf = shmat(shmid, (void *)BOUNDARY, SHM_RND | 0777);
+	buf = shmat(shmid, NULL, 0777);
 	if (buf == (void *)-1) {
 		shmctl(shmid, IPC_RMID, NULL);
 		tst_brk(TBROK | TERRNO, "shmat");
-- 
2.27.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-09-24  3:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-21 16:45 [LTP] [PATCH] hugeshmat04: don't attach at specific address Jan Stancek
2021-09-22  6:34 ` Li Wang
2021-09-22 14:29   ` Cyril Hrubis
2021-09-23  6:49     ` Li Wang
2021-09-23  8:50 ` [LTP] [PATCH v2] hugeshmat04: try to find unmapped range for test Jan Stancek
2021-09-23  9:04   ` Li Wang
2021-09-23  9:07   ` Cyril Hrubis
2021-09-24  3:15     ` Li Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.