aboutsummaryrefslogtreecommitdiff
path: root/tests/test_files.sh (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2024-04-09Remove the backdoor found in 5.6.0 and 5.6.1 (CVE-2024-3094).Lasse Collin1-11/+0
While the backdoor was inactive (and thus harmless) without inserting a small trigger code into the build system when the source package was created, it's good to remove this anyway: - The executable payloads were embedded as binary blobs in the test files. This was a blatant violation of the Debian Free Software Guidelines. - On machines that see lots bots poking at the SSH port, the backdoor noticeably increased CPU load, resulting in degraded user experience and thus overwhelmingly negative user feedback. - The maintainer who added the backdoor has disappeared. - Backdoors are bad for security. This reverts the following without making any other changes: 6e636819 Tests: Update two test files. a3a29bbd Tests: Test --single-stream can decompress bad-3-corrupt_lzma2.xz. 0b4ccc91 Tests: Update RISC-V test files. 8c9b8b20 liblzma: Fix typos in crc32_fast.c and crc64_fast.c. 82ecc538 liblzma: Fix false Valgrind error report with GCC. cf44e4b7 Tests: Add a few test files. 3060e107 Tests: Use smaller dictionary size in RISC-V test files. e2870db5 Tests: Add two RISC-V Filter test files. The RISC-V test files also have real content that tests the filter but the real content would fit into much smaller files. A generator program would need to be available as well. Thanks to Andres Freund for finding and reporting it and making it public quickly so others could act without a delay. See: https://www.openwall.com/lists/oss-security/2024/03/29/4
2024-03-09Tests: Test --single-stream can decompress bad-3-corrupt_lzma2.xz.Jia Tan1-0/+11
The first stream in this file is valid, so this tests that xz properly stops after decompressing it.
2024-02-14Add SPDX license identifier into 0BSD source code files.Lasse Collin1-0/+1
2024-02-14Change most public domain parts to 0BSD.Lasse Collin1-3/+0
Translations and doc/xz-file-format.txt and doc/lzma-file-format.txt were not touched. COPYING.0BSD was added.
2024-01-23Tests: Skip RISC-V test files if decoder was not built.Jia Tan1-0/+5
2023-11-17Tests: Fix typo in a comment.Jia Tan1-1/+1
2023-07-21Tests: Skip .lz files in test_files.sh if not configured.Jia Tan1-1/+1
Previously if the lzip decoder was not configured then test_files.sh would pass the lzip tests instead of skipping them.
2023-07-14Tests: Improve feature testing for skipping.Jia Tan1-1/+1
Fixed a bug where test_compress_* would all fail if arm64 or armthumb filters were enabled for compression but arm was disabled. Since the grep tests only checked for "define HAVE_ENCODER_ARM", this would match on HAVE_ENCODER_ARM64 or HAVE_ENCODER_ARMTHUMB. Now the config.h feature test requires " 1" at the end to prevent the prefix problem. have_feature() was also updated for this even though there were known current bugs affecting it. This is just in case future features have a similar prefix problem.
2022-12-13Tests: Add two ARM64 test files.Lasse Collin1-0/+5
2022-11-09Tests: Test the .lz files in test_files.sh.Lasse Collin1-0/+25
2022-10-27Tests: test_files.sh: Make it not fail if features were disabled at build.Lasse Collin1-4/+46
It now tries to test as many files as easily possible. The exit status indicates skipping if any of the files were skipped. This way it is easy to notice if something is being skipped when it isn't expected.
2022-10-27Tests: test_files.sh: Suppress an expected warning from the log.Lasse Collin1-2/+2
xz (but not xzdec) will normally warn about unsupported check but since we are testing specifically such a file, it's better to silence that warning so that it doesn't look suspicious in test_files.sh.log. The use of -q and -Q in xzdec is just for consistency and doesn't affect the result at least for now.
2022-10-27Tests: test_files.sh: Print the reason for skipping if xz & xzdec missing.Lasse Collin1-0/+1
2022-10-26Tests: Test also unsupported-*.xz.Lasse Collin1-0/+37
2022-10-19Tests: Skip tests in test_*.sh if encoders and/or decoders are disabled.Lasse Collin1-0/+11
This isn't perfect as the scripts can still fail if only certain filters are disabled. This is still an improvement as now "make check" has better behavior when all encoders or decoders are disabled. Grepping ../config.h is simple and fairly clean but it only works if config.h was created. CMake builds don't create config.h but they don't use these test scripts either. Thanks to Sebastian Andrzej Siewior for reporting the problem. Thanks to Jia Tan for the original patch which grepped xz error messages instead of config.h.
2022-10-19Test: Remove the (exit 1) lines.Lasse Collin1-9/+0
I suspect that I used these in the original version because Autoconf's manual describes that such a trick is needed in some specific situations for portability reasons. None of those situations listed on Autoconf 2.71 manual apply to these test scripts though so this cleans them up.
2022-09-16Tests: Add a test file for lzma_index_append() integer overflow bug.Lasse Collin1-0/+8
This test fails before commit 18d7facd3802b55c287581405c4d49c98708c136. test_files.sh now runs xz -l for bad-3-index-uncomp-overflow.xz because only then the previously-buggy code path gets tested. Normal decompression doesn't use lzma_index_append() at all. Instead, lzma_index_hash functions are used and those already did the overflow check.
2022-07-14Tests: Add the .lzma files to test_files.sh.Lasse Collin1-0/+20
2015-01-06Tests: Don't hide unexpected error messages in test_files.sh.Lasse Collin1-2/+2
Hiding them makes no sense since normally there's no error when testing the "good" files. With "bad" files errors are expected and then it makes sense to keep the messages hidden.
2010-10-10test_files.sh: Fix the first line.Lasse Collin1-1/+1
For some reason this prevented running the test only on OS/2 and even on that it broke only recently. Thanks to Elbert Pol.
2010-10-08Make tests accommodate missing xz or xzdec.Lasse Collin1-2/+26
2009-04-13Put the interesting parts of XZ Utils into the public domain.Lasse Collin1-10/+3
Some minor documentation cleanups were made at the same time.
2008-11-19Renamed lzma to xz and lzmadec to xzdec. We create symlinksLasse Collin1-2/+2
lzma, unlzma, and lzcat in "make install" for backwards compatibility with LZMA Utils 4.32.x; I'm not sure if this should be the default though.
2008-09-30Renamed the test files from .lzma suffix to .xz suffix.Lasse Collin1-4/+2
2008-01-08Avoid using ! in test_files.sh, because that doesn't workLasse Collin1-1/+3
with some ancient /bin/sh versions.
2008-01-07Cosmetic edit to test_files.sh.Lasse Collin1-2/+2
2008-01-07Added test_files.sh to test decoding of the files inLasse Collin1-0/+40
the tests/files directory. It doesn't test the malicious files yet.