Skip to contentSkip to conversation

common/rc: move rm out from if block to always delete kmemleak temp file

PATCH In review Misono Tomohiro 2 participants 2 messages Apr 23, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 common/rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/rc +1 -1
index 366489bb..0c3359fd 100644
@@ -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"
 }
 
Signature · 1 line
2.14.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Misono Tomohiro

Otherwise, *.kmemleak.tmp may remain in result folder if kmemleak is on.

Looks ok,

--D

Quoted 25 lines
---
 common/rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/rc +1 -1
index 366489bb..0c3359fd 100644
@@ -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"
 }
 
Signature · 6 lines
2.14.3

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html