sox_ng/test
Martin Guy 2cbb9adc40 Make chorus-glitch test use a 16-bit test file not 32
Othrwise some buggy processors fail it with errors of a dozen
32-bit sample values e.g. Intel(R) Core(TM) i5-4570 with bugs:
    cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass
    l1tf mds swapgs srbds mmio_unknown bhi its
2026-08-14 20:10:24 +02:00
..
bit-depth test/bit-depth: Ensure helper program "samples" has been built 2026-05-27 13:44:52 +02:00
BUG-293 Add a test for sox.sf.net bug 293 2025-12-20 20:03:06 +01:00
BUG-297 Add test/BUG-297 2025-12-03 12:12:11 +01:00
BUG-298 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
BUG-305 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
BUG-320 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
BUG-327 Make BUG-327 "succeed" when decoding fails 2026-05-27 14:48:10 +02:00
BUG-331 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
BUG-333 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
BUG-334 make check: Ensure that formats are writable if we need to write them 2026-02-11 16:49:51 +01:00
BUG-345 Add test file for BUG-345 2025-03-16 03:39:23 +01:00
BUG-350 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
BUG-351 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
BUG-358 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
BUG-360-aiffstartwrite When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
BUG-360-rate When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
BUG-363 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
BUG-367 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
BUG-368 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
BUG-369 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
BUG-370 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
chorus-glitch Make chorus-glitch test use a 16-bit test file not 32 2026-08-14 20:10:24 +02:00
convert-number-of-channels Fix conversion of unsupported numbers of channels 2025-12-22 20:38:15 +01:00
CVE-2004-0557 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
CVE-2014-8145 Remove tempfile accidentally comitted 2024-08-21 08:26:55 +02:00
CVE-2017-11332 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
CVE-2017-11333 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
CVE-2017-11358 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
CVE-2017-11359 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
CVE-2017-15370 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
CVE-2017-15371 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
CVE-2017-15372 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
CVE-2017-15642 Remove patches from the test directories 2024-09-20 20:06:07 +02:00
CVE-2017-18189 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
CVE-2019-8354 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
CVE-2019-8355 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
CVE-2019-8356 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
CVE-2019-8357 Enable the CVE-2019-8357 test 2026-01-29 18:02:01 +01:00
CVE-2019-13590 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
CVE-2019-1010004 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
CVE-2021-3643 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
CVE-2021-23159 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
CVE-2021-23172 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
CVE-2021-23210 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
CVE-2021-33844 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
CVE-2021-40426 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
CVE-2022-31650 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
CVE-2022-31651 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
CVE-2023-26590 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
CVE-2023-32627 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
CVE-2023-34318 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
CVE-2023-34432 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
dither-guard-clip Add test for c895afd (dither -G clipping) 2025-08-13 07:55:17 +02:00
ebu-r-128 Remove bashism {1,2,3} from ebu-r-128 test 2025-11-19 00:15:45 +01:00
echos Use freq/freq for test tone generation and normalize filenames 2025-02-11 12:13:36 +01:00
equiv-chorus-flanger Make the testsuite check whether "bc" is installed 2025-11-15 18:18:27 +00:00
Fedora-1226675 Disable test Fedora-1226675 because it requires audio hardware 2024-08-18 12:29:33 +02:00
ffmpeg-command-execution Make wine-based tests work from "sh check.sh" in test/ 2026-08-13 13:04:32 +02:00
fmt-aifc-alaw-read When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
fmt-aifc-alaw-write When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
fmt-aifc-ulaw-read When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
fmt-aifc-ulaw-write When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
format-nsp Check whether sox has nsp format before testing it 2025-03-26 14:59:08 +01:00
mix-50-50-c-1 Use freq/freq for test tone generation and normalize filenames 2025-02-11 12:13:36 +01:00
mix-50-50-combine-mix Use freq/freq for test tone generation and normalize filenames 2025-02-11 12:13:36 +01:00
mix-50-50-remix Use freq/freq for test tone generation and normalize filenames 2025-02-11 12:13:36 +01:00
mix-50-50-synth-mix Use freq/freq for test tone generation and normalize filenames 2025-02-11 12:13:36 +01:00
mix-50-50-synth-vdelay Change vdelay parameter to compulsory (no -V), to ms delays and % mix 2025-02-15 13:38:34 +01:00
noop-synth-vdelay Add noop-synth-vdelay and synth-amod-fmod identity tests 2025-02-20 02:15:59 +01:00
o2.voc Add test for o2.voc 2025-01-28 01:38:26 +01:00
PATCH-126 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
PATCH-127 When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
playlist-with-pipe Make wine-based tests work from "sh check.sh" in test/ 2026-08-13 13:04:32 +02:00
sinc-invalid-option When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
sinc-usage When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
spectrogram_-x Make spectrogram-x test faster by doing 1 second instead of 10 2025-11-19 01:43:16 +01:00
synth-amod-fmod Add noop-synth-vdelay and synth-amod-fmod identity tests 2025-02-20 02:15:59 +01:00
txw-wav-byte-rate Fix txw-byte-rate test to work on bigendian systems 2025-11-18 19:51:46 +01:00
url-command-injection Add test for shell special characters in URL 2026-08-11 13:36:04 +02:00
wav-length-over-4GB Fix wav-length-over-4GB test to work on bigendian systems 2025-11-19 01:43:16 +01:00
wav-truncated-ISFT Fix 282351e to ignore final ISFT/ICRD chunk with length > EOF 2026-05-18 12:06:49 +02:00
wavpack-errors When running tests, also remove core.*, not just core 2025-11-07 01:39:08 +01:00
win-utf8-globbing Make wine-based tests work from "sh check.sh" in test/ 2026-08-13 13:04:32 +02:00
.gitignore Rationalize .gitignores 2025-02-07 11:04:57 +01:00
check.sh Print test cases' output after failing ones 2026-08-13 12:59:28 +02:00
Makefile.am test/Makefile.am: Use $(EXEEXT), not $(EXE) 2025-11-19 01:43:16 +01:00
README Document exit codes of "run" scripts 2025-02-04 12:38:52 +01:00
run Make test/run executable 2026-05-18 11:55:33 +02:00
samples.c dat: Align figures, remove useless spaces and precision and drop \r on Unix 2025-03-06 14:23:31 +01:00

Yet another test suite for SoX
------------------------------

There are already several test suites in sox's source directory
as well as a test/ directory (which doesn't seem to work).

This one is a regression test suite, most of which test CVE's against
crafted audio files, each with its files in its own directory in which
there is a shell script "run" that exits
    0 if the test succeeded,
    2 if the test failed or SoX threw an unexpected error,
    254 if the build of SoX does not include the feature under test, or
other exit codes pinpoint causes of failure - see check.sh

To run all the tests:

    sh check.sh

or to run an individual test:

    cd CVE-2004-0557
    sh run

You can also test a different executable than the installed "sox" by saying:

    sox=/usr/local/src/sox-14.4.2/src/sox sh check.sh
or
    sox=sox_ng sh run

but relative paths will only work properly with "sh run" as check.sh
cd's into the various directories before running "run" in each one.

If you get unrecognised exit statuses on funny systems, do write.

    Martin Guy <martinwguy@gmail.com>, July 2024.