Linux Test Project
 help / color / mirror / Atom feed
* [LTP] [PATCH v1 0/2] Refactor test state handling and clarify naming in lib
@ 2025-05-15  1:58 Li Wang via ltp
  2025-05-15  1:58 ` [LTP] [PATCH v1 1/2] lib: rename tid to tcid Li Wang via ltp
  2025-05-15  1:58 ` [LTP] [PATCH v1 2/2] lib: moves test infrastructure states into a shared context structure Li Wang via ltp
  0 siblings, 2 replies; 11+ messages in thread
From: Li Wang via ltp @ 2025-05-15  1:58 UTC (permalink / raw)
  To: ltp

RFC -> V1
  * rebase code on the latest branch
  * replace pid_t by int32_t
  * memset zero in allocating ipc_region
  * adding back SAFE_MMAP in setup_ipc
  * set context->lib_pid in setup_ipc

CI job: https://github.com/wangli5665/ltp/actions/runs/15034122818

Also, manually tested by myself on RHEL-9.6 and RHEL-10.0 (all arches).

This patch series introduces two improvements to the test infrastructure:

1: Introduce shared struct context for runtime test state

This refactor consolidates scattered global runtime state variables
into a single struct context, which is stored in a new struct ipc_region.
This change is aimed at improving test robustness and maintainability
by enabling structured state sharing between parent and child processes,
particularly for tests requiring checkpointing or fork/exec workflows.

2: Rename tid to tcid

This is a simple but meaningful rename to avoid confusion between thread
ID (tid) and test case ID (tcid). This improves code clarity and avoids
misinterpretation during code review.

Li Wang (2):
  lib: rename tid to tcid
  lib: moves test infrastructure states into a shared context structure

 lib/tst_test.c | 234 ++++++++++++++++++++++++++++---------------------
 1 file changed, 132 insertions(+), 102 deletions(-)

-- 
2.49.0


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

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

end of thread, other threads:[~2025-06-05 12:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-15  1:58 [LTP] [PATCH v1 0/2] Refactor test state handling and clarify naming in lib Li Wang via ltp
2025-05-15  1:58 ` [LTP] [PATCH v1 1/2] lib: rename tid to tcid Li Wang via ltp
2025-06-04  9:45   ` Cyril Hrubis
2025-06-05  2:28     ` Li Wang via ltp
2025-05-15  1:58 ` [LTP] [PATCH v1 2/2] lib: moves test infrastructure states into a shared context structure Li Wang via ltp
2025-05-15 13:16   ` Petr Vorel
2025-06-04  7:04     ` Li Wang via ltp
2025-06-04 11:55   ` Cyril Hrubis
2025-06-05  3:32     ` Li Wang via ltp
2025-06-05 12:40       ` Cyril Hrubis
2025-06-05  6:56     ` Petr Vorel

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