Subject: Re: bug#15173: [PATCH] cp: with --link always use linkat() if available

From: Pádraig Brady <[email-masked]>
Date: Fri, 13 Dec 2013 01:06:24 +0000

On 12/13/2013 12:51 AM, Bernhard Voelker wrote:
> On 12/13/2013 12:11 AM, Pádraig Brady wrote:
>> So while the above patch is probably correct, it's slightly risky
>> at this stage before a release.  Also the benefits are minimal as
>> the existing symlink to symlink emulation should be fine on the mentioned systems.
>>
>> Therefore I'll go with the attached patch which fixes the test to run
>> on all platforms. The test failed on freebsd, aix and solaris previously,
>> and I've confirmed it now passes on all those.
> 
> Unfortunately, I didn't have time to look into the details of this
> issue.  As I understood your comment, it is not a FP in the tests but
> rather an issue in copy.c on these platforms.

It's a minor issue in copy.c on some of these platforms (with HAVE_LINKAT).
Improving that would make the test pass on FreeBSD for example, but
we can leave that until the next release.

The main issue is the test expected hardlinks to symlinks to be
always done by cp --link, so the added guard is needed in any case.

> I'm fine with the proposed patch for the time being, i.e. to NOP out
> some test cases to avoid FPs- but it then would probably make sense
> to document the varying behavior, at least in a FIXME in the test.

thanks for the review,
Pádraig.