Tim Kientzle [Sun, 26 Jul 2009 04:12:29 +0000 (00:12 -0400)]
Merge various test framework improvements across the various
test harnesses. In particular, there have been a few spot
changes to improve Windows support.
Tim Kientzle [Sun, 26 Jul 2009 02:59:29 +0000 (22:59 -0400)]
Provide assertMakeDir() for tests to use instead of raw mkdir(). In particular, this allows us to hide the difference between POSIX two-argument mkdir() and Windows single-argument version.
Charles Wilson [Tue, 21 Jul 2009 04:54:01 +0000 (00:54 -0400)]
Minor MinGW fixes.
* bsdtar_windows.h: ensure struct bsdtar and struct archive are forward
declared before declaring functions that take pointers to those types.
Charles Wilson [Tue, 21 Jul 2009 04:52:25 +0000 (00:52 -0400)]
Minor MinGW fixes.
* bsdtar_windows.h: New MinGW already defines PRId64; guard it.
Ensure we have definition of MAX_PATH in time, by including windows.h.
Charles Wilson [Tue, 21 Jul 2009 04:43:29 +0000 (00:43 -0400)]
[MinGW/MSVC] Use correct types for (replacement) uid_t and git_d
The st_uid and st_gid fields in struct stat are shorts, not unsigned
int nor (regular) int for MinGW (and, AFAICT, for MSVC as well).
However, neither platform defines uid_t or gid_t, but AC_TYPE_UID_T
defaults to "int" in that case, and the current defaults for __LA_UID_T
and __LA_GID_T in archive.h and archive_entry.h are "unsigned int". On
MinGW these ('int' and 'unsigned int') do not match each other, and they
certainly do not match 'short'. Fix it.
* build/autoconf/la_uid_t.m4: New file defines la_TYPE_UID_T replacement
macro for AC_TYPE_UID_T.
* configure.ac: Use it.
* libarchive/archive.h [_WIN32]: Use correct default values for
__LA_GID_T and __LA_GID_T.
* libarchive/archive_entry.h [_WIN32]: Ditto.
* libarchive/archive_write_set_format_pax.c (archive_write_pax_header):
Avoid size-of-comparison warnings when uid_t/gid_t have less than 18 bits.
Tim Kientzle [Sun, 19 Jul 2009 07:57:34 +0000 (03:57 -0400)]
Sort short option list, fill in missing -I option, update
manpage options to include -0, -J, -j, -lzma, and -h.
Since Windows no longer tries to automatically turn on ownership
restore, we need --preserve-owner to allow users to manually
turn it on.
Tim Kientzle [Sun, 19 Jul 2009 07:20:51 +0000 (03:20 -0400)]
Remove the attempt to determine "root" for Windows.
It's not really feasible and just gets weirder the longer
we look at it. We now assume different defaults only
for the root user on non-Windows systems.
Tim Kientzle [Sat, 18 Jul 2009 05:13:51 +0000 (01:13 -0400)]
More simplification of the seek/truncate logic:
1) We don't actually need to truncate; seek is enough.
2) The Windows code doesn't need to be more paranoid than the Posix code.
Tim Kientzle [Fri, 17 Jul 2009 03:35:08 +0000 (23:35 -0400)]
Rename test_option_T to test_option_T_upper, following a pattern
established by bsdcpio_test for ensuring that test cases don't
cause problems on case-insensitive filesystems.
Tim Kientzle [Fri, 17 Jul 2009 01:21:18 +0000 (21:21 -0400)]
Overhaul the SIGINFO/SIGUSR1 reporting. This is a little
simpler and gives a lot more information. In particular,
it reports total bytes in/out, total files and compression
ratio, in addition to reporting the current file being processed.
Charles Wilson [Fri, 10 Jul 2009 19:45:33 +0000 (15:45 -0400)]
Testsuite fixes for cygwin-1.5
* configure.ac: Detect cygwin-1.7.
* tar/test/test_copy.c: Better tuning for long filename tests.
NOTE: this change causes a new cygwin-1.7 failure, but that is
actually a bug in the current cygwin-1.7 beta:
http://cygwin.com/ml/cygwin/2009-07/msg00386.html
It's assumed this will be fixed in cygwin, soon.
Tim Kientzle [Thu, 2 Jul 2009 04:17:34 +0000 (00:17 -0400)]
Support decimal uid/gid when parsing -R/--owner option.
Extend existing test to cover new functionality.
Rework this test slightly to reduce conditionals for Cygwin.
Tim Kientzle [Sun, 28 Jun 2009 08:08:04 +0000 (04:08 -0400)]
cpio doesn't need set_fmode(O_BINARY) any more so we can remove it.
Also, fix up the uid/gid formatting to work properly on Windows (whose printf() functions don't support ISO C99).
Tim Kientzle [Sat, 27 Jun 2009 03:48:20 +0000 (23:48 -0400)]
On Windows, set _O_BINARY on filehandles passed in from clients.
This should eliminate the need for clients to take special
measures to get correct binary handling.
Colin Percival [Sun, 21 Jun 2009 05:09:55 +0000 (01:09 -0400)]
Clear any warning/error messages set by archive_read_support_compression_*
functions, since we're ignoring their return codes. This eliminates the
weird behaviour of printing "Using external unxz program for xz
decompression" if an unrelated error occurs when opening an archive (due
to the message lingering in the error message buffer).
Tim Kientzle [Mon, 15 Jun 2009 01:48:29 +0000 (21:48 -0400)]
Fix a bunch of tests on Visual Studio:
* detect bzip2 unavailability and skip those tests
* Now that we have better handling for missing compression,
test_fuzz doesn't need to test whether it can handle
a file before it tries fuzzing it.
* Change off_t to int64_t for a lot of internal vars
to support VS 32-bit off_t; since we can't change
the external client_skip interface until libarchive 3.0,
just limit forward skips until then.
Tim Kientzle [Sun, 14 Jun 2009 17:46:29 +0000 (13:46 -0400)]
When building out the read filter pipeline, ask each filter
for some data after we initialize it. This catches filter
startup failures (such as errors forking an external program)
at open time. Adjust one test that now sees an error earlier.
Tim Kientzle [Sun, 14 Jun 2009 05:37:44 +0000 (01:37 -0400)]
Switch the tar test suite to use stdio (FILE *, fopen, etc)
instead of Unix I/O calls (open()/read()/write()). This
is partly to address some portability issues---I want to
minimize platform-specific code in the test suites---and
partly because there isn't a compelling argument for using
Unix I/O calls in the test suites (unlike libarchive itself,
which does have specific requirements that require the
use of Unix I/O instead of stdio).
After this is tested on more platforms, I hope to apply similar
changes to the cpio and libarchive test suites.