[LTP] [PATCH 1/1] tst_test.sh: Fix missing cleanup run from setup
Petr Vorel
pvorel@suse.cz
Fri Sep 30 13:30:04 CEST 2022
Hi,
NOTE: we could add cleanup function call to at least one test
to have at least visual check that it's run and only once.
Kind regards,
Petr
diff --git lib/newlib_tests/shell/tst_mount_device.sh lib/newlib_tests/shell/tst_mount_device.sh
index 70f80f84a..4f387014f 100755
--- lib/newlib_tests/shell/tst_mount_device.sh
+++ lib/newlib_tests/shell/tst_mount_device.sh
@@ -6,8 +6,14 @@ TST_MOUNT_DEVICE=1
TST_NEEDS_ROOT=1
TST_FS_TYPE=ext4
TST_TESTFUNC=test
+TST_CLEANUP=do_cleanup
TST_CNT=3
+do_cleanup()
+{
+ tst_res TINFO "run cleanup"
+}
+
test1()
{
EXPECT_PASS "cd $TST_MNTPOINT"
More information about the ltp
mailing list