diff mbox series

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

Message ID 20191113065938.34720-1-wqu@suse.com (mailing list archive)
State New, archived
Headers show
Series fstests: common: Keep $seqres.dmesg in $RESULT_DIR | expand

Commit Message

Qu Wenruo Nov. 13, 2019, 6:59 a.m. UTC
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.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 common/rc | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Eryu Guan Nov. 24, 2019, 4:15 p.m. UTC | #1
On Wed, Nov 13, 2019 at 02:59:38PM +0800, Qu Wenruo wrote:
> 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.
> 
> Signed-off-by: Qu Wenruo <wqu@suse.com>

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

> ---
>  common/rc | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/common/rc b/common/rc
> index b988e912..59a339a6 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -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
> -- 
> 2.23.0
>
Qu Wenruo Nov. 25, 2019, 4:59 a.m. UTC | #2
On 2019/11/25 上午12:15, Eryu Guan wrote:
> On Wed, Nov 13, 2019 at 02:59:38PM +0800, Qu Wenruo wrote:
>> 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.
>>
>> Signed-off-by: Qu Wenruo <wqu@suse.com>
> 
> 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

> 
> Thanks,
> Eryu
> 
>> ---
>>  common/rc | 4 +---
>>  1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/common/rc b/common/rc
>> index b988e912..59a339a6 100644
>> --- a/common/rc
>> +++ b/common/rc
>> @@ -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
>> -- 
>> 2.23.0
>>
diff mbox series

Patch

diff --git a/common/rc b/common/rc
index b988e912..59a339a6 100644
--- a/common/rc
+++ b/common/rc
@@ -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