X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=t%2Ftest-meta.sh;h=eb1f97b4896dae028cc003934fea42a56cbc7142;hb=f3b164a6242f950591a950b47a2c164038465aea;hp=f51b3c812c32f0655cc93e2cb2fe8be0a10d3b29;hpb=1d7893f0601defb360e4c8b7e30b96cf203d7d73;p=bup.git diff --git a/t/test-meta.sh b/t/test-meta.sh index f51b3c8..eb1f97b 100755 --- a/t/test-meta.sh +++ b/t/test-meta.sh @@ -45,8 +45,8 @@ genstat() ( export PATH="$TOP:$PATH" # pick up bup # Skip atime (test elsewhere) to avoid the observer effect. - WVPASS find . | WVPASS sort \ - | WVPASS xargs bup xstat \ + WVPASS find . -print0 | WVPASS sort -z \ + | WVPASS xargs -0 bup xstat \ --mtime-resolution "$mtime_resolution"ns \ --exclude-fields ctime,atime,size ) @@ -438,10 +438,11 @@ src/foo/3" tmpdir="$(WVPASS wvmktempdir)" || exit $? + # FIXME: binary groups first_group="$(WVPASS bup-python -c 'import os,grp; \ - print grp.getgrgid(os.getgroups()[0])[0]')" || exit $? + print(grp.getgrgid(os.getgroups()[0])[0])')" || exit $? last_group="$(bup-python -c 'import os,grp; \ - print grp.getgrgid(os.getgroups()[-1])[0]')" || exit $? + print(grp.getgrgid(os.getgroups()[-1])[0])')" || exit $? last_group_erx="$(escape-erx "$last_group")" WVSTART 'metadata (restoration of ownership)' @@ -677,11 +678,10 @@ if [ "$root_status" = root ]; then ( WVPASS mkdir "$testfs"/src/foo WVPASS touch "$testfs"/src/bar - PYTHONPATH="$TOP/lib" \ - WVPASS bup-python -c "from bup import xstat; \ + WVPASS bup-python -c "from bup import xstat; \ x = xstat.timespec_to_nsecs((42, 0));\ - xstat.utime('$testfs/src/foo', (x, x));\ - xstat.utime('$testfs/src/bar', (x, x));" + xstat.utime(b'$testfs/src/foo', (x, x));\ + xstat.utime(b'$testfs/src/bar', (x, x));" WVPASS cd "$testfs" WVPASS bup meta -v --create --recurse --file src.meta src WVPASS bup meta -tvf src.meta @@ -742,7 +742,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 '" \ + | WVPASS grep -e "^xattr\.set u\?'" \ | WVPASS bup-python -c \ 'import sys; exit(not len(sys.stdin.readlines()) == 2)' ) || exit $?