[LTP] [PATCH 2/2] tst_test.sh: Fix IPC init for checkpoints
Cyril Hrubis
chrubis@suse.cz
Fri Jun 27 12:29:57 CEST 2025
The introduction of magic at the start of the LTP IPC region did break
the checkpoints for the tst_test.sh shell library. The reason is that
the library creates the IPC backing file with dd and the magic wasn't
present there.
This introduced failures in the pec testcases:
cn_pec 1 TINFO: Test process events connector
cn_pec 1 TINFO: Testing fork event (nevents=10)
tst_test.c:203: TBROK: Invalid shared memory region (bad magic)
cn_pec 1 TBROK: tst_checkpoint wait 10000 0 failed
This patch fixes the tst_test.sh library so that the IPC region is
created with a correct magic.
Follow-up: bf9589d5bd ("lib: moves test infrastructure states into a shared context structure")
Reported-by: Avinesh Kumar <akumar@suse.de>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
testcases/lib/tst_test.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh
index c32bd8b19..4be10a4f9 100644
--- a/testcases/lib/tst_test.sh
+++ b/testcases/lib/tst_test.sh
@@ -627,6 +627,7 @@ _tst_init_checkpoints()
tst_brk TBROK "tst_getconf PAGESIZE failed"
fi
ROD_SILENT dd if=/dev/zero of="$LTP_IPC_PATH" bs="$pagesize" count=1
+ ROD_SILENT "printf LTPM | dd of="$LTP_IPC_PATH" bs=1 seek=0 conv=notrunc"
ROD_SILENT chmod 600 "$LTP_IPC_PATH"
export LTP_IPC_PATH
}
--
2.49.0
More information about the ltp
mailing list