Fixed the hard-linking of symlinks test (we need to use a symlink
authorWayne Davison <wayned@samba.org>
Fri, 10 Nov 2006 07:49:02 +0000 (07:49 +0000)
committerWayne Davison <wayned@samba.org>
Fri, 10 Nov 2006 07:49:02 +0000 (07:49 +0000)
to a non-existent file for the test to work right).

testsuite/itemize.test

index fb1f318..ddb8c68 100644 (file)
@@ -27,8 +27,13 @@ umask 022
 ln "$fromdir/foo/config1" "$fromdir/foo/extra"
 
 # Check if the OS can hard-link symlinks or not
-ln "$fromdir/foo/sym" "$fromdir/foo/sym.test" && L=hL || L=cL
-rm -f "$fromdir/foo/sym.test"
+ln -s no-such-dir "$to2dir"
+if ln "$to2dir" "$to2dir.test" 2>/dev/null; then
+    L=hL
+else
+    L=cL
+fi
+rm -f "$to2dir" "$to2dir.test"
 
 $RSYNC -iplr "$fromdir/" "$todir/" \
     | tee "$outfile"