On Sunday 06 November 2016, Bernhard Voelker wrote: > On 11/05/2016 04:08 PM, Ruediger Meier wrote: > > From: Ruediger Meier <ruediger.meier@xxxxxxxxxxx> > > > > Since there is no error handling in this test $LODEV > > may be empty. > > > > Signed-off-by: Ruediger Meier <ruediger.meier@xxxxxxxxxxx> > > --- > > tests/ts/losetup/losetup-loop | 46 > > +++++++++++++++++++++---------------------- 1 file changed, 23 > > insertions(+), 23 deletions(-) > > > > diff --git a/tests/ts/losetup/losetup-loop > > b/tests/ts/losetup/losetup-loop index cff12c9..13ccc65 100755 > > --- a/tests/ts/losetup/losetup-loop > > +++ b/tests/ts/losetup/losetup-loop > > @@ -42,15 +42,15 @@ BACKFILE="$TS_DEVICE" > > > > ts_init_subtest "find-race-condition" > > LODEV=$( $TS_CMD_LOSETUP --find --nooverlap --show $BACKFILE ) > > -$TS_CMD_LOSETUP -d $LODEV > > +$TS_CMD_LOSETUP -d "$LODEV" > > So what happens now when losetup is fed with ""? > Wouldn't it be better to handle the error instead? Actually the failure is generally handled in terms that the test will fail and exit 1. I did not want to change more of the test logic shortly before release. Also note that we are testing a possibly broken losetup here which makes any "good" error handling questionable anyways. For example if something goes wrong it would be of course nice to do at least some cleanup and remove all loop devices again to not let other tests fail too. But how should we do that if losetup is broken? Regarding quoting. IMO we are missing a lot quotation marks in our test-suite. This is specially annoying since our programs are printing the whole --help output on usage errors. I really hate that auto-help feature. Don't understand why we are doing that instead of just printing "unkown option" or "missing argument". cu, Rudi -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html