File tree 1 file changed +31
-9
lines changed
1 file changed +31
-9
lines changed Original file line number Diff line number Diff line change @@ -1569,21 +1569,43 @@ elif [ "$longCSize19wlog23" -gt "$optCSize19wlog23" ]; then
1569
1569
fi
1570
1570
1571
1571
println " \n===> zstd asyncio decompression tests "
1572
- roundTripTest -g8M " 3 --asyncio"
1573
- roundTripTest -g8M " 3 --no-asyncio"
1572
+
1573
+ addFrame () {
1574
+ datagen -g2M -s$2 >> tmp_uncompressed
1575
+ datagen -g2M -s$2 | zstd --format=$1 >> tmp_compressed.zst
1576
+ }
1577
+
1578
+ addTwoFrames () {
1579
+ addFrame $1 1
1580
+ addFrame $1 2
1581
+ }
1582
+
1583
+ testAsyncIO () {
1584
+ roundTripTest -g2M " 3 --asyncio --format=$1 "
1585
+ roundTripTest -g2M " 3 --no-asyncio --format=$1 "
1586
+ }
1587
+
1588
+ rm -f tmp_compressed tmp_uncompressed
1589
+ testAsyncIO zstd
1590
+ addTwoFrames zstd
1574
1591
if [ $GZIPMODE -eq 1 ]; then
1575
- roundTripTest -g8M " 3 --format= gzip --asyncio "
1576
- roundTripTest -g8M " 3 --format= gzip --no-asyncio "
1592
+ testAsyncIO gzip
1593
+ addTwoFrames gzip
1577
1594
fi
1578
1595
if [ $LZMAMODE -eq 1 ]; then
1579
- roundTripTest -g8M " 3 --format= lzma --asyncio "
1580
- roundTripTest -g8M " 3 --format= lzma --no-asyncio "
1596
+ testAsyncIO lzma
1597
+ addTwoFrames lzma
1581
1598
fi
1582
1599
if [ $LZ4MODE -eq 1 ]; then
1583
- roundTripTest -g8M " 3 --format= lz4 --asyncio "
1584
- roundTripTest -g8M " 3 --format= lz4 --no-asyncio "
1600
+ testAsyncIO lz4
1601
+ addTwoFrames lz4
1585
1602
fi
1586
-
1603
+ cat tmp_uncompressed | $MD5SUM > tmp2
1604
+ zstd -d tmp_compressed.zst --asyncio -c | $MD5SUM > tmp1
1605
+ $DIFF -q tmp1 tmp2
1606
+ rm tmp1
1607
+ zstd -d tmp_compressed.zst --no-asyncio -c | $MD5SUM > tmp1
1608
+ $DIFF -q tmp1 tmp2
1587
1609
1588
1610
if [ " $1 " != " --test-large-data" ]; then
1589
1611
println " Skipping large data tests"
You can’t perform that action at this time.
0 commit comments