[LTP] [RFC PATCH 0/2] Shell test library v3

Cyril Hrubis chrubis@suse.cz
Tue Jul 16 17:36:02 CEST 2024


We have discussed shell and C integration during our LTP montly meeting.
I started to dig around after to see how complicated would that task be
and it turns out that it's fairly easy.

This patchset implements a proof of a concept for two things:

- seamless integration of shell with C code
- second patch builds on top of that and implements a shell loader
  that can run shell tests from within the C test library

Cyril Hrubis (2):
  Add support for mixing C and shell code
  testcaes/lib: Add shell loader

 include/tst_test.h                            | 38 +++++++++
 lib/tst_test.c                                | 51 ++++++++++++
 testcases/lib/.gitignore                      |  2 +
 testcases/lib/Makefile                        |  5 +-
 testcases/lib/run_tests.sh                    | 12 +++
 testcases/lib/tests/.gitignore                |  6 ++
 testcases/lib/tests/Makefile                  | 11 +++
 testcases/lib/tests/shell_loader.sh           | 12 +++
 .../lib/tests/shell_loader_all_filesystems.sh | 22 ++++++
 testcases/lib/tests/shell_test01.c            | 17 ++++
 testcases/lib/tests/shell_test02.c            | 18 +++++
 testcases/lib/tests/shell_test03.c            | 25 ++++++
 testcases/lib/tests/shell_test04.c            | 18 +++++
 testcases/lib/tests/shell_test05.c            | 27 +++++++
 testcases/lib/tests/shell_test06.c            | 16 ++++
 testcases/lib/tests/shell_test_brk.sh         |  6 ++
 testcases/lib/tests/shell_test_check_argv.sh  | 25 ++++++
 testcases/lib/tests/shell_test_checkpoint.sh  |  7 ++
 testcases/lib/tests/shell_test_pass.sh        |  6 ++
 testcases/lib/tst_env.sh                      | 16 ++++
 testcases/lib/tst_res_.c                      | 58 ++++++++++++++
 testcases/lib/tst_run_shell.c                 | 78 +++++++++++++++++++
 22 files changed, 474 insertions(+), 2 deletions(-)
 create mode 100755 testcases/lib/run_tests.sh
 create mode 100644 testcases/lib/tests/.gitignore
 create mode 100644 testcases/lib/tests/Makefile
 create mode 100755 testcases/lib/tests/shell_loader.sh
 create mode 100755 testcases/lib/tests/shell_loader_all_filesystems.sh
 create mode 100644 testcases/lib/tests/shell_test01.c
 create mode 100644 testcases/lib/tests/shell_test02.c
 create mode 100644 testcases/lib/tests/shell_test03.c
 create mode 100644 testcases/lib/tests/shell_test04.c
 create mode 100644 testcases/lib/tests/shell_test05.c
 create mode 100644 testcases/lib/tests/shell_test06.c
 create mode 100755 testcases/lib/tests/shell_test_brk.sh
 create mode 100755 testcases/lib/tests/shell_test_check_argv.sh
 create mode 100755 testcases/lib/tests/shell_test_checkpoint.sh
 create mode 100755 testcases/lib/tests/shell_test_pass.sh
 create mode 100644 testcases/lib/tst_env.sh
 create mode 100644 testcases/lib/tst_res_.c
 create mode 100644 testcases/lib/tst_run_shell.c

-- 
2.44.2



More information about the ltp mailing list