[PATCH v3 0/4] tst_sudo.c, ima_{conditionals, measurements}.sh enhancements

Petr Vorel
2025-11-27T08:26:47Z

From: Petr Vorel <petr.vorel@gmail.com>

Changes v2->v3:
Rebased due conflict when 69b28f1f78 ("shell: Add support for runtime")
was merged.

Links to v2:
https://lore.kernel.org/ltp/20251121152111.10419-1-pvorel@suse.cz/
https://patchwork.ozlabs.org/project/ltp/list/?series=483104&state=*

Changes v1->v2:
Main change is implementing LTP binary tst_sudo.c as suggested by Jan
Stancek [1] instead of creating new user.

Links to v1:
https://lore.kernel.org/ltp/20251002083701.315334-1-pvorel@suse.cz/
https://patchwork.ozlabs.org/project/ltp/list/?series=476004&state=*

[1] https://lore.kernel.org/ltp/CAASaF6yjdrLLVnehESx1TjsrB_z48nmN_2i585GPfkG3Vvg15Q@mail.gmail.com/

Petr Vorel (4):
shell: Add tst_sudo.c helper
tst_test.sh: Add TST_USR_{G,U}ID variables
ima_{conditionals,measurements}.sh: Use tst_sudo
ima_conditionals.sh: Split test by request

doc/users/setup_tests.rst | 4 +
runtest/ima | 5 +-
.../integrity/ima/tests/ima_conditionals.sh | 78 +++++++++++--------
.../integrity/ima/tests/ima_measurements.sh | 11 +--
testcases/lib/.gitignore | 1 +
testcases/lib/Makefile | 2 +-
testcases/lib/tst_sudo.c | 51 ++++++++++++
testcases/lib/tst_test.sh | 6 +-
8 files changed, 115 insertions(+), 43 deletions(-)
create mode 100644 testcases/lib/tst_sudo.c

--
2.51.0