Commit 6efdc0b0 ('test-meta: use grep -a on xstat/meta') updates a number of
test-meta tests because bup xstat and bup meta can output binary data, making
grep output useless. However, the test-meta tests are performed or skipped
based on whether the user is running as root or not, and the "running-as-root"
tests didn't get converted. Finish the necessary changes.
Signed-off-by: Scott Schmit <
i.g...@comcast.net>
---
test/ext/test-meta | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/test/ext/test-meta b/test/ext/test-meta
index 4d6b86aa..82746e47 100755
--- a/test/ext/test-meta
+++ b/test/ext/test-meta
@@ -577,7 +577,7 @@ src/foo/3"
WVPASS rm -rf src
WVPASS bup meta --edit --set-user root --set-uid "$other_uid" ../src.meta \
| WVPASS bup meta -x --numeric-ids
- new_uidx=$(bup xstat src | grep -e '^uid:') || exit $?
+ new_uidx=$(bup xstat src | grep -ae '^uid:') || exit $?
WVPASSEQ "$new_uidx" "uid: $other_uid"
# Test --numeric-ids (gid). Note the name 'root' is not handled
@@ -586,7 +586,7 @@ src/foo/3"
WVPASS rm -rf src
WVPASS bup meta --edit --set-group root --set-gid "$other_gid" ../src.meta \
| WVPASS bup meta -x --numeric-ids
- new_gidx=$(bup xstat src | grep -e '^gid:') || exit $?
+ new_gidx=$(bup xstat src | grep -ae '^gid:') || exit $?
WVPASSEQ "$new_gidx" "gid: $other_gid"
# Test that restoring an unknown user works.
@@ -595,7 +595,7 @@ src/foo/3"
WVPASS bup meta --edit \
--set-uid "$other_uid" --set-user "$unknown_user" ../src.meta \
| WVPASS bup meta -x
- new_uidx=$(bup xstat src | grep -e '^uid:') || exit $?
+ new_uidx=$(bup xstat src | grep -ae '^uid:') || exit $?
WVPASSEQ "$new_uidx" "uid: $other_uid"
# Test that restoring an unknown group works.
@@ -604,7 +604,7 @@ src/foo/3"
WVPASS bup meta --edit \
--set-gid "$other_gid" --set-group "$unknown_group" ../src.meta \
| WVPASS bup meta -x
- new_gidx=$(bup xstat src | grep -e '^gid:') || exit $?
+ new_gidx=$(bup xstat src | grep -ae '^gid:') || exit $?
WVPASSEQ "$new_gidx" "gid: $other_gid"
if ! [[ $(uname) =~ CYGWIN ]]; then
@@ -720,7 +720,7 @@ if [ "$root_status" = root ]; then
WVPASS mkdir "$testfs_limited"/src-restore
WVPASS cd "$testfs_limited"/src-restore
WVFAIL bup meta --extract --file "$testfs"/src.meta 2>&1 \
- | WVPASS grep -e '^Linux chattr:' \
+ | WVPASS grep -ae '^Linux chattr:' \
| WVPASS bup-cfg-py -c \
'import sys; exit(not len(sys.stdin.readlines()) == 3)'
) || exit $?
@@ -744,7 +744,7 @@ if [ "$root_status" = root ]; then
WVPASS cd "$testfs_limited"/src-restore
WVFAIL bup meta --extract --file "$testfs"/src.meta
WVFAIL bup meta --extract --file "$testfs"/src.meta 2>&1 \
- | WVPASS grep -e "^xattr\.set u\?'" \
+ | WVPASS grep -ae "^xattr\.set u\?'" \
| WVPASS bup-cfg-py -c \
'import sys; exit(not len(sys.stdin.readlines()) == 2)'
) || exit $?
@@ -766,7 +766,7 @@ if [ "$root_status" = root ]; then
WVPASS mkdir "$testfs_limited"/src-restore
WVPASS cd "$testfs_limited"/src-restore
WVFAIL bup meta --extract --file "$testfs"/src.meta 2>&1 \
- | WVPASS grep -e '^POSIX1e ACL applyto:' \
+ | WVPASS grep -ae '^POSIX1e ACL applyto:' \
| WVPASS bup-cfg-py -c \
'import sys; exit(not len(sys.stdin.readlines()) == 2)'
) || exit $?
--
2.44.0