From: Yann Collet Date: Thu, 18 Dec 2025 21:39:28 +0000 (-0800) Subject: test: update libzstd_builds.sh for disabled legacy default X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ba2f20a905386bb3524edb95335d101de9f5f66;p=thirdparty%2Fzstd.git test: update libzstd_builds.sh for disabled legacy default Summary: Updates the library build tests to reflect that legacy format support is now disabled by default. Also adds a new test case to verify that legacy support can still be explicitly enabled via ZSTD_LEGACY_SUPPORT=5. Test Plan: Run `bash tests/libzstd_builds.sh` on a Linux environment. --- diff --git a/tests/libzstd_builds.sh b/tests/libzstd_builds.sh index f9e1e76c6..3b019c8b8 100755 --- a/tests/libzstd_builds.sh +++ b/tests/libzstd_builds.sh @@ -21,14 +21,14 @@ mustBeAbsent() { $ECHO "$@ correctly not present" # for some reason, this $ECHO must exist, otherwise mustBeAbsent() always fails (??) } -# default compilation : all features enabled - no zbuff +# default compilation : all features enabled - no zbuff, no legacy $ECHO "testing default library compilation" CFLAGS= make -C $DIR/../lib libzstd libzstd.a > $INTOVOID nm $DIR/../lib/libzstd.a | $GREP "\.o" > tmplog isPresent "zstd_compress.o" isPresent "zstd_decompress.o" isPresent "zdict.o" -isPresent "zstd_v07.o" +mustBeAbsent "zstd_v07.o" mustBeAbsent "zbuff_compress.o" $RM tmplog @@ -44,7 +44,7 @@ nm $DIR/../lib/libzstd.a | $GREP "\.o" > tmplog mustBeAbsent "zstd_compress.o" isPresent "zstd_decompress.o" mustBeAbsent "zdict.o" -isPresent "zstd_v07.o" +mustBeAbsent "zstd_v07.o" mustBeAbsent "zbuff_compress.o" $RM $DIR/../lib/libzstd.a tmplog @@ -66,7 +66,7 @@ nm $DIR/../lib/libzstd.a | $GREP "\.o" > tmplog isPresent "zstd_compress.o" isPresent "zstd_decompress.o" isPresent "zdict.o" -isPresent "zstd_v07.o" +mustBeAbsent "zstd_v07.o" mustBeAbsent "zbuff_compress.o" $RM $DIR/../lib/libzstd.a tmplog @@ -77,7 +77,7 @@ nm $DIR/../lib/libzstd.a | $GREP "\.o" > tmplog isPresent "zstd_compress.o" isPresent "zstd_decompress.o" isPresent "zdict.o" -isPresent "zstd_v07.o" +mustBeAbsent "zstd_v07.o" isPresent "zbuff_compress.o" $RM $DIR/../lib/libzstd.a tmplog @@ -88,7 +88,7 @@ nm $DIR/../lib/libzstd.a | $GREP "\.o" > tmplog isPresent "zstd_compress.o" isPresent "zstd_decompress.o" mustBeAbsent "zdict.o" -isPresent "zstd_v07.o" +mustBeAbsent "zstd_v07.o" mustBeAbsent "zbuff_compress.o" $RM $DIR/../lib/libzstd.a tmplog @@ -102,3 +102,14 @@ mustBeAbsent "zdict.o" mustBeAbsent "zstd_v07.o" mustBeAbsent "zbuff_compress.o" $RM $DIR/../lib/libzstd.a tmplog + +# legacy support explicitly enabled +$ECHO "testing with legacy support explicitly enabled" +ZSTD_LEGACY_SUPPORT=5 CFLAGS= make -C $DIR/../lib libzstd.a > $INTOVOID +nm $DIR/../lib/libzstd.a | $GREP "\.o" > tmplog +isPresent "zstd_compress.o" +isPresent "zstd_decompress.o" +isPresent "zdict.o" +isPresent "zstd_v07.o" +mustBeAbsent "zbuff_compress.o" +$RM $DIR/../lib/libzstd.a tmplog