aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2018-10-23 19:53:14 -0700
committerGitHub <[email protected]>2018-10-23 19:53:14 -0700
commit3449243b6d0c7f557f1659602bad1b0a9a774fbf (patch)
treebab10ca2672a1b595d3c01c20ba64902caf6d40a /tests
parentda4f331b4136a50e41ce3bb639ad48e519611210 (diff)
ZTS: Update project quota tests
e2fsprogs v1.44.1, which provides lsattr, added a new attribute for ext3 called "verity". It is reported after the project quota flag as a 'V' character in the `lsattr` output. Update projectid_001_pos.ksh and projecttree_001_pos.ksh to use a pattern which will match the expected output in both cases. Reviewed-by: John Kennedy <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #8043
Diffstat (limited to 'tests')
-rwxr-xr-xtests/zfs-tests/tests/functional/projectquota/projectid_001_pos.ksh10
-rwxr-xr-xtests/zfs-tests/tests/functional/projectquota/projecttree_001_pos.ksh10
2 files changed, 10 insertions, 10 deletions
diff --git a/tests/zfs-tests/tests/functional/projectquota/projectid_001_pos.ksh b/tests/zfs-tests/tests/functional/projectquota/projectid_001_pos.ksh
index 5f56d885c..7cd692579 100755
--- a/tests/zfs-tests/tests/functional/projectquota/projectid_001_pos.ksh
+++ b/tests/zfs-tests/tests/functional/projectquota/projectid_001_pos.ksh
@@ -63,19 +63,19 @@ log_must touch $PRJFILE
log_must mkdir $PRJDIR
log_must chattr -p $PRJID1 $PRJFILE
-log_must eval "lsattr -p $PRJFILE | grep $PRJID1 | grep '\- '"
+log_must eval "lsattr -p $PRJFILE | grep $PRJID1 | grep -v '\-P[- ]* '"
log_must chattr -p $PRJID1 $PRJDIR
-log_must eval "lsattr -pd $PRJDIR | grep $PRJID1 | grep '\- '"
+log_must eval "lsattr -pd $PRJDIR | grep $PRJID1 | grep -v '\-P[- ]* '"
log_must chattr +P $PRJDIR
-log_must eval "lsattr -pd $PRJDIR | grep $PRJID1 | grep '\-P '"
+log_must eval "lsattr -pd $PRJDIR | grep $PRJID1 | grep '\-P[- ]* '"
# "-1" is invalid project ID, should be denied
log_mustnot chattr -p -1 $PRJFILE
-log_must eval "lsattr -p $PRJFILE | grep $PRJID1 | grep '\- '"
+log_must eval "lsattr -p $PRJFILE | grep $PRJID1 | grep -v '\-P[- ]* '"
log_must mkdir $PRJDIR/dchild
-log_must eval "lsattr -pd $PRJDIR/dchild | grep $PRJID1 | grep '\-P '"
+log_must eval "lsattr -pd $PRJDIR/dchild | grep $PRJID1 | grep '\-P[- ]* '"
log_must touch $PRJDIR/fchild
log_must eval "lsattr -p $PRJDIR/fchild | grep $PRJID1"
diff --git a/tests/zfs-tests/tests/functional/projectquota/projecttree_001_pos.ksh b/tests/zfs-tests/tests/functional/projectquota/projecttree_001_pos.ksh
index 570e6a8ac..1e4ef309f 100755
--- a/tests/zfs-tests/tests/functional/projectquota/projecttree_001_pos.ksh
+++ b/tests/zfs-tests/tests/functional/projectquota/projecttree_001_pos.ksh
@@ -69,30 +69,30 @@ log_must chattr -p $PRJID1 $PRJDIR/a3
log_must eval "zfs project $PRJDIR/a3 | grep '$PRJID1 \-'"
log_must zfs project -p $PRJID2 $PRJDIR/a3
-log_must eval "lsattr -p $PRJDIR/a3 | grep $PRJID2 | grep '\- '"
+log_must eval "lsattr -p $PRJDIR/a3 | grep $PRJID2 | grep -v '\-P[- ]* '"
log_must chattr -p $PRJID1 $PRJDIR/a1
log_must eval "zfs project -d $PRJDIR/a1 | grep '$PRJID1 \-'"
log_must zfs project -p $PRJID2 $PRJDIR/a1
-log_must eval "lsattr -pd $PRJDIR/a1 | grep $PRJID2 | grep '\- '"
+log_must eval "lsattr -pd $PRJDIR/a1 | grep $PRJID2 | grep -v '\-P[- ]* '"
log_must chattr +P $PRJDIR/a2
log_must eval "zfs project -d $PRJDIR/a2 | grep '0 P'"
log_must zfs project -s $PRJDIR/a2
-log_must eval "lsattr -pd $PRJDIR/a2 | grep 0 | grep '\-P '"
+log_must eval "lsattr -pd $PRJDIR/a2 | grep 0 | grep '\-P[- ]* '"
log_must chattr +P -p $PRJID1 $PRJDIR/a1
log_must eval "zfs project -d $PRJDIR/a1 | grep '$PRJID1 P'"
log_must zfs project -s -p $PRJID2 $PRJDIR/a2
-log_must eval "lsattr -pd $PRJDIR/a2 | grep $PRJID2 | grep '\-P '"
+log_must eval "lsattr -pd $PRJDIR/a2 | grep $PRJID2 | grep '\-P[- ]* '"
log_must chattr -P $PRJDIR/a1
log_must eval "zfs project -d $PRJDIR/a1 | grep '$PRJID1 \-'"
log_must zfs project -C -k $PRJDIR/a2
-log_must eval "lsattr -pd $PRJDIR/a2 | grep $PRJID2 | grep '\- '"
+log_must eval "lsattr -pd $PRJDIR/a2 | grep $PRJID2 | grep -v '\-P[- ]* '"
log_pass "Check 'zfs project' is compatible with chattr/lsattr"