Re: Should xfstest generic/388 be using _require_command for fsstress?

Eryu Guan
2017-04-05T11:10:50Z

On Wed, Apr 05, 2017 at 11:59:15AM +0100, David Howells wrote:
> | 388:45: $KILLALL_PROG -9 fsstress > /dev/null 2>&1
> | 388:58:_require_command "$KILLALL_PROG" "killall"
> | 388:79: $KILLALL_PROG -9 fsstress > /dev/null 2>&1
>
> Should this be using _require_command for fsstress and $FSSTRESS_PROG like the
> other tests that use fsstress?

fsstress is a bit special, it's mandatory for xfstests, it's checked in
common/config

[ ! -x $FSSTRESS_PROG ] && _fatal "fsstress not found or executable"

(Perhaps we should treat fsstress just as other test binaries, but it's
been this way since the beginning of xfstests.)

And generic/388 does invoke fsstress by calling $FSSTRESS_PROG, but not
necessary in this killall case.

We define NAME_PROG variables mainly for doing tweeks easily in this
variable, like adding an option globally. Take $XFS_IO_PROG as an
example in init_rc.

# Figure out if we need to add -F ("foreign", deprecated) option to xfs_io
$XFS_IO_PROG -c stat $TEST_DIR 2>&1 | grep -q "is not on an XFS filesystem" && \
export XFS_IO_PROG="$XFS_IO_PROG -F"

>
> Also, should 388 be printing "Silence is golden" at the end of the test?

Yes, and it does print this message, but in the middle of test, not end.

Thanks,
Eryu