Shprentz, Joel [C]
2002-Oct-08 18:23 UTC
Some tests fail if rsync is not on path (with patch)
While installing rsync on a new Sun Netra running Solaris 2.8, two tests (chgrp and hardlinks) failed. I found that these tests execute rsync while other successfull tests exectute $RSYNC. It is fortunate that my shell path was quite restricted and that no earlier version of rsync was installed on my path. The system would have run the chgrp and hardlinks tests with an earlier rsync if it had found one on my path. The fix is to replace rsync with $RSYNC in the two tests. With those changes, all tests pass. Context diffs follow: *** testsuite/chgrp.test.orig Tue Oct 8 11:16:33 2002 --- testsuite/chgrp.test Tue Oct 8 11:16:48 2002 *************** *** 31,37 **** done sleep 2 ! checkit "rsync -rtgvvv \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir" exit 0 # last [] may have failed but if we get here then we've won --- 31,37 ---- done sleep 2 ! checkit "$RSYNC -rtgvvv \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir" exit 0 # last [] may have failed but if we get here then we've won *** testsuite/hardlinks.test.orig Tue Oct 8 11:18:46 2002 --- testsuite/hardlinks.test Tue Oct 8 11:19:00 2002 *************** *** 31,37 **** ln "$name2" "$name3" || fail "Can't create hardlink" cp "$name2" "$name4" || fail "Can't copy file" ! checkit "rsync -aHvv \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir" exit 0 # last [] may have failed but if we get here then we've won --- 31,37 ---- ln "$name2" "$name3" || fail "Can't create hardlink" cp "$name2" "$name4" || fail "Can't copy file" ! checkit "$RSYNC -aHvv \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir" exit 0 # last [] may have failed but if we get here then we've won -- Joel Shprentz National Imagery and Mapping Agency Mailstop N-17 Washington Navy Yard, Building 213 1200 First Street, SE Washington, DC 20303-0001 202-685-3534
Fyi, I just committed the patch below to CVS. However, it appears the test scripts don't use $RSYNC consistently. The scripts still use $rsync_bin and (worse) rsync in some places. $rsync_bin is set in the top-level Makefile and rsync.fns sets $RSYNC to $rsync_bin. For consistency's sake, should we not change all of these to either $RSYNC or $rsync_bin? I'm wiling to do the work. Jos On Tue, Oct 08, 2002 at 02:21:10PM -0400, Shprentz, Joel [C] wrote:> While installing rsync on a new Sun Netra running Solaris 2.8, two tests > (chgrp and hardlinks) failed. > > I found that these tests execute rsync while other successfull tests > exectute $RSYNC. It is fortunate that my shell path was quite restricted > and that no earlier version of rsync was installed on my path. The system > would have run the chgrp and hardlinks tests with an earlier rsync if it had > found one on my path. > > The fix is to replace rsync with $RSYNC in the two tests. With those > changes, all tests pass. > > Context diffs follow: > > *** testsuite/chgrp.test.orig Tue Oct 8 11:16:33 2002 > --- testsuite/chgrp.test Tue Oct 8 11:16:48 2002 > *************** > *** 31,37 **** > done > sleep 2 > > ! checkit "rsync -rtgvvv \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir" > > exit 0 > # last [] may have failed but if we get here then we've won > --- 31,37 ---- > done > sleep 2 > > ! checkit "$RSYNC -rtgvvv \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir" > > exit 0 > # last [] may have failed but if we get here then we've won > > > > *** testsuite/hardlinks.test.orig Tue Oct 8 11:18:46 2002 > --- testsuite/hardlinks.test Tue Oct 8 11:19:00 2002 > *************** > *** 31,37 **** > ln "$name2" "$name3" || fail "Can't create hardlink" > cp "$name2" "$name4" || fail "Can't copy file" > > ! checkit "rsync -aHvv \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir" > > exit 0 > # last [] may have failed but if we get here then we've won > --- 31,37 ---- > ln "$name2" "$name3" || fail "Can't create hardlink" > cp "$name2" "$name4" || fail "Can't copy file" > > ! checkit "$RSYNC -aHvv \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir" > > exit 0 > # last [] may have failed but if we get here then we've won > > -- > > Joel Shprentz > National Imagery and Mapping Agency > Mailstop N-17 > Washington Navy Yard, Building 213 > 1200 First Street, SE > Washington, DC 20303-0001 > > 202-685-3534 > > > -- > To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync > Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html >-- Jos Backus _/ _/_/_/ Sunnyvale, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ jos at catnook.com _/_/ _/_/_/ require 'std/disclaimer'
Reasonably Related Threads
- PATCH: Fix IRIX 6 testsuite failures
- [PATCH] make test patch.
- rsync-2.5.5rc1: two problems on Apple Darwin (== MacOS X)
- Using rsync for a backup program but having trouble getting --exclude-from to work properly
- Cannot get the syntax of --include-from right