Message ID | 37d57d3ae473b67270137151e4fa18ed7464cba1.1710373423.git.boris@bur.io (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs: fix _require_btrfs_mkfs_uuid_option | expand |
On Wed, Mar 13, 2024 at 11:46 PM Boris Burkov <boris@bur.io> wrote: > > currently, this helper causes tests to fail on my system due to > unexpected warning messages about dangling '\' characters from grep. > Change the invocation to not escape the '-' characters but instead to > use -- to instruct grep that the options list is over. Fixes > btrfs/31[345] for me (and I believe the btrfs github ci) > > Signed-off-by: Boris Burkov <boris@bur.io> > --- > common/btrfs | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/common/btrfs b/common/btrfs > index 3eb2a91b7..aa344706c 100644 > --- a/common/btrfs > +++ b/common/btrfs > @@ -93,7 +93,7 @@ _require_btrfs_mkfs_uuid_option() > local cnt > > cnt=$($MKFS_BTRFS_PROG --help 2>&1 | \ > - grep -E --count "\-\-uuid|\-\-device-uuid") > + grep -E --count -- "--uuid|--device-uuid") This was already fixed and it's in the patches-in-queue branch: https://lore.kernel.org/fstests/ef2df19486ef71adccd14b3df0bf475ecc7f3b38.1709737287.git.fdmanana@suse.com/ https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/log/?h=patches-in-queue > if [ $cnt != 2 ]; then > _notrun "Require $MKFS_BTRFS_PROG with --uuid and --device-uuid options" > fi > -- > 2.43.0 > >
diff --git a/common/btrfs b/common/btrfs index 3eb2a91b7..aa344706c 100644 --- a/common/btrfs +++ b/common/btrfs @@ -93,7 +93,7 @@ _require_btrfs_mkfs_uuid_option() local cnt cnt=$($MKFS_BTRFS_PROG --help 2>&1 | \ - grep -E --count "\-\-uuid|\-\-device-uuid") + grep -E --count -- "--uuid|--device-uuid") if [ $cnt != 2 ]; then _notrun "Require $MKFS_BTRFS_PROG with --uuid and --device-uuid options" fi
currently, this helper causes tests to fail on my system due to unexpected warning messages about dangling '\' characters from grep. Change the invocation to not escape the '-' characters but instead to use -- to instruct grep that the options list is over. Fixes btrfs/31[345] for me (and I believe the btrfs github ci) Signed-off-by: Boris Burkov <boris@bur.io> --- common/btrfs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)