| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A few guiding principles:
* Each test source file includes ONLY "test.h" to make it easy
to create new tests.
* Each test suite has a "test.h" that includes "test_util/test_common.h"
to get access to all the common testing utility functions.
So "test_common.h" is then responsible for including
any smaller headers that declare specific pieces of
shared test functionality.
I've also pulled some test filtering logic that was _only_ used
in test_main.c into that file, and repurposed "test_utils.[ch]"
for common utility code. (Eventually, a lot of the assertion
helpers currently in "test_main.c" should probably be organized
into one or more source files of their own.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Many tests use a loop calling rand() to fill buffers with test data. As
these calls cannot be inlined, this adds up to noticeable overhead:
For example, running on QEMU RISC-V the test_write_format_7zip_large_copy
test took ~22 seconds before and with this change it's ~17 seconds.
This change uses a simpler xorshift64 random number generator that can be
inlined into the loop filling the data buffer. By default the seed for this
RNG is rand(), but it can be overwritten by setting the TEST_RANDOM_SEED
environment variable.
For a native build the difference is much less noticeable, but it's still
measurable: test_write_format_7zip_large_copy takes 314.9 ms ± 3.9 ms
before and 227.8 ms ± 5.8 ms after (i.e. 38% faster for that test).
|
|
|
|
|
|
| |
the format errors.
Closes #1318
|
|
|
|
| |
s/archive_write_set_compression_/archive_write_add_filter_/
|
|
|
|
|
|
| |
a bit more descriptive.
SVN-Revision: 4192
|
|
|
|
| |
SVN-Revision: 3114
|
|
|
|
|
|
|
|
|
|
|
|
| |
instead of waiting until we try to read the first header.
This just required moving the format detection into archive_read_open.
This in turn required updating a some tests that inadvertently
relied on the old behavior.
While poking around in the truncation tests, I went ahead and
updated them to not use the old "assertA" macro, which is
deprecated.
SVN-Revision: 3009
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
archive_write_finish to archive_write_free. Update all clients,
tests, and documentation to use the new names exclusively. (Though
I've not yet run a global search-and-replace against the Wiki. I'll
do that shortly.)
I've preserved the old names as aliases, scheduled to be removed with
libarchive 4.x, so there is no immediate impact to existing code from
this change.
SVN-Revision: 1891
|
|
|
|
| |
SVN-Revision: 1887
|
|
|
|
| |
SVN-Revision: 1886
|
|
|
|
| |
SVN-Revision: 1786
|
|
|
|
|
|
|
|
|
|
|
|
| |
skip, or close callbacks. Use this in read_pax_truncated to partially
verify extraction with clients that only register a minimal set
of callbacks (recall that only the read callback function is
mandatory; in fact, the open callback is deprecated and will
likely be removed in libarchive 3.0).
Debian bug #516577
SVN-Revision: 714
|
|
|
|
| |
SVN-Revision: 690
|
|
|
|
| |
SVN-Revision: 596
|
|
|
|
| |
SVN-Revision: 266
|
|
|
|
| |
SVN-Revision: 224
|
|
|
|
| |
SVN-Revision: 193
|
|
SVN-Revision: 1
|