From: Misono Tomohiro Date: Mon, 23 Apr 2018 05:23:14 +0000 (+0900) Subject: common/rc: move rm out from if block to always delete kmemleak temp file X-Git-Tag: v2022.05.01~1595 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d3977ca35aaf93734490f71b28643e3f58ccb6a4;p=xfstests-dev.git common/rc: move rm out from if block to always delete kmemleak temp file Otherwise, *.kmemleak.tmp may remain in result folder if kmemleak is on. Signed-off-by: Tomohiro Misono Reviewed-by: Darrick J. Wong Signed-off-by: Eryu Guan --- diff --git a/common/rc b/common/rc index 366489bb..0c3359fd 100644 --- a/common/rc +++ b/common/rc @@ -3515,8 +3515,8 @@ EXPERIMENTAL kmemleak reported some memory leaks! Due to the way kmemleak works, the leak might be from an earlier test, or something totally unrelated. ENDL cat "$leak_file.tmp" >> "$leak_file" - rm -rf "$leak_file.tmp" fi + rm -rf "$leak_file.tmp" echo "clear" > "$kern_knob" }