Rsync folks: I couldn't get the ssh tests to work in rsync 2.5.6 and it doesn't appear that they ever could have worked. There were two problems with the script I noticed: 1) The "from" directory is never populated with files to test. It looked like the "hands_setup" function from rsync.fns was designed for this, so I added it in. 2) The "F1" variable used to pick a random(?) file to rename in order to check rsync's ability to find differences was never set. This means that the following "mv" command would fail since it would try to move a directory into a subdirectory of itself. Attached in MIME format is the patch I used to fix the problem. (Patch is against current CVS version) -- Steve Bonds PS: Just in case your lawyers care, I release this code into the public domain and claim no copyright. -------------- next part -------------- Index: testsuite/ssh-basic.test ==================================================================RCS file: /cvsroot/rsync/testsuite/ssh-basic.test,v retrieving revision 1.5 diff -u -r1.5 ssh-basic.test --- testsuite/ssh-basic.test 22 Mar 2002 06:07:50 -0000 1.5 +++ testsuite/ssh-basic.test 3 Feb 2003 20:02:44 -0000 @@ -23,7 +23,20 @@ test_skipped "Skipping SSH tests because ssh conection to localhost not authorised" fi +# Added by Steve Bonds Feb 2 2003 +# Without this, there are no files in the ${FROM} directory, so rsync has +# nothing to do. +hands_setup + runtest "ssh: basic test" 'checkit "$RSYNC -avH -e ssh --rsync-path=$RSYNC ${FROM}/ localhost:${TO}" ${FROM}/ ${TO}' + +# Added by Steve Bonds Feb 2 2003 +# I assumed that "F1" was intended to hold a single file for testing if +# rsync could detect a renamed file over ssh. Without this line below +# it was unset so the "mv" tried to move a parent directory into a +# subdirectory of itself. There is probably a better way of pulling out +# a sample file to rename. +F1=`ls ${TO} | head -5 | tail -1` mv ${TO}/${F1} ${TO}/ThisShouldGo