summaryrefslogtreecommitdiffstats
path: root/python/run-python-tests
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-10-26 15:55:29 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-10-26 17:07:02 +0100
commit62909197d120c01cc86095518aacca9d4ad268dd (patch)
tree8727849008a61cb7c6b5d20d2c977a5f46d23677 /python/run-python-tests
parentced99cf69e55515a58b4651767bda4ab17c82776 (diff)
downloadlibguestfs-62909197d120c01cc86095518aacca9d4ad268dd.tar.gz
libguestfs-62909197d120c01cc86095518aacca9d4ad268dd.tar.xz
libguestfs-62909197d120c01cc86095518aacca9d4ad268dd.zip
test-user-cancel: Make this test choose smaller cancellation numbers.
Use a Gaussian distribution for random numbers so that smaller numbers are chosen more frequently. This also exposes a bug in this test which only happens when small numbers are chosen: If the test thread starts up quickly, it can get to guestfs_user_cancel before the guestfs_upload command has happened in the main thread. This causes the cancel to be ignored (correctly) and we end up in the second loop writing data until the disk runs out of space. Fix this by repeatedly asserting the cancel flag in the second loop.
Diffstat (limited to 'python/run-python-tests')
0 files changed, 0 insertions, 0 deletions