Tests: Update expected Zstandard magic number for libarchive 3.8.2

libarchive 3.8.2 enabled Zstandard's checksum feature in the zstd write
filter.  Update our tests' expected results accordingly.

Fixes: #27355
Reported-by: Funda Wang <fundawang@yeah.net>
This commit is contained in:
Brad King
2025-11-10 14:58:15 -05:00
parent 253b2b8c7b
commit 576117b7eb
4 changed files with 12 additions and 2 deletions

View File

@@ -7,4 +7,5 @@ set(DECOMPRESSION_FLAGS xvf)
include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake)
check_magic("28b52ffd0058" LIMIT 6 HEX)
# libarchive 3.8.2 enables a checksum feature; older versions do not.
check_magic("^28b52ffd0[04]58$" LIMIT 6 HEX)

View File

@@ -86,6 +86,10 @@ function(check_magic EXPECTED)
${ARGN}
)
if(EXPECTED MATCHES "[^0-9a-f]" AND ACTUAL MATCHES "${EXPECTED}")
return()
endif()
if(NOT ACTUAL STREQUAL EXPECTED)
message(FATAL_ERROR
"Actual [${ACTUAL}] does not match expected [${EXPECTED}]")

View File

@@ -5,4 +5,5 @@ set(COMPRESSION_TYPE Zstd)
include(${CMAKE_CURRENT_LIST_DIR}/roundtrip.cmake)
check_magic("28b52ffd0058" LIMIT 6 HEX)
# libarchive 3.8.2 enables a checksum feature; older versions do not.
check_magic("^28b52ffd0[04]58$" LIMIT 6 HEX)

View File

@@ -86,6 +86,10 @@ function(check_magic EXPECTED)
${ARGN}
)
if(EXPECTED MATCHES "[^0-9a-f]" AND ACTUAL MATCHES "${EXPECTED}")
return()
endif()
if(NOT ACTUAL STREQUAL EXPECTED)
message(FATAL_ERROR
"Actual [${ACTUAL}] does not match expected [${EXPECTED}]")