summaryrefslogtreecommitdiff
path: root/cpio/test
Commit message (Collapse)AuthorAgeFilesLines
* Fix cpio test in 2038 (#1836)Bernhard M. Wiedemann2023-01-121-3/+3
| | | | | | | | | | | | | | | | | Without this patch, `bsdcpio_test_option_c` failed after 2038-01-19 with ``` .../libarchive-3.6.2/cpio/test/test_option_c.c:143: Assertion failed: t >= now - 2 .../libarchive-3.6.2/cpio/test/test_option_c.c:169: Assertion failed: t >= now - 2 .../libarchive-3.6.2/cpio/test/test_option_c.c:205: Assertion failed: t >= now - 2 ``` Background: As part of my work on reproducible builds for openSUSE, I check that software still gives identical build results in the future. The usual offset is +16 years, because that is how long I expect some software will be used in some places. This showed up failing tests in our package build. See https://reproducible-builds.org/ for why this matters.
* replace time64 functions with normal ones (#1830)Rosen Penev2023-01-091-3/+3
| | | | | | | | | Otherwise there are 32/64-bit pointer conversions going on. In Windows since MSVC2005, time_t has been 64-bit. MinGW needs a hack to get 64-bit time_t. Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Rosen Penev <rosenp@gmail.com>
* further cleanup _localtime64_s (#1824)Rosen Penev2022-12-281-10/+1
| | | | | | | These were missing from 2d329073435d36065ce30bfd29428f6a45e41016 Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Rosen Penev <rosenp@gmail.com>
* Memory leaks fix for tests (#1829)TERESH12022-12-271-0/+1
| | | Issue #1828
* cleanup _localtime64_s (#1820)Rosen Penev2022-12-201-3/+3
| | | Signed-off-by: Rosen Penev <rosenp@gmail.com>
* tests: silence localtime() CodeQL warningsMartin Matuska2022-12-081-2/+22
| | | | Use localtime_r() or _localtime64_s() if available
* Merge pull request #1502 from tih/cpio-bin-formatsMartin Matuška2021-05-101-0/+2
|\ | | | | Support for PWB and v7 binary cpio formats
| * update cpio documentation, add basic test of binary formatTom Ivar Helbekkmo2021-03-061-0/+2
| |
* | cpio test: add source file extensionRolf Eike Beer2021-04-061-11/+11
|/ | | | Fixes CMake warnings regarding CMP0115.
* bsdcpio_test: from_hex() needs to be an uint32_tMartin Matuska2020-02-271-15/+18
| | | | Fixes #1339
* Add printf attributes to the printflike functions used in tests and fixzoulasc2020-01-232-12/+17
| | | | | | the format errors. Closes #1318
* Windows symlink bugfixes and improvementsMartin Matuska2019-04-133-4/+4
| | | | | | | Treat targets ending with /. and /.. as directory symlinks Explicitly test for file and directory symlinks Improve debug output on test failure Fix two memory allocations
* Fix remaining MinGW testsMartin Matuska2019-04-073-2/+16
| | | | Enable tests on MinGW CI builds
* Fix various symlink bugs with Windows symlinksMartin Matuska2019-04-044-4/+4
| | | | tests: extend assertMakeSymlink with targetIsDir
* Issue 1104: Explicitly limit the printed string to 12 charactersIssue1104Tim Kientzle2018-12-151-4/+4
| | | | | | | | | | | | | | | | | GCC8 tries to diagnose `snprintf()` overflows but isn't quite smart enough for this case, so emits a false-positive warning. Remember that `%12s` only specifies the minimum number of bytes. GCC8 conservatively assumes this might result in writing the full length of `date2`. (Which will never be longer than 12 bytes, but GCC8 apparently can't reason about `strftime` format specifiers yet.) Changing the specifier here to `%12.12s` explicitly truncates to 12 bytes and should help the compiler understand that this will never overflow. While I'm here, correct a minor typo in the previous line; it used `sizeof(date)` instead of `sizeof(date2)`. (Both are the same size, so this had no functional impact.)
* Cpio test: Expected error message depends on local strerror()Tim Kientzle2018-09-022-27/+73
|
* Fix alphabetical order, other small fixesSean Purcell2017-05-152-4/+4
|
* Add zstd test suiteSean Purcell2017-05-154-0/+141
|
* Fix use-after-free in error branch. From Ngie Cooper.Joerg Sonnenberger2017-05-111-1/+1
|
* Don't leak memory.Joerg Sonnenberger2017-04-2912-11/+34
|
* Add NFSv4 ACL support for Linux via librichaclMartin Matuska2017-03-161-1/+6
| | | | | | | | | | | | Richacls are interpreted as NFSv4 ACLs and stored in archive_acl (Richacl flags and masks are not stored). Analog to mac_metadata, NFSv4 ACLs do not get extracted when the extraction of extended attributes is enabled and the "trusted.richacl" extended attribute is present. RichACL masks and are calculated from file mode on extraction. mac_metadata acl check has been moved in the code to be together with the richacl check.
* New tar test: test_option_aclsMartin Matuska2017-03-021-0/+5
| | | | | Add sunacl_get() and setTestAcl() to common test code Test for membership.h on Mac OS X and make it a requirement for ACLs
* test suite: use a single main test file for all testsMartin Matuska2017-02-214-3406/+16
|
* testsuite: allow 'dev' in versionPavel Raiskup2017-02-212-83/+3
|
* Spelling fixes (#846)Graham Percival2016-12-201-1/+1
| | | Sponsored by: Tarsnap Backup Inc.
* Merge pull request #807 from csanchezdll/issue696Tim Kientzle2016-12-111-0/+7
|\ | | | | Issue 696: ppc64le mache ckech failure
| * Issue 696: ppc64le mache ckech failureCarlos Sánchez de La Lama2016-10-191-0/+7
| | | | | | | | | | | | | | This issue is not ppc64le specific. I have experienced on my 4.4.22-gnu #1 SMP 1 i686 GNU/Linux. Might be dependant on kernel version and/or machine load. POSIX says errors after posix_spawnp returns can be signaled by child exitting with an 127 exit code.
* | Free p (the memory allocated via slurpfile) when done with the contentsNgie Cooper2016-12-104-3/+15
| | | | | | | | | | Reported by: Coverity CID: 1331631, 1331632, 1331633, 1331646
* | Spelling fixes (#831)Graham Percival2016-12-041-2/+2
| | | | | | Sponsored by: Tarsnap Backup Inc.
* | Make test output more verbose on WindowsTim Kientzle2016-10-231-1/+2
| |
* | Sync up the test harnesses, fix an "unused var" warning on WindowsTim Kientzle2016-10-232-0/+35
|/
* Issue #801: close the file descriptor when testing link countsTim Kientzle2016-10-112-1/+20
| | | | | Thanks to Ed Maste for reporting this leak. Found by: Coverity
* Add chmod() after make_{dir,file} in test suitesGraham Percival2016-09-261-2/+9
| | | | | | | | | | | | | This is the same change that 38b3f516df865e2dffd0a1bbc9feb923ab2efc38 made to libarchive/test/main.c , but now applied to: cat/test/main.c cpio/test/main.c tar/test/main.c Sponsored by: Tarsnap Backup Inc.
* Add and use assertion_file_mode() in other testsGraham Percival2016-09-262-1/+30
| | | | | | | | | | | This adds the assertion_file_mode() function from libarchive/test/main.c and applies it to cat/test/main.c cpio/test/main.c tar/test/main.c Sponsored by: Tarsnap Backup Inc.
* Issue 720: Allow dashes in third-party version numbersTim Kientzle2016-07-201-1/+1
|
* Fix test for cpio version dash fixMartin Matuska2016-06-211-2/+2
|
* Issue 657: Allow up to 8k for the test root directory nameTim Kientzle2016-06-021-26/+49
|
* Issue 708: tar should fail if a named input file is missingTim Kientzle2016-05-282-0/+53
| | | | | | | | Tar was exiting with success if an input file named on the command line was not present. Includes tests for both bsdtar and bsdcpio to ensure this does not regress.
* Sync up test harnessesTim Kientzle2016-04-291-0/+4
|
* Issue 695: check fwrite return value, sync up test harnessesTim Kientzle2016-04-281-1/+32
|
* Fix -c test: we forced uid/gid to 1000, so we should not compare against ↵Tim Kientzle2016-02-131-6/+2
| | | | the current user
* Issue #377: Help cpio tests pass on systems with large UIDsTim Kientzle2016-03-192-2/+2
|
* Rework LZ4 option tests to work with various implementations of posix_spawnpTim Kientzle2016-01-311-3/+15
|
* Update lz4 test to watch for the reworded error messagesTim Kientzle2016-01-311-1/+1
|
* Bring along a trailing null when guessing the path to the program under testTim Kientzle2016-01-311-1/+1
|
* Fix LZ4 tests when liblz4 is not presentTim Kientzle2016-01-301-2/+2
|
* Really sync up the test harnessesTim Kientzle2016-01-281-0/+13
|
* Sync up the test harnesses; add error checks to the UUdecode utilityTim Kientzle2016-01-281-7/+58
|
* Visual Studio 2015 ChangesHans Hinrichsen2016-01-131-1/+1
| | | | snprintf shouldn't be defined in a macro in VS2015 and above due to its C99 changes
* Skip the --lz4 test if libarchive was compiled without the libraryTim Kientzle2015-01-251-0/+6
| | | | | | and this platform does not have an lz4 executable. It seems there should be a better way to handle this.... <sigh>