Skip to content
Merged

Dev11 #519

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 21 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -112,6 +107,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
Expand All @@ -131,16 +143,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
Expand All @@ -158,5 +160,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
4 changes: 2 additions & 2 deletions lib/compress/zstd_opt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand Down
5 changes: 5 additions & 0 deletions programs/fileio.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,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));
}
Expand Down Expand Up @@ -361,6 +365,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 */

Expand Down
4 changes: 2 additions & 2 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ endif

VOID = /dev/null
ZSTREAM_TESTTIME = -T2mn
FUZZERTEST= -T5mn
ZSTDRTTEST= --test-large-data
FUZZERTEST ?= -T5mn
ZSTDRTTEST = --test-large-data

.PHONY: default all all32 dll clean test test32 test-all namespaceTest versionsTest

Expand Down
2 changes: 1 addition & 1 deletion zlibWrapper/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ zwrapbench
*.txt

# Directories
minizip/
minizip/