You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

29 lines
658 B

  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. set -e
  7. TESTDIR="$(readlink -f "$(dirname "$0")")"
  8. . "$TESTDIR/framework"
  9. setupenvironment
  10. configarchitecture 'amd64'
  11. changetowebserver
  12. TESTFILE='aptarchive/testfile'
  13. dd if=/dev/zero of=$TESTFILE bs=100k count=1 2>/dev/null
  14. DOWNLOADLOG='rootdir/tmp/testdownloadfile.log'
  15. TARGET=./downloaded/testfile-downloaded
  16. dd if=/dev/zero of=$TARGET bs=99k count=1 2>/dev/null
  17. if ! downloadfile http://localhost:${APTHTTPPORT}/testfile "$TARGET" > "$DOWNLOADLOG"; then
  18. cat >&2 "$DOWNLOADLOG"
  19. msgfail
  20. else
  21. msgpass
  22. fi