]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
common/{filter,quota}, xfs/1{06,52}: fix grep pattern
authorMurphy Zhou <jencce.kernel@gmail.com>
Wed, 17 May 2023 12:01:11 +0000 (20:01 +0800)
committerZorro Lang <zlang@kernel.org>
Sat, 27 May 2023 18:04:54 +0000 (02:04 +0800)
Newer(3.9) grep is complaining about these unnecessary
backslashes before # and -, and breaking the golden output.

Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/filter
common/quota
tests/xfs/106
tests/xfs/152

index 3e3fea7ea02eda622f0b4c5c8f10753315c39602..f10ba78a04f66fec653b8b3ceb2dafdf674c849f 100644 (file)
@@ -293,7 +293,7 @@ _filter_project_quota()
        # until the GETNEXTQUOTA ioctl came into use.  Filter it out.
        # But if you specify a name for ID 0, that means you want to
        # deal with it by yourself, this function won't filter it out.
-       _filter_quota | grep -v "^\#0 \|^(null) "
+       _filter_quota | grep -v "^#0 \|^(null) "
 }
 
 # Account for different "ln" failure messages
index 96b8d044242756a411fe686aac1334a83b03c4a5..6b529bf4b43190bde6009543c58cf82e9b4038d3 100644 (file)
@@ -191,7 +191,7 @@ _scratch_enable_pquota()
 _require_setquota_project()
 {
        setquota --help 2>&1 | \
-               grep -q "\-P, \-\-project[[:space:]]*set limits for project"
+               grep -q -- "-P, --project[[:space:]]*set limits for project"
        if [ "$?" -ne 0 ];then
                _notrun "setquota doesn't support project quota (-P)"
        fi
index fc2281af52cb9f85ed297f807832aa252ec001e0..388873bdee6c051dc1d60e7f9bb11ced01e1462e 100755 (executable)
@@ -59,13 +59,13 @@ clean_files()
 
 filter_quot()
 {
-       _filter_quota | grep -v "root \|\#0 " \
+       _filter_quota | grep -v "root \|#0 " \
                | sed -e '/#[0-9]*/s/#[0-9]*/#ID/g'
 }
 
 filter_report()
 {
-       _filter_quota | grep -v "^root \|^\#0 " \
+       _filter_quota | grep -v "^root \|^#0 " \
                | sed -e '/^#[0-9]*/s/^#[0-9]*/#ID/g'
 }
 
index dd33801d5ec55aae686598fbbde11cfb8637d790..325a05c14124cba91a013036b467dd9b1596746d 100755 (executable)
@@ -98,13 +98,13 @@ clean_files()
 
 filter_quot()
 {
-       _filter_quota | grep -v "root \|\#0 " \
+       _filter_quota | grep -v "root \|#0 " \
                | sed -e '/#[0-9]*/s/#[0-9]*/#ID/g'
 }
 
 filter_report()
 {
-       _filter_quota | grep -v "^root \|^\#0 " \
+       _filter_quota | grep -v "^root \|^#0 " \
                | sed -e '/^#[0-9]*/s/^#[0-9]*/#ID/g'
 }