diff mbox series

[v6,2/6] fstests: check: fix unset seqres in run_section()

Message ID 12a741fc7606f1b1e13524b9ee745456feade656.1744183008.git.anand.jain@oracle.com (mailing list archive)
State New
Headers show
Series fstests: btrfs: add test case to validate sysfs input arguments | expand

Commit Message

Anand Jain April 9, 2025, 7:43 a.m. UTC
Ensure seqres is set early in run_section().

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 check | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Zorro Lang April 9, 2025, 9:57 a.m. UTC | #1
On Wed, Apr 09, 2025 at 03:43:14PM +0800, Anand Jain wrote:
> Ensure seqres is set early in run_section().
> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---
>  check | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/check b/check
> index 32890470a020..16f695e9d75c 100755
> --- a/check
> +++ b/check
> @@ -804,6 +804,7 @@ function run_section()
>  
>  	seq="check.$$"
>  	check="$RESULT_BASE/check"
> +	seqres="$check"

The "seqres" even might be used earlier than that. If your rootfs is readonly,
you'll see that.

Thanks,
Zorro

>  
>  	# don't leave old full output behind on a clean run
>  	rm -f $check.full
> @@ -849,7 +850,6 @@ function run_section()
>  	  fi
>  	fi
>  
> -	seqres="$check"
>  	_check_test_fs
>  
>  	loop_status=()	# track rerun-on-failure state
> -- 
> 2.47.0
>
Anand Jain April 9, 2025, 9:31 p.m. UTC | #2
On 9/4/25 17:57, Zorro Lang wrote:
> On Wed, Apr 09, 2025 at 03:43:14PM +0800, Anand Jain wrote:
>> Ensure seqres is set early in run_section().
>>
>> Signed-off-by: Anand Jain <anand.jain@oracle.com>
>> ---
>>   check | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/check b/check
>> index 32890470a020..16f695e9d75c 100755
>> --- a/check
>> +++ b/check
>> @@ -804,6 +804,7 @@ function run_section()
>>   
>>   	seq="check.$$"
>>   	check="$RESULT_BASE/check"
>> +	seqres="$check"
> 
> The "seqres" even might be used earlier than that. If your rootfs is readonly,
> you'll see that.
> 

Zorro,

Thanks a lot for the review and RVB!

I’ll take care of this patch 2/6 in a separate patchset.
Meanwhile, could you help merge the rest of the sysfs patches,
except for patch 2/6? I don't want the seqres issue to block
the rest of the sysfs patches.

Thanks, Anand

> Thanks,
> Zorro
> 
>>   
>>   	# don't leave old full output behind on a clean run
>>   	rm -f $check.full
>> @@ -849,7 +850,6 @@ function run_section()
>>   	  fi
>>   	fi
>>   
>> -	seqres="$check"
>>   	_check_test_fs
>>   
>>   	loop_status=()	# track rerun-on-failure state
>> -- 
>> 2.47.0
>>
>
Zorro Lang April 10, 2025, 7:12 a.m. UTC | #3
On Thu, Apr 10, 2025 at 05:31:39AM +0800, Anand Jain wrote:
> 
> 
> On 9/4/25 17:57, Zorro Lang wrote:
> > On Wed, Apr 09, 2025 at 03:43:14PM +0800, Anand Jain wrote:
> > > Ensure seqres is set early in run_section().
> > > 
> > > Signed-off-by: Anand Jain <anand.jain@oracle.com>
> > > ---
> > >   check | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/check b/check
> > > index 32890470a020..16f695e9d75c 100755
> > > --- a/check
> > > +++ b/check
> > > @@ -804,6 +804,7 @@ function run_section()
> > >   	seq="check.$$"
> > >   	check="$RESULT_BASE/check"
> > > +	seqres="$check"
> > 
> > The "seqres" even might be used earlier than that. If your rootfs is readonly,
> > you'll see that.
> > 
> 
> Zorro,
> 
> Thanks a lot for the review and RVB!
> 
> I’ll take care of this patch 2/6 in a separate patchset.
> Meanwhile, could you help merge the rest of the sysfs patches,
> except for patch 2/6? I don't want the seqres issue to block
> the rest of the sysfs patches.

OK, let's have the test coverage at first. You can merge this patchset without
the 2/6 in your branch, (or use the way you did in
https://lore.kernel.org/fstests/5e081252abdcf7253ad83d2b5eda49a8818305ad.1743996408.git.anand.jain@oracle.com/
temporarily). Then send PR to me, I'll try to push this patchset in this week :)

Thanks,
Zorro

> 
> Thanks, Anand
> 
> > Thanks,
> > Zorro
> > 
> > >   	# don't leave old full output behind on a clean run
> > >   	rm -f $check.full
> > > @@ -849,7 +850,6 @@ function run_section()
> > >   	  fi
> > >   	fi
> > > -	seqres="$check"
> > >   	_check_test_fs
> > >   	loop_status=()	# track rerun-on-failure state
> > > -- 
> > > 2.47.0
> > > 
> > 
>
diff mbox series

Patch

diff --git a/check b/check
index 32890470a020..16f695e9d75c 100755
--- a/check
+++ b/check
@@ -804,6 +804,7 @@  function run_section()
 
 	seq="check.$$"
 	check="$RESULT_BASE/check"
+	seqres="$check"
 
 	# don't leave old full output behind on a clean run
 	rm -f $check.full
@@ -849,7 +850,6 @@  function run_section()
 	  fi
 	fi
 
-	seqres="$check"
 	_check_test_fs
 
 	loop_status=()	# track rerun-on-failure state