]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
test: enable legacy support in version compatibility test
authorYann Collet <cyan@meta.com>
Thu, 18 Dec 2025 21:50:56 +0000 (13:50 -0800)
committerYann Collet <cyan@fb.com>
Thu, 18 Dec 2025 22:42:41 +0000 (14:42 -0800)
Summary:
The version compatibility test needs to decode legacy frames (v0.5.x - v0.7.x) to verify cross-version interoperability. Since legacy support is now disabled by default (v1.6.0), head must be built with ZSTD_LEGACY_SUPPORT=5 for this test.

Test Plan:
Run `python3 tests/test-zstd-versions.py` to verify cross-version compatibility testing works correctly.

tests/test-zstd-versions.py

index 1bcf39e2b25a1d63f374ba06268eeec074826e75..703faa47835627ca0a5145a007b6c7750be8d6fd 100755 (executable)
@@ -259,13 +259,16 @@ if __name__ == '__main__':
                     shutil.copy2('dictBuilder', '{}/dictBuilder.{}'.format(tmp_dir, tag))
                 os.chdir(r_dir + '/programs')  # /path/to/zstd/tests/versionsTest/<TAG>/programs
                 make(['clean'], False)  # separate 'clean' target to allow parallel build
-                make(['zstd'], False)
+                # Enable legacy support for cross-version compatibility testing
+                make(['zstd', 'ZSTD_LEGACY_SUPPORT=5'], False)
             else:
                 os.chdir(programs_dir)
                 print('-----------------------------------------------')
                 print('compiling head')
                 print('-----------------------------------------------')
-                make(['zstd'], False)
+                # Enable legacy support for head to test cross-version compatibility
+                # (legacy support is disabled by default since v1.6.0)
+                make(['zstd', 'ZSTD_LEGACY_SUPPORT=5'], False)
             shutil.copy2('zstd', dst_zstd)
 
     # remove any remaining *.zst and *.dec from previous test