[LTP] [PATCH 0/3] checkpoint: Refactor and unify shell/C reinit support
Li Wang
liwang@redhat.com
Thu Jun 26 17:09:34 CEST 2025
Hi Cyril,
On Thu, Jun 26, 2025 at 9:26 PM Cyril Hrubis <chrubis@suse.cz> wrote:
> Hi!
> I think that the root of the problem is that the shell function
> _tst_init_checkpoints() does not create the IPC region with the magic.
>
> What about this patch:
>
> diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh
> index c32bd8b19..a310d3922 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
>
No, I'm afraid this won't work as expected.
The PEC failure wasn't caused by the shell checkpoint missing the "LTPM"
magic. Instead, the root cause was that the reinitialization logic
(tst_reinit())
expected a different IPC format.
The current fix was to detect the checkpoint type (shell vs. C) and use
tst_checkpoint_reinit() accordingly during re-attachment.
> ROD_SILENT chmod 600 "$LTP_IPC_PATH"
> export LTP_IPC_PATH
> }
>
> --
> Cyril Hrubis
> chrubis@suse.cz
>
>
--
Regards,
Li Wang
More information about the ltp
mailing list