[LTP] [RFC PATCH 0/5] shell loader rewrite to support TST_SETUP

Petr Vorel pvorel@suse.cz
Fri Feb 28 18:24:33 CET 2025


Hi,

attempt to implement Cyril's suggestions:

https://lore.kernel.org/ltp/Z69OLsDLMzNw6RGt@yuki.lan/
https://lore.kernel.org/ltp/Z69QpMlrGVDwpz8w@yuki.lan/

Kind regards,
Petr

Cyril Hrubis (1):
  shell lib: Add support for test cleanup

Petr Vorel (4):
  lib: Allow test to have positional args
  shell: Move shell code into functions
  shell lib: Add basic support for test cleanup
  shell: Add shell_loader_setup_cleanup.sh test

 doc/developers/writing_tests.rst              |  2 +-
 include/tst_test.h                            |  5 +-
 lib/tst_test.c                                |  9 +++-
 testcases/kernel/mem/vma/vma05.sh             | 47 ++++++++++---------
 testcases/lib/run_tests.sh                    |  5 +-
 testcases/lib/tests/shell_loader.sh           | 19 ++++----
 .../lib/tests/shell_loader_all_filesystems.sh | 26 +++++-----
 .../lib/tests/shell_loader_brk_cleanup.sh     | 23 +++++++++
 testcases/lib/tests/shell_loader_c_child.sh   | 15 +++---
 testcases/lib/tests/shell_loader_cleanup.sh   | 23 +++++++++
 .../lib/tests/shell_loader_filesystems.sh     | 23 +++++----
 .../lib/tests/shell_loader_invalid_block.sh   |  7 ++-
 .../tests/shell_loader_invalid_metadata.sh    |  7 ++-
 testcases/lib/tests/shell_loader_kconfigs.sh  |  7 ++-
 .../lib/tests/shell_loader_no_metadata.sh     |  7 ++-
 .../lib/tests/shell_loader_setup_cleanup.sh   | 29 ++++++++++++
 .../lib/tests/shell_loader_supported_archs.sh |  7 ++-
 testcases/lib/tests/shell_loader_tags.sh      |  7 ++-
 testcases/lib/tests/shell_loader_tcnt.sh      |  7 ++-
 .../lib/tests/shell_loader_wrong_metadata.sh  |  7 ++-
 testcases/lib/tst_exec.sh                     | 19 ++++++++
 testcases/lib/tst_loader.sh                   |  5 +-
 testcases/lib/tst_run_shell.c                 | 16 +++++--
 23 files changed, 235 insertions(+), 87 deletions(-)
 create mode 100755 testcases/lib/tests/shell_loader_brk_cleanup.sh
 create mode 100755 testcases/lib/tests/shell_loader_cleanup.sh
 create mode 100755 testcases/lib/tests/shell_loader_setup_cleanup.sh
 create mode 100755 testcases/lib/tst_exec.sh

-- 
2.47.2



More information about the ltp mailing list