RRIP "RR" extension is obsolete; it appeared only early version of
RRIP standard. Do not use it for seenRockridge flag. Use other
RRIP extensions instead.
The 5th parameter of RRIP "PX" extension is not inode.
RRIP Standrd says that parameter, FILE SERIAL NUMBER, shall have the same
meaning as and may be used for the st_ino field of POSIX:5.6.1.
It can treat as inode but not value of inode of directories or files.
According to SUSP Stnadrd, SUSP "SP" extension must be recorded
in the root directory entry, so it has to be checked only once
and then disable all SUSP processing if not found.
Split a test mixed Joliet and Rock Ridge from test_read_format_isojoliet_bz2.c
and fix script that describes how to make test data for that test.
Remove test_read_format_isojolietrr_bz2.iso.bz2.uu which was wrong data;
access time of hardlinke file wasn't changed by touch command.
Add new test data test_read_format_isojoliet_rr.iso.bz2.uu instead.
Improve mixed Joliet and Rock Ridge extentions.
We can get uid,gid and other attributes which is recorded by Rock Ridge
extentions whether Joliet extentions recorded or not.
Fix reading the root directory; it did not read Rock Ridge extentions
of the one.
Allow longer Joliet names which is up to 103 UCS2 characters(206 bytes)
from 64 UCS2 characters(103 bytes). mkisofs can record that longer
Joliet names by their option -joliet-long.
Tim Kientzle [Thu, 1 Oct 2009 03:49:04 +0000 (23:49 -0400)]
Fix remaing bsdtar tests on Cygwin by treating Cygwin like Posix.
This does not (yet) implement the policies regarding path separators
that were recently hashed out on the libarchive-discuss mailing list.
Old mkisofs made wrong "SL" System User Entries of RRIP for
symbolic files.
New test iso image is made by latest mkisofs that bug is fixed.
Keep previous test data and Its test code because we need
to check that libarchive can handle that wrong iso images.
Tim Kientzle [Sat, 26 Sep 2009 18:02:14 +0000 (14:02 -0400)]
Rework how filenames get generated so I can spend less time
counting characters to try to make sense of failures.
Putting the sample filenames in a generated array removes a lot
of confusing code from the validation logic.
Tim Kientzle [Thu, 24 Sep 2009 15:16:11 +0000 (11:16 -0400)]
New Windows-only support to populate an archive entry from
a BY_HANDLE_FILE_INFORMATION structure (which is really
the Windows version of "struct stat").
Tim Kientzle [Thu, 24 Sep 2009 15:11:32 +0000 (11:11 -0400)]
Fix tar archiving of hardlinks on Windows: tree.c uses
Windows stat() call which doesn't actually provide
link count or inode values. Passing this data down into
libarchive (to avoid redundant stat() calls) meant that
hardlink detection simply failed on Windows. Until
I can work up something better, this simply avoids passing
stat() data from tree down into libarchive on Windows.
This allows libarchive to do the GetFileInfoByHandle
which provides useful information.
Tim Kientzle [Thu, 24 Sep 2009 15:06:56 +0000 (11:06 -0400)]
Use int64_t for storing inode values internally.
This fixes some hardlink-detection issues on Windows: NTFS uses 64-bit inode values, but Windows ino_t is only 16 bits.
Tim Kientzle [Mon, 14 Sep 2009 04:38:40 +0000 (00:38 -0400)]
Various fixes to symlink-related tests:
* canSymlink() is no longer hardwired to always return false
* cpio/test/test_gcpio_compat now has symlink-free test archives
for use on platforms that lack symlink support
* several other tests have slightly finer-grained avoidance of
checks that rely on symlink support
Tim Kientzle [Sat, 12 Sep 2009 18:08:48 +0000 (14:08 -0400)]
Merge cpio test refactorings into tar and libarchive test harnesses,
apply a few minor reorgs to further reduce diffs among the test
harnesses, update a bunch of tests to match the harness changes,
update some comments, rewrite the gzip/gunzip platform probes to the
new "canFoo()" style, sprinkle a few new symlink support checks. This
hasn't been tested on Windows yet, but should chip away a few more
test failures there.
Tim Kientzle [Sat, 12 Sep 2009 05:24:28 +0000 (01:24 -0400)]
Refactor hardlink/symlink support in test harness: we now have
assertIsHardlink() and assertIsNotHardlink(). On the symlink side,
I've added a run-time platform probe canSymlink() that tests the
local platform the first time it is called and remembers the result.
As an experiment, refactor test_basic.c to omit symlinks from the
tests if the current platform lacks symlink support.
Tim Kientzle [Fri, 11 Sep 2009 05:28:37 +0000 (01:28 -0400)]
Real hardlink detection on Windows (yes, Windows stat() really does seem to be that broken!). Also, expose the core hardlink test as a non-assertion so we can assert it false.
In particular, this fixes test_option_l on Windows.
Tim Kientzle [Fri, 11 Sep 2009 02:24:42 +0000 (22:24 -0400)]
Check whether platform permits filenames with control characters
before we try to actually test with one. In particular, this should
fix this test on Windows. (On platforms that permit control
characters in filenames, this test verifies that the -null option
really does treat LF characters as part of a filename instead of as a
line terminator.)
Even on platforms that don't support control characters, we can
test most of the line-parsing capabilities.
Charles Wilson [Thu, 10 Sep 2009 18:17:34 +0000 (14:17 -0400)]
Fix compiler warnings on MinGW with gcc-4.4.0
* tar/test/main.c (assertion_file_time): Silence 'var may
be used uninitialized' warning.
* cpio/test/main.c (assertion_file_time): Silence 'var may
be used uninitialized' warning.
* libarchive/test/main.c: Don't re-#define chdir.
(assertion_file_time): Silence 'var may be used uninitialized' warning.
Tim Kientzle [Thu, 10 Sep 2009 04:36:02 +0000 (00:36 -0400)]
Propagate the recent overhaul of libarchive/test/main.c to the tar and
cpio test suites, update run_all_tests to take advantage of the new
default test output.
Tim Kientzle [Tue, 8 Sep 2009 03:47:47 +0000 (23:47 -0400)]
Reading zip archives failed if you only gave
archive_read_support_format_zip() because of a bug in how the
read-ahead logic handled read(0) requests. Change the compat_zip test
to exercise this case and fix the underlying bug.
Tim Kientzle [Sun, 6 Sep 2009 06:44:40 +0000 (02:44 -0400)]
Add new assertions to verify atime, birthtime, and mtime, both
for exact values and "recent". Sketch in support for FreeBSD
(including high-res), Windows (including high-res and birthtime),
and generic POSIX.
Inspired in part by the discovery that stat() on Windows shifts mtime
values depending on DST settings, so the old code that used stat()
breaks in weird ways on Windows. GetFileTime() seems to not have this
problem, but using that requires that we not use stat().
Tim Kientzle [Sat, 5 Sep 2009 02:41:09 +0000 (22:41 -0400)]
Probe for CreateHardLinkW and use it only if it's found.
(Needed for MinGW, which doesn't have new enough Windows
headers to compile calls to CreateHardLinkW.)
Tim Kientzle [Thu, 3 Sep 2009 04:37:38 +0000 (00:37 -0400)]
Rename all externally visible shim functions to start with __la_ so
they don't conflict with "stat", etc, simulations that might be used
by various applications.
Tim Kientzle [Tue, 1 Sep 2009 01:34:07 +0000 (21:34 -0400)]
CreateHardLinkA is supported on Win2k and later, which is good
enough for now. (Plus, I was having inexplicable problems getting
the dynamic probe to work for this function.)
Tim Kientzle [Mon, 31 Aug 2009 04:43:36 +0000 (00:43 -0400)]
If the starting path isn't a pattern, then we don't feed it to FindFirstFile(), so we can't rely on FIND_FILE_DATA to determine whether it's a dir or not. So, add support for GetFileInformationByHandle(). This needs to be extended so that we use this info to fill the archive_entry instead of Windows' anemic stat() data.
Tim Kientzle [Mon, 31 Aug 2009 03:45:49 +0000 (23:45 -0400)]
We should only use FindFirstFile for the path provided on the command line if it actually has wildcard characters in it. Otherwise, we can use the same code used on Posix.