]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
common/xfs: use whole-word matching for _require_xfsrestore_xflag
authorDarrick J. Wong <djwong@kernel.org>
Tue, 7 Feb 2023 17:00:12 +0000 (09:00 -0800)
committerZorro Lang <zlang@kernel.org>
Sat, 11 Feb 2023 04:36:36 +0000 (12:36 +0800)
commit1d828630570d063727d67855763cdfab9c254386
treef815d474c73bbbd71846ddc69b001217a1d1d666
parent711a7a2c2bb6ea7d77a9a4d62a144c6728e9f5e7
common/xfs: use whole-word matching for _require_xfsrestore_xflag

On my system, the path to the xfsrestore binary is:

/code/xfsdump/build-x86_64/restore/xfsrestore

The grep command in _require_xfsrestore_xflag matches on the "build-x86"
part, even though my version of xfsrestore does not actually have a -x
flag.  Fix the string parsing to match entire words so that we only look
for -x in the help output.

(Maybe someone should patch xfsrestore -h to report basename(argv[0])
instead of argv[0]...)

Fixes: 1ffa16c573 ("xfs: test for fixing wrong root inode number in dump")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/xfs