diff options
author | Michael Vogt <mvo@debian.org> | 2015-08-18 11:54:05 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2015-08-18 11:54:05 +0200 |
commit | 21248c0f00ee71412dbadc6ebf84011cf974346d (patch) | |
tree | 7dc1f5904399482d2128765b5b86d57a4ac5b3e1 /test/integration/test-bug-lp1445239-download-loop | |
parent | e5f34ad3b043abf033c1626eb8449b75955d6760 (diff) | |
parent | 4fc6b7570c3e97b65c118b58cdf6729fa94c9b03 (diff) |
Merge branch 'debian/experimental' into feature/srv-records
Conflicts:
cmdline/apt-helper.cc
cmdline/makefile
Diffstat (limited to 'test/integration/test-bug-lp1445239-download-loop')
-rwxr-xr-x | test/integration/test-bug-lp1445239-download-loop | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/integration/test-bug-lp1445239-download-loop b/test/integration/test-bug-lp1445239-download-loop new file mode 100755 index 000000000..4e4de67bd --- /dev/null +++ b/test/integration/test-bug-lp1445239-download-loop @@ -0,0 +1,29 @@ +#!/bin/sh +# +# this is a regression test for LP: #1445239 where a partial download can +# trigger an endless hang of the download method +# + +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' + +changetowebserver +webserverconfig 'aptwebserver::support::range' 'true' + +TESTFILE='aptarchive/testfile' +dd if=/dev/zero of=$TESTFILE bs=100k count=1 2>/dev/null + +DOWNLOADLOG='rootdir/tmp/testdownloadfile.log' + +TARGET=./downloaded/testfile-downloaded +dd if=/dev/zero of=$TARGET bs=99k count=1 2>/dev/null +if ! downloadfile http://localhost:8080/testfile "$TARGET" > "$DOWNLOADLOG"; then + cat >&2 "$DOWNLOADLOG" + msgfail +else + msgpass +fi |