summaryrefslogtreecommitdiffstats
path: root/regressions/rhbz576879.sh
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-05-12 19:55:06 +0100
committerRichard Jones <rjones@redhat.com>2010-05-13 17:08:02 +0100
commitdc706a639eec16084c0618baf7bfde00c6565f63 (patch)
treee96751894fe49bf81e704436fc089a173b0f44fc /regressions/rhbz576879.sh
parent11a2ad8c9a1da7fe7f8142be69312d0cb5979e0a (diff)
downloadlibguestfs-dc706a639eec16084c0618baf7bfde00c6565f63.tar.gz
libguestfs-dc706a639eec16084c0618baf7bfde00c6565f63.tar.xz
libguestfs-dc706a639eec16084c0618baf7bfde00c6565f63.zip
Fix FileIn cmds losing synch if both ends send cancel messages (RHBZ#576879).
During a FileIn command (eg. upload, tar-in) if both sides experience errors, then both sides could send cancel messages, the result being lost synchronization. The reason for the lost synch was because the daemon was ignoring this case and sending an error message back which the library side (which had cancelled) was not expecting. Fix this by checking in the daemon for the case where the library also cancels during daemon cancellation, and not sending an error messages. This also includes an enhanced regression test which checks for this case. This extends the original fix in commit 5922d7084d6b43f0a1a15b664c7082dfeaf584d0. More details can be found here: https://bugzilla.redhat.com/show_bug.cgi?id=576879#c5
Diffstat (limited to 'regressions/rhbz576879.sh')
-rwxr-xr-xregressions/rhbz576879.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/regressions/rhbz576879.sh b/regressions/rhbz576879.sh
index 7453ac78..d5711fd5 100755
--- a/regressions/rhbz576879.sh
+++ b/regressions/rhbz576879.sh
@@ -28,4 +28,14 @@ rm -f test1.img
-upload $srcdir/rhbz576879.sh /test.sh
# Shouldn't lose synchronization, so next command should work:
ping-daemon
-EOF \ No newline at end of file
+EOF
+
+# Second patch tests the problem found in comment 5 where both ends
+# send cancel messages simultaneously.
+
+../fish/guestfish -N disk <<EOF
+-tar-in /tmp/nosuchfile /blah
+ping-daemon
+EOF
+
+rm -f test1.img \ No newline at end of file