aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2020-03-22 23:56:14 -0400
committerTheodore Ts'o <tytso@mit.edu>2020-03-23 21:21:05 -0400
commitdf5487a990b81bfdfdc8cb7635dbe83e03931c54 (patch)
tree38b900f91dc856ea79a171cbea0a2d72c94b8588
parent1102de4d50b195ddfa8369048589e79b4cd1bc20 (diff)
downloade2fsprogs-df5487a990b81bfdfdc8cb7635dbe83e03931c54.tar.gz
tests: use grep -E for better portability in r_inline_xattr
Since r_inline_xattr is using an extended regexp, we need grep -E on some implementations of grep. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--tests/r_inline_xattr/expect4
-rw-r--r--tests/r_inline_xattr/script8
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/r_inline_xattr/expect b/tests/r_inline_xattr/expect
index 885de59db..773db1021 100644
--- a/tests/r_inline_xattr/expect
+++ b/tests/r_inline_xattr/expect
@@ -1,5 +1,5 @@
resize2fs test
-debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|user.name (''
+debugfs -R ''stat file'' test.img 2>&1 | grep -E ''^Inode\|in inode body\|user.name \(''
Inode: 1550 Type: regular Mode: 0644 Flags: 0x0
user.name (11) = "propervalue"
Exit status is 0
@@ -8,7 +8,7 @@ Resizing the filesystem on test.img to 5120 (1k) blocks.
The filesystem on test.img is now 5120 (1k) blocks long.
Exit status is 0
-debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|user.name (''
+debugfs -R ''stat file'' test.img 2>&1 | grep -E ''^Inode\|in inode body\|user.name \(''
Inode: 12 Type: regular Mode: 0644 Flags: 0x0
user.name (11) = "propervalue"
Exit status is 0
diff --git a/tests/r_inline_xattr/script b/tests/r_inline_xattr/script
index 4e7dd94cf..2f754e60b 100644
--- a/tests/r_inline_xattr/script
+++ b/tests/r_inline_xattr/script
@@ -13,8 +13,8 @@ gunzip < $IMAGE > $TMPFILE
echo "resize2fs test" > $OUT.new
# Look at existing inline extended attribute
-echo "debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|user.name (''" >> $OUT.new
-$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep "^Inode\|in inode body\|user.name (" >> $OUT.new
+echo "debugfs -R ''stat file'' test.img 2>&1 | grep -E ''^Inode\|in inode body\|user.name \\(''" >> $OUT.new
+$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep -E "^Inode|in inode body|user.name \(" >> $OUT.new
status=$?
echo Exit status is $status >> $OUT.new
@@ -25,8 +25,8 @@ status=$?
echo Exit status is $status >> $OUT.new
# Look at inline extended attribute in resized fs
-echo "debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|user.name (''" >> $OUT.new
-$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep "^Inode\|in inode body\|user.name (" >> $OUT.new
+echo "debugfs -R ''stat file'' test.img 2>&1 | grep -E ''^Inode\|in inode body\|user.name \\(''" >> $OUT.new
+$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep -E "^Inode|in inode body|user.name \(" >> $OUT.new
status=$?
echo Exit status is $status >> $OUT.new