Skip to content

Commit

Permalink
[TEMP] modules/zstd/zstd_dec_test: Skip testing invalid ZSTD frames
Browse files Browse the repository at this point in the history
Decodecorpus utility used for generating ZSTD frames for C++ tests of the
ZSTD Decoder generates invalid ZSTD frames when configured to generate
frames with RLE blocks for generator seeds: 41, 64, 92.

The frames generated with those seeds contain compressed blocks with RAW or RLE
literals instead of plain RLE blocks. Additionally, the frames cannot be
decoded correctly with the reference ZSTD library.

The above mentioned seeds will be excluded from the testing procedure.

Internal-tag: [#52186]
Signed-off-by: Pawel Czarnecki <[email protected]>
  • Loading branch information
lpawelcz committed Jun 12, 2024
1 parent f8e23df commit 61670e5
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions xls/modules/zstd/zstd_dec_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,18 @@ TEST_P(ZstdDecoderSeededTest, ParseMultipleFramesWithRawBlocks) {

TEST_P(ZstdDecoderSeededTest, ParseMultipleFramesWithRleBlocks) {
auto seed = GetParam();
auto frame = zstd::GenerateFrame(seed, zstd::BlockType::RLE);
EXPECT_TRUE(frame.ok());
this->ParseAndCompareWithZstd(frame.value());
// Skip testing invalid ZSTD frames
// Decodecorpus utility used for generating ZSTD frames for C++ tests of the
// ZSTD Decoder generates invalid ZSTD frames when configured to generate
// frames with RLE blocks for generator seeds: 41, 64, 92.
// The frames generated with those seeds contain compressed blocks with RAW or RLE
// literals instead of plain RLE blocks. Additionally, the frames cannot be
// decoded correctly with the reference ZSTD library.
if (seed != 41 && seed != 64 && seed != 92) {
auto frame = zstd::GenerateFrame(seed, zstd::BlockType::RLE);
EXPECT_TRUE(frame.ok());
this->ParseAndCompareWithZstd(frame.value());
}
}

INSTANTIATE_TEST_SUITE_P(
Expand Down

0 comments on commit 61670e5

Please sign in to comment.