]> arthur.barton.de Git - bup.git/blobdiff - t/test-restore-map-owner.sh
update-checkout-info: compare physical paths (resolve symlinks)
[bup.git] / t / test-restore-map-owner.sh
index f307826eeb48cd979ee7f8874c14fa37ef3fbb53..4e676100134b0a006f99806723e896e242426973 100755 (executable)
@@ -2,7 +2,9 @@
 . ./wvtest-bup.sh || exit $?
 . t/lib.sh || exit $?
 
-if [ $(t/root-status) != root ]; then
+root_status="$(t/root-status)" || exit $?
+
+if [ "$root_status" != root ]; then
     echo 'Not root: skipping restore --map-* tests.'
     exit 0 # FIXME: add WVSKIP.
 fi
@@ -80,15 +82,15 @@ WVPASS grep -qE "^uid: $other_uid\$" foo-xstat
 WVPASS grep -qE "^group: $other_group\$" foo-xstat
 WVPASS grep -qE "^gid: $other_gid\$" foo-xstat
 
-has_uid_gid_0=$(WVPASS bup-python -c "
+has_uid_gid_0=$(WVPASS bup-cfg-py -c "
 import grp, pwd
 try:
   pwd.getpwuid(0)
   grp.getgrgid(0)
-  print 'yes'
-except KeyError, ex:
+  print('yes')
+except KeyError as ex:
   pass
-" 2>/dev/null) || exit $?
+") || exit $?
 if [ "$has_uid_gid_0" == yes ]
 then
     WVSTART "restore --map-user/group/uid/gid (zero uid/gid trumps all)"