aboutsummaryrefslogtreecommitdiff
path: root/lib/libarchive/test/test.h
Commit message (Collapse)AuthorAgeFilesLines
* Use contrib sources for building libarchive, tar and cpio.Martin Matuska2011-12-221-302/+0
| | | | | | | | | Make "make test" fully operational. MFC after: 2 weeks Notes: svn path=/head/; revision=228797
* - Update libarchive to 2.8.4Martin Matuska2011-07-171-3/+4
| | | | | | | | | | | - Add support for extracting xar and rpm archives - Add libarchive_fe subdir (common code for tar and cpio) Approved by: kientzle MFC after: 2 weeks Notes: svn path=/head/; revision=224152
* A raft of test changes and improvements from the Googlecode repository.Tim Kientzle2009-12-301-61/+166
| | | | | | | | In particular, this includes tests for the new features I've merged over the last few days. Notes: svn path=/head/; revision=201247
* Merge r1032 from libarchive.googlecode.com:Tim Kientzle2009-04-271-11/+0
| | | | | | | | | | Make test_fuzz a bit more sensitive by actually reading the body of each entry instead of skipping it. While I'm here, move the "UnsupportedCompress" macro into the only file that still uses it. Notes: svn path=/head/; revision=191584
* Merge r1054,r1060 from libarchive.googlecode.com:Tim Kientzle2009-04-271-1/+1
| | | | | | | | * assertEqualMem() now takes void * arguments * Be a little smarter about what we hexdump when assertEqualMem() fails Notes: svn path=/head/; revision=191581
* Merge from libarchive.googlecode.com: Mostly a bunch ofTim Kientzle2009-04-121-4/+9
| | | | | | | | | | | | | | | | corrections to the Windows support to reconcile differences between Visual Studio and Cygwin. Includes parts of revisions 757, 774, 787, 815, 817, 819, 820, 844, and 886. Of particular note, r886 overhauled the UTF-8/Unicode conversions to work correctly regardless of whether the local system uses 16-bit or 32-bit wchar_t. (I assume that systems with 16-bit wchar_t use UTF-16 and those with 32-bit wchar_t use UCS-4.) This revision also added a preference for wcrtomb() (which is thread-safe) on platforms that support it. Notes: svn path=/head/; revision=190959
* Merge r335,653,676 from libarchive.googlecode.com: Instead ofTim Kientzle2009-03-071-0/+11
| | | | | | | | | | | | conditioning tests on HAVE_ZLIB, etc, just ask libarchive for the service and handle the failure coming back from libarchive. This gives us better test coverage of common client usage where clients simply try to use libarchive services and handle the errors coming back instead of trying to second-guess which libarchive services are compiled in. Notes: svn path=/head/; revision=189482
* Merge r280,281,496,595,675,712 from libarchive.googlecode.com: VariousTim Kientzle2009-03-071-0/+3
| | | | | | | | | test improvements, including some work on Windows compatibility and an extra check to verify that no test leaves open file descriptors around. Notes: svn path=/head/; revision=189481
* Merge r714,r715 from libarchive.googlecode.com: Fix Debian bug #516577.Tim Kientzle2009-03-071-0/+2
| | | | | | | | Don't crash if client does not provide a skip function. Extend one of the test cases to use archive_read_open2() with only a read callback. Notes: svn path=/head/; revision=189472
* Merge r435,r443 from libarchive.googlecode.com: Read config files fromTim Kientzle2009-03-061-3/+3
| | | | | | | include path; this makes it easier to support multiple build frameworks. Notes: svn path=/head/; revision=189432
* Merge r341,r345,r346,347 from libarchive.googlecode.com: StyleTim Kientzle2009-03-051-0/+1
| | | | | | | | fixes to test harness and a few extra guards to detect tests that can't succeed on certain platforms. Notes: svn path=/head/; revision=189381
* Merge r294:337,r348:350 from libarchive.googlecode.com: A lotTim Kientzle2009-03-031-0/+14
| | | | | | | of work to make libarchive work on Windows. Notes: svn path=/head/; revision=189308
* MfP4: test harness improvements.Tim Kientzle2008-06-151-16/+23
| | | | Notes: svn path=/head/; revision=179798
* Portability: Eliminate the need for uudecode by incorporatingTim Kientzle2008-03-121-12/+10
| | | | | | | | | | | | uudecode into the main test driver and invoking it just-in-time within the various tests. Also, incorporate a number of improvements to the main test support code that have proven useful on other projects where I've used this framework. Notes: svn path=/head/; revision=177084
* The test_assert() function that backs my custom assert() macroTim Kientzle2008-02-191-2/+5
| | | | | | | | | | | | | | | now returns a value, which supports such convenient constructs as: if (assert(NULL != foo())) { } Also be careful to setlocale("C") for each new test to avoid locale pollution. Also a couple of minor portability enhancements. Notes: svn path=/head/; revision=176401
* Extensive improvements to the libarchive_test test program thatTim Kientzle2008-01-011-40/+64
| | | | | | | | | | | | | | | | | | | | | | | | | exercises and verifies the libarchive APIs: * Improved error reporting; hexdumps are now provided for many file/memory content differences. * Overall status more clearly counts "tests" and "assertions" * Reference files can now be stored on disk instead of having to be compiled into the test program itself. A couple of tests have been converted to this more natural structure. * Several memory leaks corrected so that leaks within libarchive itself can be more easily detected and diagnosed. * New test: GNU tar compatibility * New test: Zip compatibility * New test: Zero-byte writes to a compressed archive entry * New test: archive_entry_strmode() format verification * New test: mtree reader * New test: write/read of large (2G - 1TB) entries to tar archives (thanks to recent performance work, this test only requires a few seconds) * New test: detailed format verification of cpio odc and newc writers * Many minor additions/improvements to existing tests as well. Notes: svn path=/head/; revision=175044
* Report each failed test once, but keep a count and report that countTim Kientzle2007-07-141-1/+11
| | | | | | | | | | if there was more than one. In particular, this simplifies test_tar_filenames.c, which has a tendency to be very noisy otherwise. Approved by: re (blanket, libarchive testing) Notes: svn path=/head/; revision=171443
* New file "read_open_memory.c" is a custom variant ofTim Kientzle2007-07-131-0/+3
| | | | | | | | | | | | archive_read_open_memory.c that tries to test border cases. In particular, it copies over each returned block so that formats or decompressors that read past the end of a returned block will break. Approved by: re (blanket, libarchive test suite) Notes: svn path=/head/; revision=171429
* Make test suite work with libarchive 1.3.1: Take advantage ofTim Kientzle2007-07-061-0/+13
| | | | | | | | | | | | | | | | ARCHIVE_VERSION_STAMP to selectively disable tests that don't apply to that version; new "skipping()" function reports skipped tests; modify final summary to report component test failures and skips. Note: I don't currently intend to MFC the test suite itself; anyone interested should just checkout and use this version of the test suite, which should work for any library version. Approved by: re (Ken Smith, blanket) Notes: svn path=/head/; revision=171280
* libarchive 2.2.3Tim Kientzle2007-05-291-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * "compression_program" support uses an external program * Portability: no longer uses "struct stat" as a primary data interchange structure internally * Part of the above: refactor archive_entry to separate out copy_stat() and stat() functions * More complete tests for archive_entry * Finish archive_entry_clone() * Isolate major()/minor()/makedev() in archive_entry; remove these from everywhere else. * Bug fix: properly handle decompression look-ahead at end-of-data * Bug fixes to 'ar' support * Fix memory leak in ZIP reader * Portability: better timegm() emulation in iso9660 reader * New write_disk flags to suppress auto dir creation and not overwrite newer files (for future cpio front-end) * Simplify trailing-'/' fixup when writing tar and pax * Test enhancements: fix various compiler warnings, improve portability, add lots of new tests. * Documentation: document new functions, first draft of libarchive_internals.3 MFC after: 14 days Thanks to: Joerg Sonnenberger (compression_program) Thanks to: Kai Wang (ar) Thanks to: Colin Percival (many small fixes) Thanks to: Many others who sent me various patches and problem reports. Notes: svn path=/head/; revision=170079
* Libarchive 2.0.23:Tim Kientzle2007-03-111-0/+8
| | | | | | | | | | | | | | | * The ACL formatter was mis-formatting entries which had a user/group ID but no name. Make the parser tolerant of these, so that old archives can be correctly restored; fix the formatter to generate correct entries. * Fix overwrite detection by introducing a new "FAILED" return code that indicates the current entry cannot be continued but the archive as a whole is still sound. * Header cleanup: Remove some unused headers, add some that are required with new Linux systems. Notes: svn path=/head/; revision=167449
* libarchive 2.0Tim Kientzle2007-03-031-0/+89
* libarchive_test program exercises many of the core features * Refactored old "read_extract" into new "archive_write_disk", which uses archive_write methods to put entries onto disk. In particular, you can now use archive_write_disk to create objects on disk without having an archive available. * Pushed some security checks from bsdtar down into libarchive, where they can be better optimized. * Rearchitected the logic for creating objects on disk to reduce the number of system calls. Several common cases now use a minimum number of system calls. * Virtualized some internal interfaces to provide a clearer separation of read and write handling and make it simpler to override key methods. * New "empty" format reader. * Corrected return types (this ABI breakage required the "2.0" version bump) * Many bug fixes. Notes: svn path=/head/; revision=167186