Skip to content

Commit

Permalink
Merge pull request #1217 from facebook/dev
Browse files Browse the repository at this point in the history
fix poolTest for v1.3.5
  • Loading branch information
Cyan4973 authored Jun 28, 2018
2 parents d174524 + a2c3a4c commit 90ae502
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ matrix:
- env: Cmd='make ppcinstall && make ppc64fuzz'
- env: Cmd='make -j uasanregressiontest && make clean && make -j msanregressiontest'

- env: Cmd='make lz4install && make -C tests test-lz4'

- env: Cmd='bash tests/libzstd_partial_builds.sh'
- env: Cmd='make lz4install && make -C tests test-lz4 test-pool && make clean && bash tests/libzstd_partial_builds.sh'

# tag-specific test
- if: tag =~ ^v[0-9]\.[0-9]
Expand Down
8 changes: 4 additions & 4 deletions programs/zstd.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.
.TH "ZSTD" "1" "2018-05-12" "zstd 1.3.4" "User Commands"
.TH "ZSTD" "1" "2018-06-27" "zstd 1.3.5" "User Commands"
.
.SH "NAME"
\fBzstd\fR \- zstd, zstdmt, unzstd, zstdcat \- Compress or decompress \.zst files
Expand Down Expand Up @@ -160,7 +160,7 @@ operate recursively on dictionaries
.
.TP
\fB\-\-format=FORMAT\fR
compress and decompress in other formats\. If compiled with support, zstd can compress to or decompress from other compression algorithm formats\. Possibly available options are \fBgzip\fR, \fBxz\fR, \fBlzma\fR, and \fBlz4\fR\.
compress and decompress in other formats\. If compiled with support, zstd can compress to or decompress from other compression algorithm formats\. Possibly available options are \fBzstd\fR, \fBgzip\fR, \fBxz\fR, \fBlzma\fR, and \fBlz4\fR\. If no such format is provided, \fBzstd\fR is the default\.
.
.TP
\fB\-h\fR/\fB\-H\fR, \fB\-\-help\fR
Expand Down Expand Up @@ -349,13 +349,13 @@ The impact of this field vary depending on selected strategy\.
For ZSTD_btopt and ZSTD_btultra, it specifies the minimum match length that causes match finder to stop searching for better matches\. A larger \fBtargetLen\fR usually improves compression ratio but decreases compression speed\.
.
.IP
For ZSTD_fast, it specifies the amount of data skipped between match sampling\. Impact is reversed : a larger \fBtargetLen\fR increases compression speed but decreases compression ratio\.
For ZSTD_fast, it triggers ultra\-fast mode when > 0\. The value represents the amount of data skipped between match sampling\. Impact is reversed : a larger \fBtargetLen\fR increases compression speed but decreases compression ratio\.
.
.IP
For all other strategies, this field has no impact\.
.
.IP
The minimum \fItlen\fR is 1 and the maximum is 999\.
The minimum \fItlen\fR is 0 and the maximum is 999\.
.
.TP
\fBoverlapLog\fR=\fIovlog\fR, \fBovlog\fR=\fIovlog\fR
Expand Down
6 changes: 3 additions & 3 deletions programs/zstd.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,14 +355,14 @@ The list of available _options_:
A larger `targetLen` usually improves compression ratio
but decreases compression speed.

For ZSTD\_fast, it specifies
the amount of data skipped between match sampling.
For ZSTD\_fast, it triggers ultra-fast mode when > 0.
The value represents the amount of data skipped between match sampling.
Impact is reversed : a larger `targetLen` increases compression speed
but decreases compression ratio.

For all other strategies, this field has no impact.

The minimum _tlen_ is 1 and the maximum is 999.
The minimum _tlen_ is 0 and the maximum is 999.

- `overlapLog`=_ovlog_, `ovlog`=_ovlog_:
Determine `overlapSize`, amount of data reloaded from previous job.
Expand Down
4 changes: 3 additions & 1 deletion programs/zstdcli.c
Original file line number Diff line number Diff line change
Expand Up @@ -561,13 +561,15 @@ int main(int argCount, const char* argv[])
continue;
}
if (longCommandWArg(&argument, "--fast")) {
/* Parse optional window log */
/* Parse optional acceleration factor */
if (*argument == '=') {
U32 fastLevel;
++argument;
fastLevel = readU32FromChar(&argument);
if (fastLevel) {
dictCLevel = cLevel = -(int)fastLevel;
} else {
CLEAN_RETURN(badusage(programName));
}
} else if (*argument != 0) {
/* Invalid character following --fast */
Expand Down
7 changes: 4 additions & 3 deletions tests/playTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ $ECHO "test : --fast aka negative compression levels"
$ZSTD --fast -f tmp # == -1
$ZSTD --fast=3 -f tmp # == -3
$ZSTD --fast=200000 -f tmp # == no compression
! $ZSTD -c --fast=0 tmp > $INTOVOID # should fail
$ECHO "test : too large numeric argument"
$ZSTD --fast=9999999999 -f tmp && die "should have refused numeric value"
$ECHO "test : compress to stdout"
Expand Down Expand Up @@ -532,7 +533,7 @@ fi
if [ $GZIPMODE -eq 1 ]; then
./datagen > tmp
rm -f tmp.zst
$ZSTD --format=gzip --format=zstd -f tmp
$ZSTD --format=gzip --format=zstd -f tmp
test -f tmp.zst
fi

Expand Down Expand Up @@ -637,11 +638,11 @@ $ECHO "\n===> suffix list test"

! $ZSTD -d tmp.abc 2> tmplg

if [ $GZIPMODE -ne 1 ]; then
if [ $GZIPMODE -ne 1 ]; then
grep ".gz" tmplg > $INTOVOID && die "Unsupported suffix listed"
fi

if [ $LZMAMODE -ne 1 ]; then
if [ $LZMAMODE -ne 1 ]; then
grep ".lzma" tmplg > $INTOVOID && die "Unsupported suffix listed"
grep ".xz" tmplg > $INTOVOID && die "Unsupported suffix listed"
fi
Expand Down
3 changes: 2 additions & 1 deletion tests/poolTests.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ void waitLongFn(void *opaque) {
static int testThreadReduction_internal(POOL_ctx* ctx, poolTest_t test)
{
int const nbWaits = 16;
UTIL_time_t startTime, time4threads, time2threads;
UTIL_time_t startTime;
U64 time4threads, time2threads;

test.val = 0;
test.max = nbWaits;
Expand Down

0 comments on commit 90ae502

Please sign in to comment.