Clean up issue
PATCH 1/1 Clean up issue
From: Ramya BS <[email protected]>
Description:
when we run the script for the first time, all the test will run successfully and PASS . but on the same machine if we run the same script for the 2nd time we see TBROK .
TBROK was seen because the script was not cleaning the files it created during the first run. so added TWARN "did not properly clean up files" and then removing the files and continuing with the test .
--- testscripts/test_fs_bind.sh | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
testscripts/test_fs_bind.sh +2 -2
@@ -343,8 +343,8 @@ save_sandbox() if [ -e "$2/files.before" ]; then if [ -e "$2/files.after" ]; then - tst_brkm TBROK true "${tname}: stale catalog of \"${sandbox}\"" - return 1 + tst_resm TWARN true "${tname}: did not properly clean up files" + rm -f "$2/files.after" fi when="after" fi
Signature · 14 lines
1.7.1 Thanks&Regards, Ramya BS ------------------------------------------------------------------------------ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi!
Quoted 3 lines
Description:
when we run the script for the first time, all the test will run successfully and PASS . but on the same machine if we run the same script for the 2nd time we see TBROK .
The testcase should clean up after it's exit, so rather than hacking around broken test cleanup we should fix the test to remove all temp files it has created.
Signature · 8 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list