Bug 10179 - massive test failure on OSX 10.8.5 under Homebrew
Summary: massive test failure on OSX 10.8.5 under Homebrew
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.1.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
Depends on:
Reported: 2013-10-02 23:37 UTC by chdiza
Modified: 2013-10-27 17:02 UTC (History)
0 users

See Also:

output of "make check" (10.30 KB, application/octet-stream)
2013-10-02 23:37 UTC, chdiza
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description chdiza 2013-10-02 23:37:19 UTC
Created attachment 9248 [details]
output of "make check"

rsync 3.1.0 builds fine on OSX 10.8.5, unless one installs it using Homebrew (an OSX package manager).  The bug, however, is with rsync.  Starting with 3.1.0, if the "scratchbasedir" has a hyphen in the name--- as in "scratchbase=/private/tmp/-gRfP/rsync-3.1.0/testtmp", which is what I see in the output of "make check"--- then there will be massive test failure.  This seems to be because the hyphen is being interpreted as starting a flag to the "cd" command, and the character after the hyphen is being interpreted as the flag.  You can see this for example in this line:

Testing for symlinks using 'test -h'
        makepath /private/tmp/-gRfP/rsync-3.1.0/testtmp/backup/from/deep
/private/tmp/-gRfP/rsync-3.1.0/testsuite/rsync.fns: line 197: cd: -g: invalid option

I've attached the entire output from "make check".

Note that when I tried it again under Homebrew (Homebrew is what's setting the name of the temp dir), it generated a different random temp dir name "/private/tmp/-yqG7/rsync-3.1.0/".  I got the same test failures, only this time they complain "cd: -y: invalid option".

This is not Homebrew's fault; that's how they've done temp dir names all along, and rsync 3.0.9 under Homebrew works fine without any of this test failure.  Something in rsync's (3.1.0) test suite is choking on the hyphen the beings a dirname.
Comment 1 chdiza 2013-10-03 02:54:49 UTC
I apologize: it turns out that it IS homebrew's fault, and they just fixed it.

The reason it always worked before is because they used to not have temp dirs that start with hyphens; that only happened very recently.

It's probably a good idea to be able to handle such weird names anyway.  So this is now a suggestion rather than a bug report.

Again, apologies.