aboutsummaryrefslogtreecommitdiff
path: root/lib/libarchive/test
Commit message (Collapse)AuthorAgeFilesLines
* Integrate the tests from lib/libarchive, usr.bin/cpio, and usr.bin/tar in toEnji Cooper2015-10-121-256/+0
| | | | | | | | | | | | | | | | | | | | | the FreeBSD test suite functional_test.sh was ported from bin/sh/tests/functional_test.sh, as a small wrapper around libarchive_test, bsdcpio_test, and bsdtar_test provided by upstream. A handful of testcases in lib/libarchive/tests have been disabled as they were failing when run with kyua test (see BROKEN_TESTS in lib/libarchive/tests/Makefile) As a sidenote: this removes the check/test targets from the Makefiles as they don't match the pattern used in the rest of the FreeBSD test suite. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289195
* MFV r285970:Bryan Drewery2015-07-281-0/+1
| | | | | | | | | | | | | Apply upstream changeset bf4f6ec64e: Fix issue 356: properly skip a sparse file entry in a tar file. PR: 201506 MFC after: 3 days Relnotes: yes Notes: svn path=/head/; revision=285972
* Convert libraries to use LIBADDBaptiste Daroussin2014-11-251-2/+1
| | | | | | | While here reduce a bit overlinking Notes: svn path=/head/; revision=275024
* NO_MAN= has been deprecated in favor of MAN= for some time, go aheadWarner Losh2014-04-131-1/+1
| | | | | | | | | and finish the job. ncurses is now the only Makefile in the tree that uses it since it wasn't a simple mechanical change, and will be addressed in a future commit. Notes: svn path=/head/; revision=264400
* MFV r248590,248594:Martin Matuska2013-03-221-10/+47
| | | | | | | | | | | | | | Update libarchive to 3.1.2 Some of new features: - support for lrzip and grzip compression - support for writing tar v7 format - b64encode and uuencode filters - support for __MACOSX directory in Zip archives - support for lzop compresion (external utility) Notes: svn path=/head/; revision=248616
* Backport NFSv4 ACL fix from libarchive master branch.Martin Matuska2012-07-301-1/+2
| | | | | | | | | | Source: https://github.com/libarchive/libarchive/commit/f67370d5 Obtained from: libarchive (master branch) Notes: svn path=/head/; revision=238909
* Update libarchive to 3.0.4Martin Matuska2012-07-281-0/+5
| | | | Notes: svn path=/head/; revision=238856
* Update libarchive to 3.0.3Martin Matuska2012-02-251-4/+63
| | | | | | | | | | | | | | | | | Some of new features: - New readers: RAR, LHA/LZH, CAB reader, 7-Zip - New writers: ISO9660, XAR - Improvements to many formats, especially including ISO9660 and Zip - Stackable write filters to write, e.g., tar.gz.uu in a single pass - Exploit seekable input; new "seekable" Zip reader can exploit the Zip Central Directory when it's available; the old "streamable" Zip reader is still fully supported for cases where seeking is not possible. Full release notes available at: https://github.com/libarchive/libarchive/wiki/ReleaseNotes Notes: svn path=/head/; revision=232153
* Use contrib sources for building libarchive, tar and cpio.Martin Matuska2011-12-22155-31042/+20
| | | | | | | | | Make "make test" fully operational. MFC after: 2 weeks Notes: svn path=/head/; revision=228797
* Update libarchive, tar and cpio to version 2.8.5Martin Matuska2011-12-203-5/+5
| | | | | | | | | | | | | The following additional vendor revisions are applied: Revision 3740: Use archive_clear_error() to clear the error markers. Obtained from: http://code.google.com/p/libarchive MFC after: 2 weeks Notes: svn path=/head/; revision=228745
* Import bugfix for reading and extracting of FreeBSD ISO images with tar.Martin Matuska2011-08-258-26/+112
| | | | | | | | | | | | | | | | | | | | | | | Upstream revision 3645 (merge of 3642): Change the mechanism handling a rr_moved directory, which is Rockridge extension that can exceed the limitation of a maximum directory depth of ISO 9660. - Stop reading all entries at a time. - Connect "CL" entry to "RE" entry dynamically, which "CL" and "RE" have information to rebuild a full directory tree. - Tweak some related tests since we use Headsort for re-ordering entries and it cannot make a steady order when the keies of the entries are the same. http://code.google.com/p/libarchive/issues/detail?id=168 Reviewed by: kientzle Approved by: re (kib) Obtained from: libarchive (release/2.8, svn rev 3645) MFC after: 3 days Notes: svn path=/head/; revision=225167
* Add compatibility for ISO images created with unfixed makefs thatMartin Matuska2011-08-075-2/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | violated ECMA-119 (ISO9660): allow reserved4 to be 0x20 in PVD. This allows tar to read FreeBSD distribution ISO images created with makefs prior to NetBSD bin/45217 bugfix (up to 9.0-BETA1). In addition, merge following important bugfixes from libarchive's release/2.8 branch: Revision 2812: Merge 2811 from trunk: Don't try to verify that compression-level=0 produces larger results than the default compression, since this isn't true for all versions of liblzma. Revision 2817: Merge 2814 from trunk: Fix Issue 121 (mtree parser error) http://code.google.com/p/libarchive/issues/detail?id=121 Revision 2820: Fix issue 119. Change the file location check that a file location does not exceed volume block. New one is that a file content does not exceed volume block(end of an ISO image). It is better than previous check even if the issue did not happen. While reading an ISO image generated by an older version of mkisofs utility, a file location indicates the end the ISO image if its file size is zero and it is the last file of all files of the ISO image, so it is possible that the location value is the same as the number of the total block of the ISO image. http://code.google.com/p/libarchive/issues/detail?id=119 Revision 2955: Issue 134: Fix libarchive 2.8 crashing in archive_write_finish() when the open has failed and we're trying to write Zip format. http://code.google.com/p/libarchive/issues/detail?id=134 Revision 2958: Followup on Issue 134: 1) Port test_open_failure to libarchive 2.8 branch to test the problem reported in Issue 134. This test also shows that archive_read_open() sometimes fails to report open errors correctly. 2) Fix the bug in archive_read.c 3) Comment out the tests that close functions are invoked promptly when open fails; that's fully fixed in libarchive 3.0, but I don't think it's worth fixing here. Revision 3484: Use uintmax_t with %ju Revision 3487: Fix issue 163. Correctly allocate enough memory for a input buffer saved. http://code.google.com/p/libarchive/issues/detail?id=163 Revision 3542: Merge 2516, 2536 from trunk: Allow path table offset values of 0 and 18, which are used by some ISO writers. Reviewed by: kientzle Approved by: re (kib) MFC after: 3 days Notes: svn path=/head/; revision=224691
* - Update libarchive to 2.8.4Martin Matuska2011-07-1717-42/+1112
| | | | | | | | | | | - 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
* Don't write data into an empty "file."Tim Kientzle2010-12-072-12/+10
| | | | | | | | | | | In particular, this check avoids a warning when extracting directory entries from certain GNU tar archives that store directory contents. MFC after: 3 days Notes: svn path=/head/; revision=216258
* If the Zip reader doesn't see a PK signature blockTim Kientzle2010-11-072-0/+43
| | | | | | | | | | | because there's inter-entry garbage, just scan forward to find the next one. This allows us to handle a lot of Zip archives that have been modified in-place. Thanks to: Gleb Kurtsou for sending me a sample archive Notes: svn path=/head/; revision=214905
* Remove redundant WARNS?=6 overrides and inherit the WARNS setting fromUlrich Spörlein2010-03-021-1/+0
| | | | | | | | | | | the toplevel directory. This does not change any WARNS level and survives a make universe. Approved by: ed (co-mentor) Notes: svn path=/head/; revision=204596
* Remove some test files that are no longer used.Tim Kientzle2009-12-305-27092/+0
| | | | Notes: svn path=/head/; revision=201253
* UU decoder. Now that libarchive can recursively taste input streams,Tim Kientzle2009-12-302-0/+135
| | | | | | | you can do things like this: tar xvf archive.tar.gz.uu Notes: svn path=/head/; revision=201248
* A raft of test changes and improvements from the Googlecode repository.Tim Kientzle2009-12-3073-1315/+6267
| | | | | | | | In particular, this includes tests for the new features I've merged over the last few days. Notes: svn path=/head/; revision=201247
* Fiz /usr/bin/unzip: A bug deep in libarchive's read-ahead logicTim Kientzle2009-09-081-1/+1
| | | | | | | | | | | | | | | (incorrect handling of zero-length reads before the copy buffer is allocated) is masked by the iso9660 taster. Tar and cpio both enable that taster so were protected from the bug; unzip is susceptible. This both fixes the bug and updates the test harness to exercise this case. Submitted by: Ed Schouten diagnosed the bug and drafted a patch MFC after: 7 days Notes: svn path=/head/; revision=196962
* Update tests to match r195873, which corrected how hardlinked filesTim Kientzle2009-09-082-12/+17
| | | | | | | | | on iso9660 images were returned. While I'm poking around, update some comments around this area to try to clarify what's going on and what still remains to be improved. Notes: svn path=/head/; revision=196961
* Merge r990,r1044 from libarchive.googlecode.com:Tim Kientzle2009-04-274-2/+102
| | | | | | | | | | | | read_support_format_raw() allows people to exploit libarchive's automatic decompression support by simply stubbing out the archive format handler. The raw handler is not enabled by support_format_all(), of course. It bids 1 on any non-empty input and always returns a single entry named "data" with no properties set. Notes: svn path=/head/; revision=191594
* Merge r1061,r1062,r1063 from libarchive.googlecode.com:Tim Kientzle2009-04-273-0/+64
| | | | | | | | | | | | | Fix reading big-endian binary cpio archives, and add a test. While I'm here, add a note about Solaris ACL extension for cpio, which should be relatively straightforward to support. Thanks to: Edward Napierala, who sent me a big-endian cpio archive from a Solaris system he's been playing with. Pointy hat: me Notes: svn path=/head/; revision=191592
* Merge r1034 from libarchive.googlecode.com:Tim Kientzle2009-04-272-25/+25
| | | | | | | Put a much larger file on the reference ISO for this test. Notes: svn path=/head/; revision=191591
* Merge r1058 from libarchive.googlecode.com: Require that eachTim Kientzle2009-04-272-7/+13
| | | | | | | test source file has exactly one DEFINE_TEST(). Notes: svn path=/head/; revision=191590
* Merge r1032 from libarchive.googlecode.com:Tim Kientzle2009-04-272-12/+16
| | | | | | | | | | 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-272-6/+19
| | | | | | | | * assertEqualMem() now takes void * arguments * Be a little smarter about what we hexdump when assertEqualMem() fails Notes: svn path=/head/; revision=191581
* Merge r1053,r1055,r1056,r1057,r1065 from libarchive.googlecode.com:Tim Kientzle2009-04-274-5/+195
| | | | | | | | | | | | | | | * Fix parsing of POSIX.1e ACLs from Solaris tar archives * Test the above * Preserve the order of POSIX.1e ACL entries * Update tests whose results depended on the order of ACL entries * Identify NFSv4 ACLs in Solaris tar archives and warn that they're not yet supported. (In particular, don't try to parse them as POSIX.1e ACLs.) Thanks to: Edward Napierala sent me some Solaris 10 tar archives to test Notes: svn path=/head/; revision=191576
* Reading an mtree file is supposed to provideTim Kientzle2009-04-261-1/+14
| | | | | | | | | | | | | | | | access to the file data (if the file exists on disk). This was broken for the first regular file; fix it and add a test so it won't break again. In particular, this fixes the following idiom for creating a tar archive in which every file is owned by root: tar cf - --format=mtree . \ | sed -e 's/uname=[a-z]*/uname=root/' -e 's/uid=[0-9]*/uid=0/' \ | tar cf - @- Notes: svn path=/head/; revision=191527
* Merge lots of test suite updates from libarchive.googlecode.com.Tim Kientzle2009-04-1742-349/+2236
| | | | Notes: svn path=/head/; revision=191183
* Merge from libarchive.googlecode.com r791, r879, r884, r948: VariousTim Kientzle2009-04-121-20/+30
| | | | | | | | | fixes to read_support_compression_program. In particular, failure of the external program is detected a lot earlier, which gives much more reasonable error handling. Notes: svn path=/head/; revision=190961
* Merge from libarchive.googlecode.com: Mostly a bunch ofTim Kientzle2009-04-1210-53/+68
| | | | | | | | | | | | | | | | 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 r718 from libarchive.googlecode.com: Some additionalTim Kientzle2009-03-071-0/+58
| | | | | | | | tests of restoring files to disk with unusual characters, specifically to exercise Windows issues. Notes: svn path=/head/; revision=189487
* Fix spelling.Tim Kientzle2009-03-071-2/+2
| | | | Notes: svn path=/head/; revision=189486
* Merge r348 from libarchive.googlecode.com: Suppress testing invalidTim Kientzle2009-03-071-0/+7
| | | | | | | | conversions if there aren't any. In particular, Cygwin's "C" locale has no invalid inputs for wctomb(). Notes: svn path=/head/; revision=189484
* Merge r596,r690 from libarchive.googlecode.com: Minor style and compileTim Kientzle2009-03-071-5/+6
| | | | | | | warning fixes for test_read_pax_truncated.c. Notes: svn path=/head/; revision=189483
* Merge r335,653,676 from libarchive.googlecode.com: Instead ofTim Kientzle2009-03-0715-90/+189
| | | | | | | | | | | | 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-075-10/+108
| | | | | | | | | 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 r558,567,569,571,581,582,583,598 from libarchive.googlecode.com:Tim Kientzle2009-03-074-8/+268
| | | | | | | | | | Support Joliet extensions. This currently ignores Rockridge extensions if both exist on the same disk unless the '!joliet' option is provided. e.g.: tar -xvf example.iso --options '!joliet' Thanks to: Andreas Henriksson Notes: svn path=/head/; revision=189474
* Merge r658 from libarchive.googlecode.com: Only flush and close theTim Kientzle2009-03-072-0/+38
| | | | | | | file if it was actually opened. Test for this case. Notes: svn path=/head/; revision=189473
* Merge r714,r715 from libarchive.googlecode.com: Fix Debian bug #516577.Tim Kientzle2009-03-073-3/+29
| | | | | | | | 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 the rest of r453 from libarchive.googlecode.com: Test usingTim Kientzle2009-03-071-0/+19
| | | | | | | libarchive APIs to read extended attributes from disk on FreeBSD. Notes: svn path=/head/; revision=189468
* Merge r659 from libarchive.googlecode.com: Correctly report "none"Tim Kientzle2009-03-074-0/+4
| | | | | | | | | as the compression name when no other read filter bid. Add some assertions to various tests to verify that read filters are properly setting the textual name as well as the compression code. Notes: svn path=/head/; revision=189464
* Merge r448 from libarchive.googlecode.com: Suppress testing write_diskTim Kientzle2009-03-061-1/+1
| | | | | | | failures on Windows for now. Someday this will be revisited. Notes: svn path=/head/; revision=189437
* Merge r420,r494 from libarchive.googlecode.com: Prettify the testTim Kientzle2009-03-061-5/+1
| | | | | | | | harness a bit: remove a dead comment, tweak the wording of the summary report. Notes: svn path=/head/; revision=189433
* 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 r416 from libarchive.googlecode.com:Tim Kientzle2009-03-062-0/+155
| | | | | | | | | | Restoring POSIX.1e Extended Attributes on FreeBSD, part 1 This implements the basic ability to restore extended attributes on FreeBSD, including a test suite. Notes: svn path=/head/; revision=189431
* Merge r399,401,402,405,415,430,440,452,453,458,506,533,536,538,544,590Tim Kientzle2009-03-062-0/+163
| | | | | | | | | | | | | | | | | | from libarchive.googlecode.com: Add a new "archive_read_disk" API that provides the important service of reading metadata from the disk. In particular, this will make it possible to remove all knowledge of extended attributes, ACLs, etc, from clients such as bsdtar and bsdcpio. Closely related, this API also provides pluggable uid->uname and gid->gname lookup and caching services similar to the uname->uid and gname->gid services provided by archive_write_disk. Remember this is also required for correct ACL management. Documentation is still pending... Notes: svn path=/head/; revision=189429
* Merge r394,r396 from libarchive.googlecode.com: Plug some memoryTim Kientzle2009-03-061-3/+15
| | | | | | | leaks in the ACL test, correctly mark that FreeBSD has acl_get_perm_np(). Notes: svn path=/head/; revision=189427
* Merge r386,r395,r451 from libarchive.googlecode.com: On Windows, breakTim Kientzle2009-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. Notes: svn path=/head/; revision=189417