X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=regressions%2Ftest-cancellation-download-librarycancels.sh;h=117794db4ed929f3fb0915e3b7392e74776e0c37;hb=2972987d0257d9c3d26b53f961e802d121b436cd;hp=2cacdd353777334d0ba6163d73201e2b4c94404b;hpb=b5e29ac706004ad29da2e0949beda41e8e27e398;p=libguestfs.git diff --git a/regressions/test-cancellation-download-librarycancels.sh b/regressions/test-cancellation-download-librarycancels.sh index 2cacdd3..117794d 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. # @@ -14,27 +14,40 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # 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 <