Merge pull request #519 from inikep/dev11

Dev11
This commit is contained in:
Yann Collet 2017-01-26 14:23:44 -08:00 committed by GitHub
commit 717c65d690
5 changed files with 31 additions and 22 deletions

View File

@ -8,10 +8,6 @@ matrix:
# Container-based Ubuntu 12.04 LTS Server Edition 64 bit (doesn't support 32-bit includes)
- env: Ubu=12.04cont Cmd="make test && make clean && make travis-install"
os: linux
sudo: false
- env: Ubu=12.04cont Cmd="make zlibwrapper && make clean && make -C tests test-symbols && make clean && make -C tests test-zstd-nolegacy && make clean && make cmaketest && make clean && make -C contrib/pzstd googletest pzstd tests check && make -C contrib/pzstd clean"
os: linux
sudo: false
@ -80,7 +76,6 @@ matrix:
- gcc-arm-linux-gnueabi
- libc6-dev-armel-cross
# Ubuntu 14.04 LTS Server Edition 64 bit
- env: Ubu=14.04 Cmd="make aarch64test"
dist: trusty
sudo: required
@ -121,6 +116,23 @@ matrix:
packages:
- valgrind
# other feature branches => short tests
- env: Ubu=12.04cont Cmd="make test && make clean && make travis-install"
os: linux
sudo: false
- env: Ubu=14.04 Cmd="make -C tests test32"
os: linux
dist: trusty
sudo: required
addons:
apt:
packages:
- libc6-dev-i386
- gcc-multilib
- env: Ubu=14.04 Cmd="make gpptest && make clean && make gnu90test && make clean
&& make c99test && make clean && make gnu99test && make clean
&& make clangtest && make clean && make -C contrib/pzstd googletest32
@ -140,16 +152,6 @@ matrix:
- g++-4.8
- g++-4.8-multilib
- env: Ubu=14.04 Cmd="make -C tests test32"
os: linux
dist: trusty
sudo: required
addons:
apt:
packages:
- libc6-dev-i386
- gcc-multilib
- env: Ubu=14.04 Cmd="make gcc5test && make clean && make gcc6test && make clean && make -C tests dll"
os: linux
dist: trusty
@ -167,5 +169,7 @@ matrix:
script:
- JOB_NUMBER=$(echo $TRAVIS_JOB_NUMBER | sed -e 's:[0-9][0-9]*\.\(.*\):\1:')
# - if [ $JOB_NUMBER -eq 9 ] || [ $JOB_NUMBER -eq 10 ]; then sh -c "$Cmd"; fi
- sh -c "$Cmd"
# dev => normal tests; other feature branches => short tests (number > 11)
- if [ "$TRAVIS_PULL_REQUEST" = "true" ] || [ $JOB_NUMBER -gt 11 ] || [ "$TRAVIS_BRANCH" = "dev" ] && [ "$TRAVIS_BRANCH" != "master" ]; then sh -c "$Cmd"; fi
# master => long tests, as this is the final step towards a Release
- if [ "$TRAVIS_BRANCH" = "master" ]; then FUZZERTEST=-T10mn sh -c "$Cmd"; fi

View File

@ -825,7 +825,7 @@ void ZSTD_compressBlock_opt_extDict_generic(ZSTD_CCtx* ctx,
match_num = ZSTD_BtGetAllMatches_selectMLS_extDict(ctx, inr, iend, maxSearches, mls, matches, minMatch);
if (match_num > 0 && matches[match_num-1].len > sufficient_len) {
if (match_num > 0 && (matches[match_num-1].len > sufficient_len || cur + matches[match_num-1].len >= ZSTD_OPT_NUM)) {
best_mlen = matches[match_num-1].len;
best_off = matches[match_num-1].off;
last_pos = cur + 1;
@ -835,7 +835,7 @@ void ZSTD_compressBlock_opt_extDict_generic(ZSTD_CCtx* ctx,
/* set prices using matches at position = cur */
for (u = 0; u < match_num; u++) {
mlen = (u>0) ? matches[u-1].len+1 : best_mlen;
best_mlen = (cur + matches[u].len < ZSTD_OPT_NUM) ? matches[u].len : ZSTD_OPT_NUM - cur;
best_mlen = matches[u].len;
while (mlen <= best_mlen) {
if (opt[cur].mlen == 1) {

View File

@ -158,6 +158,10 @@ static FILE* FIO_openSrcFile(const char* srcFileName)
f = stdin;
SET_BINARY_MODE(stdin);
} else {
if (!UTIL_doesFileExists(srcFileName)) {
DISPLAYLEVEL(1, "zstd: %s is not a regular file -- ignored \n", srcFileName);
return NULL;
}
f = fopen(srcFileName, "rb");
if ( f==NULL ) DISPLAYLEVEL(1, "zstd: %s: %s \n", srcFileName, strerror(errno));
}
@ -414,6 +418,7 @@ static int FIO_compressFilename_srcFile(cRess_t ress,
DISPLAYLEVEL(1, "zstd: %s is a directory -- ignored \n", srcFileName);
return 1;
}
ress.srcFile = FIO_openSrcFile(srcFileName);
if (!ress.srcFile) return 1; /* srcFile could not be opened */

View File

@ -54,7 +54,7 @@ endif
VOID = /dev/null
ZSTREAM_TESTTIME = -T2mn
FUZZERTEST= -T5mn
FUZZERTEST ?= -T5mn
ZSTDRTTEST = --test-large-data
.PHONY: default all all32 dll clean test test32 test-all namespaceTest versionsTest