ext4/018: fix mismatch wildcard with debugfs
authorYufen Yu <yuyufen@huawei.com>
Thu, 11 Oct 2018 13:14:10 +0000 (21:14 +0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 14 Oct 2018 13:39:28 +0000 (21:39 +0800)
For the new version of debugfs(v1.44.0+), it changes "File ACL:" format
from "%sFile ACL: %llu    Directory ACL: %d\n" to "%sFile ACL: %llu\n".

Thus, update this case accordingly.

Signed-off-by: Yufen Yu <yuyufen@huawei.com>
Reviewed-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/ext4/018

index 0116c5f781b24e757b9867fb99926e51602f9d4b..eb6d827b7c9ed9d0c76bfacfa020f9b768556328 100755 (executable)
@@ -55,7 +55,7 @@ echo "+ check fs"
 e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
 
 echo "+ corrupt image"
-blk="$(debugfs -R 'stat /attrfile' "${SCRATCH_DEV}" 2> /dev/null | grep 'File ACL:' | sed -e 's/^.*File ACL: \([0-9]*\).*Directory.*$/\1/g')"
+blk="$(debugfs -R 'stat /attrfile' "${SCRATCH_DEV}" 2> /dev/null | grep 'File ACL:' | sed -e 's/^.*File ACL: \([0-9]*\)/\1/g')"
 $XFS_IO_PROG -f -c "pwrite -S 0x62 $((blk * blksz + 20)) 8" "${SCRATCH_DEV}" >> $seqres.full
 
 echo "+ mount image"