diff mbox series

[2/2] generic/402: use _try_scratch_mount instead of _scratch_mount

Message ID 1602840684-25524-2-git-send-email-xuyang2018.jy@cn.fujitsu.com (mailing list archive)
State New, archived
Headers show
Series [1/2] xfs/521: use _try_scratch_mount instead of _scratch_mount | expand

Commit Message

Yang Xu Oct. 16, 2020, 9:31 a.m. UTC
Here will check the return code of mount option. So update it
to use _try_scratch_mount

Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
---
 tests/generic/402 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Darrick J. Wong Oct. 16, 2020, 3:33 p.m. UTC | #1
On Fri, Oct 16, 2020 at 05:31:24PM +0800, Yang Xu wrote:
> Here will check the return code of mount option. So update it
> to use _try_scratch_mount
> 
> Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
> ---
>  tests/generic/402 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/generic/402 b/tests/generic/402
> index 7fc81864..4c940ac4 100755
> --- a/tests/generic/402
> +++ b/tests/generic/402
> @@ -102,7 +102,7 @@ run_test()
>  }
>  
>  _scratch_mkfs &>> $seqres.full 2>&1 || _fail "mkfs failed"
> -_scratch_mount || _fail "scratch mount failed"
> +_try_scratch_mount || _fail "scratch mount failed"

Why not just drop the "|| _fail" part?  The message isn't much
more specific than the fail message that _scratch_mount emits.

--D

>  
>  _require_timestamp_range $SCRATCH_DEV
>  
> -- 
> 2.23.0
> 
> 
>
Eryu Guan Oct. 18, 2020, 10:10 a.m. UTC | #2
On Fri, Oct 16, 2020 at 08:33:21AM -0700, Darrick J. Wong wrote:
> On Fri, Oct 16, 2020 at 05:31:24PM +0800, Yang Xu wrote:
> > Here will check the return code of mount option. So update it
> > to use _try_scratch_mount
> > 
> > Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
> > ---
> >  tests/generic/402 | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tests/generic/402 b/tests/generic/402
> > index 7fc81864..4c940ac4 100755
> > --- a/tests/generic/402
> > +++ b/tests/generic/402
> > @@ -102,7 +102,7 @@ run_test()
> >  }
> >  
> >  _scratch_mkfs &>> $seqres.full 2>&1 || _fail "mkfs failed"
> > -_scratch_mount || _fail "scratch mount failed"
> > +_try_scratch_mount || _fail "scratch mount failed"
> 
> Why not just drop the "|| _fail" part?  The message isn't much
> more specific than the fail message that _scratch_mount emits.

Agreed, using _scratch_mount is fine here.

Thanks,
Eryu
Yang Xu Oct. 19, 2020, 2:05 a.m. UTC | #3
on 2020/10/18 18:10, Eryu Guan wrote:
> On Fri, Oct 16, 2020 at 08:33:21AM -0700, Darrick J. Wong wrote:
>> On Fri, Oct 16, 2020 at 05:31:24PM +0800, Yang Xu wrote:
>>> Here will check the return code of mount option. So update it
>>> to use _try_scratch_mount
>>>
>>> Signed-off-by: Yang Xu<xuyang2018.jy@cn.fujitsu.com>
>>> ---
>>>   tests/generic/402 | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/tests/generic/402 b/tests/generic/402
>>> index 7fc81864..4c940ac4 100755
>>> --- a/tests/generic/402
>>> +++ b/tests/generic/402
>>> @@ -102,7 +102,7 @@ run_test()
>>>   }
>>>
>>>   _scratch_mkfs&>>  $seqres.full 2>&1 || _fail "mkfs failed"
>>> -_scratch_mount || _fail "scratch mount failed"
>>> +_try_scratch_mount || _fail "scratch mount failed"
>>
>> Why not just drop the "|| _fail" part?  The message isn't much
>> more specific than the fail message that _scratch_mount emits.
>
> Agreed, using _scratch_mount is fine here.
Hi Darrick, Eryu
	Thanks for your review. Using _scratch_mount is better. I will send a 
v2 patch.

Best Regards
Yang Xu
	
>
> Thanks,
> Eryu
>
>
> .
>
diff mbox series

Patch

diff --git a/tests/generic/402 b/tests/generic/402
index 7fc81864..4c940ac4 100755
--- a/tests/generic/402
+++ b/tests/generic/402
@@ -102,7 +102,7 @@  run_test()
 }
 
 _scratch_mkfs &>> $seqres.full 2>&1 || _fail "mkfs failed"
-_scratch_mount || _fail "scratch mount failed"
+_try_scratch_mount || _fail "scratch mount failed"
 
 _require_timestamp_range $SCRATCH_DEV