Linux Test Project
 help / color / mirror / Atom feed
* [LTP] [PATCH 0/3] checkpoint: Refactor and unify shell/C reinit support
@ 2025-06-16 10:26 Li Wang via ltp
  2025-06-16 10:26 ` [LTP] [PATCH 1/3] shell/lib: refactor checkpoint with shared path for exec() support Li Wang via ltp
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Li Wang via ltp @ 2025-06-16 10:26 UTC (permalink / raw)
  To: ltp

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(-)

-- 
2.49.0


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

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

end of thread, other threads:[~2025-06-27 10:49 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-16 10:26 [LTP] [PATCH 0/3] checkpoint: Refactor and unify shell/C reinit support Li Wang via ltp
2025-06-16 10:26 ` [LTP] [PATCH 1/3] shell/lib: refactor checkpoint with shared path for exec() support Li Wang via ltp
2025-06-17 12:18   ` Avinesh Kumar
2025-06-16 10:26 ` [LTP] [PATCH 2/3] kernel/pec: switch to new checkpoint wait/wake interface Li Wang via ltp
2025-06-16 10:26 ` [LTP] [PATCH 3/3] tst_checkpoint: Detect and reinit shell or C style checkpoint file Li Wang via ltp
2025-06-26 13:26 ` [LTP] [PATCH 0/3] checkpoint: Refactor and unify shell/C reinit support Cyril Hrubis
2025-06-26 15:09   ` Li Wang via ltp
2025-06-27  7:49     ` Cyril Hrubis
2025-06-27  9:25       ` Li Wang via ltp
2025-06-27 10:20         ` Cyril Hrubis
2025-06-27 10:28           ` Li Wang via ltp
2025-06-27 10:43             ` Cyril Hrubis
2025-06-27 10:49               ` Li Wang via ltp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox