Skip to contentSkip to conversation

fstests: common: Keep $seqres.dmesg in $RESULT_DIR

PATCH In review Qu Wenruo 2 participants 3 messages Nov 13, 2019 – Nov 25, 2019 Btrfs file system

lore
Share & tools
lore

Qu Wenruo

author
#0 lore raw

PATCH 1/1 fstests: common: Keep $seqres.dmesg in $RESULT_DIR

Currently fstests will remove $seqres.dmesg if nothing wrong happened. It saves some space, but sometimes it may not provide good enough history for developers to check.
E.g. some unexpected dmesg from fs, but not serious enough to be caught by current filter.

So instead of deleting the ordinary $seqres.dmesg, just keep them, so we can archive them for later review.

---
 common/rc | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
common/rc +1 -3
index b988e912..59a339a6 100644
@@ -3625,10 +3625,8 @@ _check_dmesg()
 	if [ $? -eq 0 ]; then
 		_dump_err "_check_dmesg: something found in dmesg (see $seqres.dmesg)"
 		return 1
-	else
-		rm -f $seqres.dmesg
-		return 0
 	fi
+	return 0
 }
 
 # capture the kmemleak report
Signature · 1 line
2.23.0
#1 lore raw
Quoted 10 lines · Qu Wenruo

Currently fstests will remove $seqres.dmesg if nothing wrong happened. It saves some space, but sometimes it may not provide good enough history for developers to check.
E.g. some unexpected dmesg from fs, but not serious enough to be caught by current filter.

So instead of deleting the ordinary $seqres.dmesg, just keep them, so we can archive them for later review.

This looks fine to me, but it causes more disk space consumption and may eat all rootfs space quickly and unexpectedly.

I suggest we add an option to control the behavior, and default behavior is to delete the dmesg file.

Thanks,
Eryu

Quoted 23 lines
---
 common/rc | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
common/rc +1 -3
index b988e912..59a339a6 100644
@@ -3625,10 +3625,8 @@ _check_dmesg()
 	if [ $? -eq 0 ]; then
 		_dump_err "_check_dmesg: something found in dmesg (see $seqres.dmesg)"
 		return 1
-	else
-		rm -f $seqres.dmesg
-		return 0
 	fi
+	return 0
 }
 
 # capture the kmemleak report
Signature · 1 line
2.23.0
author
#2 lore raw
Quoted 10 lines · Eryu Guan
Quoted 9 lines · Qu Wenruo

Currently fstests will remove $seqres.dmesg if nothing wrong happened. It saves some space, but sometimes it may not provide good enough history for developers to check.
E.g. some unexpected dmesg from fs, but not serious enough to be caught by current filter.

So instead of deleting the ordinary $seqres.dmesg, just keep them, so we can archive them for later review.

Quoted 7 lines
Quoted 1 line

This looks fine to me, but it causes more disk space consumption and may eat all rootfs space quickly and unexpectedly.

I suggest we add an option to control the behavior, and default behavior is to delete the dmesg file.

Sure, I'll add an option to change the behavior in next version.

Thanks,
Qu

Quoted 27 lines

Thanks,
Eryu

Quoted 23 lines
---
 common/rc | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
common/rc +1 -3
index b988e912..59a339a6 100644
@@ -3625,10 +3625,8 @@ _check_dmesg()
 	if [ $? -eq 0 ]; then
 		_dump_err "_check_dmesg: something found in dmesg (see $seqres.dmesg)"
 		return 1
-	else
-		rm -f $seqres.dmesg
-		return 0
 	fi
+	return 0
 }
 
 # capture the kmemleak report
Signature · 1 line
2.23.0