Re: [PATCH] btrfs: fix _require_btrfs_mkfs_uuid_option

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Wed, Mar 13, 2024 at 11:46 PM Boris Burkov <boris@xxxxxx> 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@xxxxxx>
> ---
>  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@xxxxxxxx/

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
>
>





[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux