All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 0/2] shell lib: Add very simple cleanup support
@ 2025-02-14 11:21 Cyril Hrubis
  2025-02-14 11:21 ` [LTP] [PATCH 1/2] testcases/lib/run_tests.sh Cyril Hrubis
  2025-02-14 11:21 ` [LTP] [PATCH 2/2] shell lib: Add support for test cleanup Cyril Hrubis
  0 siblings, 2 replies; 11+ messages in thread
From: Cyril Hrubis @ 2025-02-14 11:21 UTC (permalink / raw)
  To: ltp

This implements a simple shell library cleanup support by utilizing the
shell trap buildin. With that the cleanup is executed when the shell
script is about to exit.

Alternative we do not have to add the TST_CLEANUP variable at all and
use the trap directly in the shell tests instead. In that case we can
drop the change from tst_env.sh and change the two tests to use trap
directly instead.

Cyril Hrubis (2):
  testcases/lib/run_tests.sh
  shell lib: Add support for test cleanup

 testcases/lib/run_tests.sh                    |  5 ++++-
 .../lib/tests/shell_loader_brk_cleanup.sh     | 20 ++++++++++++++++++
 testcases/lib/tests/shell_loader_cleanup.sh   | 21 +++++++++++++++++++
 testcases/lib/tst_env.sh                      |  4 ++++
 4 files changed, 49 insertions(+), 1 deletion(-)
 create mode 100755 testcases/lib/tests/shell_loader_brk_cleanup.sh
 create mode 100755 testcases/lib/tests/shell_loader_cleanup.sh

-- 
2.45.3


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

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

end of thread, other threads:[~2025-02-28 11:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-14 11:21 [LTP] [PATCH 0/2] shell lib: Add very simple cleanup support Cyril Hrubis
2025-02-14 11:21 ` [LTP] [PATCH 1/2] testcases/lib/run_tests.sh Cyril Hrubis
2025-02-14 13:37   ` Petr Vorel
2025-02-28 11:49     ` Petr Vorel
2025-02-14 11:21 ` [LTP] [PATCH 2/2] shell lib: Add support for test cleanup Cyril Hrubis
2025-02-14 13:55   ` Petr Vorel
2025-02-14 14:07     ` Cyril Hrubis
2025-02-14 14:18       ` Cyril Hrubis
2025-02-17  7:44   ` Petr Vorel
2025-02-25 10:25     ` Cyril Hrubis
2025-02-25 11:00       ` Petr Vorel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.