[PATCH 1/1] UBUNTU: ubuntu_zfs_xfs_generic: fix warning with awk 5.x

Colin Ian King colin.king at canonical.com
Mon Jan 27 14:40:29 UTC 2020


On 27/01/2020 14:38, Paolo Pisati wrote:
> Signed-off-by: Paolo Pisati <paolo.pisati at canonical.com>
> ---
>  ...ric-001-remove-unnecessary-backslash.patch | 38 +++++++++++++++++++
>  .../ubuntu_zfs_xfs_generic.py                 |  3 ++
>  2 files changed, 41 insertions(+)
>  create mode 100644 ubuntu_zfs_xfs_generic/0006-generic-001-remove-unnecessary-backslash.patch
> 
> diff --git a/ubuntu_zfs_xfs_generic/0006-generic-001-remove-unnecessary-backslash.patch b/ubuntu_zfs_xfs_generic/0006-generic-001-remove-unnecessary-backslash.patch
> new file mode 100644
> index 00000000..3357f054
> --- /dev/null
> +++ b/ubuntu_zfs_xfs_generic/0006-generic-001-remove-unnecessary-backslash.patch
> @@ -0,0 +1,38 @@
> +From 95a2510bb1f2844adb3615feda50d49a9b903fae Mon Sep 17 00:00:00 2001
> +From: Murphy Zhou <jencce.kernel at gmail.com>
> +Date: Wed, 9 Oct 2019 13:34:34 +0800
> +Subject: [PATCH] generic/001: remove unnecessary backslash
> +
> +Awk 5.0.1 is complaining about this backslash and causing false alarm
> +like this:
> +    warning: regexp escape sequence '\#' is not a known regexp operator
> +
> +This fix works fine with Awk 3.1.7 , 4.0.2 , 4.2.1 and 5.0.1. This
> +backslash is not necessary.
> +
> +Signed-off-by: Murphy Zhou <jencce.kernel at gmail.com>
> +Reviewed-by: Christoph Hellwig <hch at lst.de>
> +Signed-off-by: Eryu Guan <guaneryu at gmail.com>
> +(cherry-picked from https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git
> +95a2510bb1f2844adb3615feda50d49a9b903fae)
> +Signed-off-by: Paolo Pisati <paolo.pisati at canonical.com>
> +---
> + tests/generic/001 | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/tests/generic/001 b/tests/generic/001
> +index 046e54e3..3a047754 100755
> +--- a/tests/generic/001
> ++++ b/tests/generic/001
> +@@ -177,7 +177,7 @@ _chain()
> + {
> +     $AWK_PROG -v full_file=$seqres.full -v verify=$verify <$tmp.config '
> + BEGIN	{ nfile = 0 }
> +-/^\#/	{ next }
> ++/^#/	{ next }
> + 	{ file[nfile] = $1
> + 	  size[nfile] = $2
> + 	  link[nfile] = 0
> +-- 
> +2.24.0
> +
> diff --git a/ubuntu_zfs_xfs_generic/ubuntu_zfs_xfs_generic.py b/ubuntu_zfs_xfs_generic/ubuntu_zfs_xfs_generic.py
> index 88ca18fc..a99c7678 100644
> --- a/ubuntu_zfs_xfs_generic/ubuntu_zfs_xfs_generic.py
> +++ b/ubuntu_zfs_xfs_generic/ubuntu_zfs_xfs_generic.py
> @@ -105,6 +105,9 @@ class ubuntu_zfs_xfs_generic(test.test):
>          utils.system('git reset --hard ' + commit)
>          print "Patching xfstests-dev to add minimal support for ZFS"
>          utils.system('patch -p1 < %s/0001-xfstests-add-minimal-support-for-zfs.patch' % self.bindir)
> +        print "Patching xfstests-dev: fix warning with Awk 5.0.1"
> +        utils.system('patch -p1 < %s/0006-generic-001-remove-unnecessary-backslash.patch' % self.bindir)
> +
>  
>          os.chdir(os.path.join(self.srcdir, 'xfstests-bld'))
>          print "getting xfs tests source"
> 
Good catch! Thanks Paolo

Acked-by: Colin Ian King <colin.king at canonical.com>



More information about the kernel-team mailing list