Skip to content

Testing

YadeWira edited this page Oct 21, 2026 · 8 revisions

Testing

The suite runs against .parc archives and uses the C sources in reference/freearc-0.67/Compression/ as codec oracles. FreeArc is not needed to use PArc.

./build.sh linux64
bash tests/cli.sh
bash tests/stdio.sh tests/volumes.sh
bash tests/rs_recovery.sh tests/parc_crypt.sh tests/grzip.sh tests/bcj2.sh
bash tests/dispack.sh tests/srep.sh tests/bcj.sh
bash tests/run_tornado_tests.sh tests/crypto_vectors.sh
bash tests/run_lzma_tests.py build/tests/test_lzma
sudo bash tests/fixes.sh          # masks, links, full disk, FAT32
python3 tests/fuzz.py build/linux64/parc 100 build/linux64/parc
  • tests/cli.sh: smoke test for all 10 commands, options and exit codes.
  • fixes.sh needs sudo for full-disk, FAT32 and symlink tests.
  • Codec tests compare against FreeArc C decoders; LZMA tests also compare against liblzma.
  • Fuzzing: 100 corrupted variants must never crash or hang.
  • t verifies independent blocks in parallel (workers limited by PARC_THREADS); results and exit codes are the same as the serial path.
  • Without -s, large archives use automatic 64 MB (levels 1–3) or 32 MB (levels 4–9 and -mx) solid blocks; small archives still use one block.
  • x/e decode independent blocks in parallel to temporary files and then write sequentially, preserving order, prompts, links and errors. Temporary space is bounded by the decoded size; archives with more than 2 GB decoded use the serial path.
  • -mx (PPMd/LZMA) and -mxx (CM) round-trip, damage and encryption cases are covered by tests/cm.sh; both decode in parallel.
  • tests/grzip.sh checks that large BWT blocks use the adaptive l64/h22 LZP mode and small blocks keep the fast parameters.
  • tests/bcj2.sh round-trips the experimental -mbcj2 filter on x86 markers, random bytes and empty input.

Version 0.0.1 status and platform matrix: Version 0.0.1.

Clone this wiki locally