summaryrefslogtreecommitdiffstats
path: root/regressions
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-04-17 14:25:55 +0100
committerRichard Jones <rjones@redhat.com>2010-04-17 15:22:29 +0100
commit5922d7084d6b43f0a1a15b664c7082dfeaf584d0 (patch)
tree465894bcdc5286627c25df62adcbd75a10125e96 /regressions
parent68467cb1c2f8b1cc7844ed6512b7f76ef2aba1d1 (diff)
downloadlibguestfs-5922d7084d6b43f0a1a15b664c7082dfeaf584d0.tar.gz
libguestfs-5922d7084d6b43f0a1a15b664c7082dfeaf584d0.tar.xz
libguestfs-5922d7084d6b43f0a1a15b664c7082dfeaf584d0.zip
Fix upload losing synchronization if root not mounted (RHBZ#576879).
Modify the generator so that it can correctly handle early cancellation for Pathname|Device|.. parameters. This fixes the upload command, but consequently we need to fix the parameters for tar_in and t?z_in commands. This should also mean that 'win:' can now be used as the second argument of tar_in and t?z_in commands in guestfish, whereas previously this wouldn't have worked. Adds a regression test for the original problem.
Diffstat (limited to 'regressions')
-rw-r--r--regressions/Makefile.am1
-rwxr-xr-xregressions/rhbz576879.sh33
2 files changed, 34 insertions, 0 deletions
diff --git a/regressions/Makefile.am b/regressions/Makefile.am
index 8513f9ae..7ec9dc83 100644
--- a/regressions/Makefile.am
+++ b/regressions/Makefile.am
@@ -27,6 +27,7 @@ TESTS = \
rhbz503169c10.sh \
rhbz503169c13.sh \
rhbz557655.sh \
+ rhbz576879.sh \
rhbz578407.sh \
rhbz580246.sh \
test-cancellation-download-librarycancels.sh \
diff --git a/regressions/rhbz576879.sh b/regressions/rhbz576879.sh
new file mode 100755
index 00000000..639dd7cf
--- /dev/null
+++ b/regressions/rhbz576879.sh
@@ -0,0 +1,33 @@
+#!/bin/bash -
+# libguestfs
+# Copyright (C) 2010 Red Hat Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# 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.
+
+# Regression test for:
+# https://bugzilla.redhat.com/show_bug.cgi?id=576879
+# upload loses synchronization if the disk is not mounted
+
+set -e
+
+rm -f test1.img
+
+../fish/guestfish <<EOF
+alloc test1.img 10M
+run
+-upload $srcdir/rhbz576879.sh /test.sh
+# Shouldn't lose synchronization, so next command should work:
+ping-daemon
+EOF \ No newline at end of file