Skip to content

checkpoint: Refactor and unify shell/C reinit support

Li Wang via ltp ltp 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3shell/lib: refactor checkpoint with shared path for exec() supportinclude/tst_checkpoint_fn.h lib/tst_checkpoint.c testcases/lib/tst_checkpoint.c +1 more+83 -361 reply
2/3kernel/pec: switch to new checkpoint wait/wake interfacetestcases/kernel/connectors/pec/event_generator.c testcases/kernel/connectors/pec/pec_listener.c+4 -20 replies
3/3tst_checkpoint: Detect and reinit shell or C style checkpoint filetestcases/lib/tst_checkpoint.c+36 -10 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAvinesh KumarCyril Hrubis
SeriesR-b
1/3T-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [LTP] [PATCH 0/3] checkpoint: Refactor and unify shell/C reinit support

This patch series refactors the internal checkpointing mechanism to better support mixed shell and C test cases, especially when using exec() based processes that synchronize via shared memory.

The changes address long-standing issues with inconsistent reinitialization of checkpoint files across exec() boundaries, and unify the logic for both C and Shell initialized checkpoint files.

With this patch series, the following now works correctly:

Shell-C mixed:
C: init checkpoint + fork()
Shell: tst_run_script() + tst_checkpint wait 1000 0
C: TST_CHECKPOINT_WAKE(0)

Shell test:
TST_NEEDS_CHECKPOINT=1
Process1: TST_CHECKPOINT_WAIT(0)
process2: TST_CHECKPOINT_WAKE(0)

C test:
.needs_checkpoint=1
fork() + exec("child test") + TST_CHECKPOINT_WAIT(0) TST_CHECKPOINT_WAKE(0)

Li Wang (3):
shell/lib: refactor checkpoint with shared path for exec() support kernel/pec: switch to new checkpoint wait/wake interface
tst_checkpoint: Detect and reinit shell or C style checkpoint file

 include/tst_checkpoint_fn.h                   | 20 +++++-
 lib/tst_checkpoint.c                          | 70 +++++++++++++------
 .../kernel/connectors/pec/event_generator.c   |  3 +-
 .../kernel/connectors/pec/pec_listener.c      |  3 +-
 testcases/lib/tst_checkpoint.c                | 62 +++++++++++++---
 testcases/lib/tst_test.sh                     |  2 +
 6 files changed, 122 insertions(+), 38 deletions(-)
Signature · 5 lines
2.49.0


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