| 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).
|
|
|
|
|
|
| |
which I removed recently.
SVN-Revision: 3956
|
|
|
|
| |
SVN-Revision: 3316
|
|
|
|
| |
SVN-Revision: 3114
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
libarchive_test.
SVN-Revision: 1810
|
|
|
|
| |
SVN-Revision: 1786
|
|
|
|
| |
SVN-Revision: 1730
|
|
|
|
| |
SVN-Revision: 1729
|
|
|
|
|
|
| |
Suggested by Tim
SVN-Revision: 1668
|
|
|
|
| |
SVN-Revision: 1666
|
|
|
|
|
|
| |
bsdtar_test all build cleanly now under both Visual C++ and MinGW.
SVN-Revision: 1305
|
|
|
|
| |
SVN-Revision: 1284
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Libarchive is already pretty careful about using O_BINARY
whenever it opens a file handle internally; this extends
that care to file descriptors that are passed in from clients
by invoking _setmode() explicitly.
The test harness was much less careful about O_BINARY;
this adds those flags to all open() calls and modifies
fopen() calls to use "wb" and "rb" explicitly.
In particular, this should remove the need for clients
to use invoke _set_fmode() at all.
This is not yet completely tested...
SVN-Revision: 1103
|
|
|
|
| |
SVN-Revision: 323
|
|
|
|
|
|
|
| |
harness has already created and chdir() into a suitable
temporary directory.
SVN-Revision: 312
|
|
|
|
| |
SVN-Revision: 193
|
|
SVN-Revision: 1
|