summaryrefslogtreecommitdiffstats
path: root/lib/libarchive/test/main.c
Commit message (Collapse)AuthorAgeFilesLines
* - Update libarchive to 2.8.4mm2011-07-171-1/+17
| | | | | | | | - 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
* A raft of test changes and improvements from the Googlecode repository.kientzle2009-12-301-550/+1433
| | | | | In particular, this includes tests for the new features I've merged over the last few days.
* Merge r1054,r1060 from libarchive.googlecode.com:kientzle2009-04-271-5/+18
| | | | | * assertEqualMem() now takes void * arguments * Be a little smarter about what we hexdump when assertEqualMem() fails
* Merge lots of test suite updates from libarchive.googlecode.com.kientzle2009-04-171-55/+93
|
* Merge from libarchive.googlecode.com: Mostly a bunch ofkientzle2009-04-121-6/+6
| | | | | | | | | | | | | 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.
* Fix spelling.kientzle2009-03-071-2/+2
|
* Merge r280,281,496,595,675,712 from libarchive.googlecode.com: Variouskientzle2009-03-071-5/+59
| | | | | | test improvements, including some work on Windows compatibility and an extra check to verify that no test leaves open file descriptors around.
* Merge r420,r494 from libarchive.googlecode.com: Prettify the testkientzle2009-03-061-5/+1
| | | | | harness a bit: remove a dead comment, tweak the wording of the summary report.
* Merge r386,r395,r451 from libarchive.googlecode.com: On Windows, breakkientzle2009-03-051-0/+6
| | | | | | into the debugger on test setup failures (otherwise, the console window just goes away and you can't see what went wrong). On all platforms, clean up a stray buffer before exiting.
* Merge r362 from libarchive.googlecode.com: Minor fix tokientzle2009-03-051-2/+3
| | | | custom argument parser.
* Merge r341,r345,r346,347 from libarchive.googlecode.com: Stylekientzle2009-03-051-1/+8
| | | | | fixes to test harness and a few extra guards to detect tests that can't succeed on certain platforms.
* Merge r294:337,r348:350 from libarchive.googlecode.com: A lotkientzle2009-03-031-48/+85
| | | | of work to make libarchive work on Windows.
* Teach get_refdir() about FreeBSD's /usr/obj convention.kientzle2008-12-211-34/+45
| | | | | | In development, I run libarchive_test frequently by hand and it gets tedious having to specify a suitable -r path all of the time.
* Fill in a missing constkientzle2008-12-171-1/+1
|
* Obey the TMPDIR, TMP, TEMP, or TEMPDIR environment variableskientzle2008-12-081-1/+14
| | | | | when choosing a scratch directory for the tests. Fallback to "/tmp", of course.
* Make libarchive_test a little smarter about trying to findkientzle2008-08-311-11/+52
| | | | | | its reference files when you don't specify -r. It now checks a couple of likely nearby directories to see if any of them have a particular known file.
* MfP4: test harness improvements.kientzle2008-06-151-3/+48
|
* MFp4: libarchive 2.5.4b. (Still 'b' until I get a bit morekientzle2008-05-261-21/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | feedback, but the 2.5 branch is shaping up nicely.) In addition to many small bug fixes and code improvements: * Another iteration of versioning; I think I've got it right now. * Portability: A lot of progress on Windows support (though I'm not committing all of the Windows support files to FreeBSD CVS) * Explicit tracking of MBS, WCS, and UTF-8 versions of strings in archive_entry; the archive_entry routines now correctly return NULL only when something is unset, setting NULL properly clears string values. Most charset conversions have been pushed down to archive_string. * Better handling of charset conversion failure when writing or reading UTF-8 headers in pax archives * archive_entry_linkify() provides multiple strategies for hardlink matching to suit different format expectations * More accurate bzip2 format detection * Joerg Sonnenberger's extensive improvements to mtree support * Rough support for self-extracting ZIP archives. Not an ideal approach, but it works for the archives I've tried. * New "sparsify" option in archive_write_disk converts blocks of nulls into seeks. * Better default behavior for the test harness; it now reports all failures by default instead of coredumping at the first one.
* Portability: Eliminate the need for uudecode by incorporatingkientzle2008-03-121-41/+210
| | | | | | | | | 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.
* The test_assert() function that backs my custom assert() macrokientzle2008-02-191-7/+7
| | | | | | | | | | | | 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.
* Extensive improvements to the libarchive_test test program thatkientzle2008-01-011-54/+353
| | | | | | | | | | | | | | | | | | | | | | 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.
* Two minor nits:kientzle2007-07-311-0/+7
| | | | | | | | * Allow libarchive_test to compile on Interix again. * Track the test name (not just line number) when counting skipped tests. Thanks to: Joerg Sonnenberger Approved by: re (blanket; libarchive testing)
* Report each failed test once, but keep a count and report that countkientzle2007-07-141-6/+97
| | | | | | | 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)
* Fix running individual tests via "libarchive_test <number> <number> ..."kientzle2007-07-131-1/+2
| | | | Approved by: re (blanket)
* Make test suite work with libarchive 1.3.1: Take advantage ofkientzle2007-07-061-11/+32
| | | | | | | | | | | | | 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)
* Add some options to libarchive_test:kientzle2007-06-131-12/+50
| | | | | -k: like make -k, try to keep going after errors. -q: quiet
* libarchive 2.2.3kientzle2007-05-291-51/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * "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.
* Portability: Don't use mkdtemp() when mkdir() will suffice.kientzle2007-04-141-2/+2
| | | | If we can't create the dir, just give up.
* libarchive 2.0kientzle2007-03-031-0/+168
* 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.
OpenPOWER on IntegriCloud