Test suite is OK when meson is executed without any additional params.
When source code is configured by:
+ /usr/bin/meson --buildtype=plain --prefix=/usr --libdir=/usr/lib64 --libexecdir=/usr/libexec --bindir=/usr/bin --sbindir=/usr/sbin --includedir=/usr/include --datadir=/usr/share --mandir=/usr/share/man --infodir=/usr/share/info --localedir=/usr/share/locale --sysconfdir=/etc --localstatedir=/var --sharedstatedir=/var/lib --wrap-mode=nodownload --auto-features=enabled . x86_64-redhat-linux-gnu -D backtrace=false -D build_programs=true -D build_tests=true -D debug_level=0 -D static_runtime=false -D multi_thread=enabled -D zlib=disabled -D lzma=disabled -D lz4=disabled
It fails with:
------- 12/14 test-legacy FAIL 0.01 s (exit status 1) --- command ---
cc @lzutao
Zstd is configured with legacy_level=5 by default, but the test-legacy expects zstd to support version 0.4.
I think we should add a flag to tests/legacy.c that controls the minimum legacy version tested. COMPRESSED is concatenated legacy versions. If you want to start at version X in [4, 8], find the only instance of \x2X\xb5\x2f\xfd in the string, which is the header for that version, and start compressing from there. You'll also have to start from an offset in EXPECTED.
Alternatively, for a short term fix we could just not run test-legacy if legacy_level != 4.
CC @lzutao
I'll take a look into this issue.
I think we should add a flag to tests/legacy.c that controls the minimum legacy version tested.
Agreed
Since then, meson jobs in CI have been only doing the build and never
doing the test. I was assume that we had other jobs that test the build
so we wouldn't want to do the test in meson jobs.
@Cyan4973 Hmm, I might find a test error that zstd has been
compressed the symbolic link. I tried to run meson test and
find it.
Edit: These lines https://github.com/facebook/zstd/blob/69baaee3e42f90dedea2c946bc19bfeac4e782ee/tests/playTests.sh#L336-L345