X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=regressions%2Ftest-cancellation-download-librarycancels.sh;h=5f6ebf1ed46b344816ae7b687ad945a0b0216ae0;hb=25454b83082a4cfed4f1664d2f9cdfcb222ba7c2;hp=b0d78c9698667d88efd48f8108ac4216d29e115b;hpb=8ae7e1057f43e9b79260cdf191f39d657fdf0293;p=libguestfs.git diff --git a/regressions/test-cancellation-download-librarycancels.sh b/regressions/test-cancellation-download-librarycancels.sh index b0d78c9..5f6ebf1 100755 --- a/regressions/test-cancellation-download-librarycancels.sh +++ b/regressions/test-cancellation-download-librarycancels.sh @@ -1,4 +1,4 @@ -#!/bin/sh - +#!/bin/bash - # libguestfs # Copyright (C) 2009 Red Hat Inc. # @@ -18,23 +18,36 @@ # Test download where the library cancels. # -# +# Download big and small files to /dev/full. This should fail but not +# kill the appliance. We test various randomized file sizes because +# there are many potential race conditions -- for example the daemon +# may or may not send all of its data because the error condition is +# detected. set -e rm -f test.img -../fish/guestfish <<'EOF' -add ../images/test.sqsh +size=$(awk 'BEGIN{ srand(); print int(16*1024*rand()) }') +echo "$0: test size $size (bytes)" + +../fish/guestfish <