common/rc: fix _require_xfs_io_command params check
authorAmir Goldstein <amir73il@gmail.com>
Wed, 23 Aug 2017 15:49:11 +0000 (18:49 +0300)
committerEryu Guan <eguan@redhat.com>
Thu, 31 Aug 2017 04:25:19 +0000 (12:25 +0800)
commit9b1358a22b93302cbd5339ec38335e7b3cf751e6
tree1ec92dd3bd3457a7f88112a25508eb00fc40048a
parent5bbc4ffa0d0ea33934682f48f939b28e1e64826a
common/rc: fix _require_xfs_io_command params check

When _require_xfs_io_command is passed command parameters,
the resulting error from invalid parameters may be ignored.

For example, the following bogus params would not abort the test:
_require_xfs_io_command "falloc" "-X"
_require_xfs_io_command "fiemap" "-X"

Fix this by looking for the relevant error message.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/rc