bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] incr08.at test fails if path to testsuit.dir/ includes symlink


From: Nathan Stratton Treadway
Subject: [Bug-tar] incr08.at test fails if path to testsuit.dir/ includes symlink
Date: Sun, 20 Mar 2016 17:22:46 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

In order to make room for the temp file used in sparse05.at, I replaced
.../tests/testsuite.dir/ with a symlink to a directory on another partition.
This did indeed allow sparse05.at to complete successfully... but turned
up an unrelated problem, causing incr08.at to fail.

Incr08.at is trying to test tar's handling of the situation when both a
relative path after a "-C" option and absolute paths are given as files
to add to the archive.

As it turns out, the test doesn't work correctly if the path to the
test's working directory contains a symlink, since then the path passed
as the absolute path on the test invocation doesn't match the normalized
path that tar generates internally for the relative path argument.

I found that the test succeeds for me under Linux if I change the
"DIR=`pwd`" line to say "DIR=`pwd -P`" instead... but I'm not sure how
portable that option is.

misc.c:normalize_filename() already contains a comment pointing out that
getting the absolute path doesn't work in all situations, so it may be
that rather than trying to fix incr08.at to work across a symlink path
it would make more sense to fix the internal operation of
normalize_filename (though presumably not in the v1.29 timeframe).  

I've attached the testsuite.log file from the incr08.at test (when it
failed).  Note that in this run, tar prints a "ABSPATH/foo: Directory
has been renamed from '.'" message, indicating that
find_directory_meta() in incremen.c:procdir() did notice that the two
directories were the same, though find_directory() did not.

                                                Nathan

----------------------------------------------------------------------------
Nathan Stratton Treadway  -  address@hidden  -  Mid-Atlantic region
Ray Ontko & Co.  -  Software consulting services  -   http://www.ontko.com/
 GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt   ID: 1023D/ECFB6239
 Key fingerprint = 6AD8 485E 20B9 5C71 231C  0C32 15F3 ADCD ECFB 6239

Attachment: gnutar_incr08.at_testsuite.log
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]