Re: [PATCH v2] common/rc: Modify _require_batched_discard to improve test coverage

From: Ojaswin Mujoo
Date: Mon May 16 2022 - 04:53:34 EST


>
> Oh I forgot to ask why we need to add a variable (ret), to record the return
> value at here. Why can't use "$?" directly? e.g.
>
> grep -q "not supported" <($FSTRIM_PROG $1 2>&1)
> if [ $? -eq 0 ]
>
> Others look good to me.
>
> Thanks,
> Zorro

That's right, I did it out of habbit. Anyways, I have eliminated the
variable and sent in a new version here [1]. Let me know if it looks
good.

Thank you!
Ojaswin

[1]
https://lore.kernel.org/all/20220516084505.97655-1-ojaswin@xxxxxxxxxxxxx/
>
> > + then
> > + _notrun "FITRIM not supported on $1"
> > + fi
> > }
> >
> > _require_dumpe2fs()
> > --
> > 2.27.0
> >
>