Make use of -VV when checking rsync capabilities.
authorWayne Davison <wayne@opencoder.net>
Thu, 20 Oct 2022 16:02:28 +0000 (09:02 -0700)
committerWayne Davison <wayne@opencoder.net>
Thu, 20 Oct 2022 16:09:26 +0000 (09:09 -0700)
testsuite/acls-default.test
testsuite/acls.test
testsuite/atimes.test
testsuite/chown.test
testsuite/crtimes.test
testsuite/daemon.test
testsuite/devices.test
testsuite/itemize.test
testsuite/xattrs.test

index a0a482cedf7e3a0c511ab8fbdf632d180558d0c7..d8fba7fee6543f329601e57b1d2b39e81fe020a8 100644 (file)
@@ -7,7 +7,7 @@
 
 . $suitedir/rsync.fns
 
-$RSYNC --version | grep "[, ] ACLs" >/dev/null || test_skipped "Rsync is configured without ACL support"
+$RSYNC -VV | grep '"ACLs": true' >/dev/null || test_skipped "Rsync is configured without ACL support"
 
 case "$setfacl_nodef" in
 true) test_skipped "I don't know how to use your setfacl command" ;;
index 23449018a7036f445cbb914a7cfc4504069ffad7..693da6677003c69b1922d3ae7027d374a1f19b69 100644 (file)
@@ -7,7 +7,7 @@
 
 . $suitedir/rsync.fns
 
-$RSYNC --version | grep "[, ] ACLs" >/dev/null || test_skipped "Rsync is configured without ACL support"
+$RSYNC -VV | grep '"ACLs": true' >/dev/null || test_skipped "Rsync is configured without ACL support"
 
 makepath "$fromdir/foo"
 echo something >"$fromdir/file1"
index 3bdb1d463308d0651b7c8f1894b35f1de6f3fa4e..4d46eb0570c71eba30d2d3dafaa0ea0f8966efcd 100644 (file)
@@ -4,7 +4,7 @@
 
 . "$suitedir/rsync.fns"
 
-$RSYNC --version | grep "[, ] atimes" >/dev/null || test_skipped "Rsync is configured without atimes support"
+$RSYNC -VV | grep '"atimes": true' >/dev/null || test_skipped "Rsync is configured without atimes support"
 
 mkdir "$fromdir"
 
index 5dadb836ccef2c8ff49958f2ddd6528dc139d380..b53413e1e8c1b5a4eba324c4b5767169747896be 100644 (file)
@@ -15,7 +15,7 @@
 
 case $0 in
 *fake*)
-    $RSYNC --version | grep "[, ] xattrs" >/dev/null || test_skipped "Rsync needs xattrs for fake device tests"
+    $RSYNC -VV | grep '"xattrs": true' >/dev/null || test_skipped "Rsync needs xattrs for fake device tests"
     RSYNC="$RSYNC --fake-super"
     TLS_ARGS="$TLS_ARGS --fake-super"
     case "$HOST_OS" in
index 07d9269b067f9da0e8a4a1fdebc50b08e665d71a..456f0a5f12aecdd17d153b5a40caaaba27f26d9a 100644 (file)
@@ -4,7 +4,7 @@
 
 . "$suitedir/rsync.fns"
 
-$RSYNC --version | grep "[, ] crtimes" >/dev/null || test_skipped "Rsync is configured without crtimes support"
+$RSYNC -VV | grep '"crtimes": true' >/dev/null || test_skipped "Rsync is configured without crtimes support"
 
 # Setting an older time via touch sets the create time to the mtime.
 # Setting it to a newer time affects just the mtime.
index 80d2baf656894a375912622aeec727266a6297b5..60aa334b7566bbfb1509cf453677790f71abada7 100644 (file)
@@ -81,7 +81,7 @@ drwxr-xr-x         DIR ####/##/## ##:##:## foo
 EOT
 diff $diffopt "$chkfile" "$outfile" || test_fail "test 3 failed"
 
-if $RSYNC --version | grep "[, ] atimes" >/dev/null; then
+if $RSYNC -VV | grep '"atimes": true' >/dev/null; then
     checkdiff "$RSYNC -rU localhost::test-from/f*" \
        "sed -e '$FILE_REPL' -e '$DIR_REPL' -e '$LS_REPL'" <<EOT
 drwxr-xr-x         DIR ####/##/## ##:##:##                     foo
index cd9cf3a24ec85688619b2460182cda9230fa2e2f..ad5f936b36775cb681242fcd120aa1ae52c17d65 100644 (file)
@@ -13,7 +13,7 @@
 
 case $0 in
 *fake*)
-    $RSYNC --version | grep "[, ] xattrs" >/dev/null || test_skipped "Rsync needs xattrs for fake device tests"
+    $RSYNC -VV | grep '"xattrs": true' >/dev/null || test_skipped "Rsync needs xattrs for fake device tests"
     RSYNC="$RSYNC --fake-super"
     TLS_ARGS="$TLS_ARGS --fake-super"
     case "$HOST_OS" in
@@ -94,7 +94,7 @@ esac
 
 # TODO: Need to test whether hardlinks are possible on this OS/filesystem
 
-$RSYNC --version | grep "[, ] hardlink-special" >/dev/null && CAN_HLINK_SPECIAL=yes || CAN_HLINK_SPECIAL=no
+$RSYNC -VV | grep '"hardlink_specials": true' >/dev/null && CAN_HLINK_SPECIAL=yes || CAN_HLINK_SPECIAL=no
 
 mkdir "$fromdir"
 mkdir "$todir"
index 7c29f696c129331a6ca02c1ab3b724ea9618461e..c1c57c59a976f82e4c387d86f1eaa19c62a0772d 100644 (file)
@@ -25,7 +25,7 @@ ln "$fromdir/foo/config1" "$fromdir/foo/extra"
 rm -f "$to2dir"
 
 # Check if rsync is set to hard-link symlinks.
-if $RSYNC --version | grep "[, ] hardlink-symlinks" >/dev/null; then
+if $RSYNC -VV | grep '"hardlink_symlinks": true' >/dev/null; then
     L=hL
     sym_dots="$allspace"
     L_sym_dots=".L$allspace"
@@ -45,7 +45,7 @@ case "$RSYNC" in
     T=.T
     ;;
 *)
-    if $RSYNC --version | grep "[, ] symtimes" >/dev/null; then
+    if $RSYNC -VV | grep '"symtimes": true' >/dev/null; then
        T=.t
     else
        T=.T
index 455abef1b69dafeeabb03e92b8c59407df145eba..d94d5f9505bc6542c002d2264861f85c67c09ff2 100644 (file)
@@ -8,7 +8,7 @@
 . $suitedir/rsync.fns
 lnkdir="$tmpdir/lnk"
 
-$RSYNC --version | grep "[, ] xattrs" >/dev/null || test_skipped "Rsync is configured without xattr support"
+$RSYNC -VV | grep '"xattrs": true' >/dev/null || test_skipped "Rsync is configured without xattr support"
 
 case "$HOST_OS" in
 darwin*)