Skip to contentSkip to conversation

hugeshmctl02: set 2 huge pages as an enforced requirement

PATCH In review Li Wang via ltp 2 participants 3 messages Oct 30, 2025 – Oct 31, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hugeshmctl02: set 2 huge pages as an enforced requirement

Set hugeshmctl02 to require exactly 2 HugeTLB pages and bail out cleanly if unavailable. To prevent shmget EINVAL failures seen when the environment cannot provide enough hugepages.

Stabilizes the test across constrained systems while keeping functional intent intact.

=== error log ===
cmdline="hugeshmctl02 -s 1 -i 5;" tst_hugepage.c:84: TINFO: 1 hugepage(s) reserved tst_test.c:1709: TINFO: LTP version: 20240129 tst_test.c:1595: TINFO: Timeout per run is 0h 00m 30s hugeshmctl02.c:105: TINFO: Testing variant: libc shmctl() hugeshmctl02.c:119: TBROK: shmget #1: EINVAL (22)

Cc Luiz Capitulino <[email protected]>
---
 testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c +1 -1
index d3f711129..82126f52c 100644
@@ -143,5 +143,5 @@ static struct tst_test test = {
 	},
 	.setup = setup,
 	.cleanup = cleanup,
-	.hugepages = {128, TST_REQUEST},
+	.hugepages = {2, TST_NEEDS},
 };
Signature · 5 lines
2.51.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
Reviewed-by on v1 1/1
#1 lore raw

Hi Li,

Quoted 3 lines

Set hugeshmctl02 to require exactly 2 HugeTLB pages and bail out cleanly if unavailable. To prevent shmget EINVAL failures seen when the environment cannot provide enough hugepages.

I see "TCONF: No enough hugepages for testing." on ppc64le on Tumbleweed, hopefully it will have 2 :).

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#2 lore raw
Quoted 11 lines · Petr Vorel

Hi Li,

Quoted 3 lines

Set hugeshmctl02 to require exactly 2 HugeTLB pages and bail out cleanly if unavailable. To prevent shmget EINVAL failures seen when the environment cannot provide enough hugepages.

I see "TCONF: No enough hugepages for testing." on ppc64le on Tumbleweed, hopefully it will have 2 :).

Patch merged, thanks!

Signature · 5 lines
Regards,
Li Wang

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