From f547a98fcb25771a5c998c852a47283aea0129d2 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 13 Feb 2012 13:48:02 +0000 Subject: tests: Add a regression test for RHBZ#789960. Test all the ways that the 'mount' command can fail. Ensure that none of them result in failures or desynchronization. (cherry picked from commit cd06ddf4422a31528f4a268dad813938947e1a0d) --- tests/regressions/Makefile.am | 1 + tests/regressions/rhbz789960.sh | 68 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100755 tests/regressions/rhbz789960.sh diff --git a/tests/regressions/Makefile.am b/tests/regressions/Makefile.am index 97e0e671..3aed6008 100644 --- a/tests/regressions/Makefile.am +++ b/tests/regressions/Makefile.am @@ -26,6 +26,7 @@ TESTS = \ rhbz580246.sh \ rhbz602997.sh \ rhbz690819.sh \ + rhbz789960.sh \ test-noexec-stack.pl tests_not_run = \ diff --git a/tests/regressions/rhbz789960.sh b/tests/regressions/rhbz789960.sh new file mode 100755 index 00000000..b1d59343 --- /dev/null +++ b/tests/regressions/rhbz789960.sh @@ -0,0 +1,68 @@ +#!/bin/bash - +# libguestfs +# Copyright (C) 2012 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +# https://bugzilla.redhat.com/show_bug.cgi?id=789960 +# Test the mount command error paths. + +set -e +export LANG=C + +rm -f test.out + +../../fish/guestfish -a ../guests/fedora.img --ro > test.out <