[LTP] [RFC PATCH 4/5] shell lib: Add basic support for test cleanup
Cyril Hrubis
chrubis@suse.cz
Wed Apr 30 10:57:29 CEST 2025
Hi!
And one possible solution is to source the environment first and the
loader last, on the top of your shell-loader-setup-cleanup.v2 branch:
diff --git a/testcases/lib/tests/shell_loader.sh b/testcases/lib/tests/shell_loader.sh
index eeed122c1..01acf6d35 100755
--- a/testcases/lib/tests/shell_loader.sh
+++ b/testcases/lib/tests/shell_loader.sh
@@ -14,6 +14,8 @@
# }
# ---
+. tst_env.sh
+
tst_test()
{
tst_res TPASS "Shell loader works fine!"
diff --git a/testcases/lib/tst_env.sh b/testcases/lib/tst_env.sh
index 68f9a0daa..585790a7d 100644
--- a/testcases/lib/tst_env.sh
+++ b/testcases/lib/tst_env.sh
@@ -18,11 +18,6 @@ if [ -z "$LINENO" ]; then
LINENO=-1
fi
-if [ -z "$LTP_IPC_PATH" ]; then
- echo "This script has to be executed from a LTP loader!"
- exit 1
-fi
-
tst_brk_()
{
tst_res_ "$@"
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list