]> git.saurik.com Git - apt.git/blame_incremental - test/integration/test-bug-lp1445239-download-loop
report warnings&errors consistently in edit-sources
[apt.git] / test / integration / test-bug-lp1445239-download-loop
... / ...
CommitLineData
1#!/bin/sh
2#
3# this is a regression test for LP: #1445239 where a partial download can
4# trigger an endless hang of the download method
5#
6
7set -e
8
9TESTDIR="$(readlink -f "$(dirname "$0")")"
10. "$TESTDIR/framework"
11setupenvironment
12configarchitecture 'amd64'
13
14changetowebserver
15webserverconfig 'aptwebserver::support::range' 'true'
16
17TESTFILE='aptarchive/testfile'
18dd if=/dev/zero of=$TESTFILE bs=100k count=1 2>/dev/null
19
20DOWNLOADLOG='rootdir/tmp/testdownloadfile.log'
21
22TARGET=./downloaded/testfile-downloaded
23dd if=/dev/zero of=$TARGET bs=99k count=1 2>/dev/null
24if ! downloadfile http://localhost:${APTHTTPPORT}/testfile "$TARGET" > "$DOWNLOADLOG"; then
25 cat >&2 "$DOWNLOADLOG"
26 msgfail
27else
28 msgpass
29fi