]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
common/rc: move rm out from if block to always delete kmemleak temp file
authorMisono Tomohiro <misono.tomohiro@jp.fujitsu.com>
Mon, 23 Apr 2018 05:23:14 +0000 (14:23 +0900)
committerEryu Guan <guaneryu@gmail.com>
Mon, 23 Apr 2018 06:10:46 +0000 (14:10 +0800)
Otherwise, *.kmemleak.tmp may remain in result folder if kmemleak is on.

Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/rc

index 366489bbd2b1b4b702f0104f6330fc013e4ae364..0c3359fd5539804b5f4b1c80dcdc7e4a6eb3c634 100644 (file)
--- 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"
 }