X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=regressions%2Ftest-inspect-fstab.sh;h=332cde0c9b5a9b58d7eb4b6a811cd01b4cff15ab;hb=29172e7c4878085a680812f7f3b8ad6ea5f1193c;hp=bb79a817222d63461a14d49807227cdd74f2e60b;hpb=a1df33eac2c0a0a4fbb256871e491e28dd11ce90;p=libguestfs.git diff --git a/regressions/test-inspect-fstab.sh b/regressions/test-inspect-fstab.sh index bb79a81..332cde0 100755 --- a/regressions/test-inspect-fstab.sh +++ b/regressions/test-inspect-fstab.sh @@ -14,7 +14,7 @@ # # 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 various aspects of core inspection of /etc/fstab. # This also tests: https://bugzilla.redhat.com/668574 @@ -93,6 +93,38 @@ if [ "$(cat test.output)" != "/dev/VG/Root exit 1 fi +cat <<'EOF' > test.fstab +/dev/VG/Root / ext2 default 0 0 + +# cciss device which requires a hint +/dev/cciss/c1d3p1 /boot ext2 default 0 0 + +# cciss device, whole disk +/dev/cciss/c1d3 /var ext2 default 0 0 +EOF + +$guestfish -a test1.img <<'EOF' + run + mount-options "" /dev/VG/Root / + upload test.fstab /etc/fstab +EOF + +$guestfish <<'EOF' > test.output + add-drive-opts test1.img readonly:true name:cciss/c1d3 + run + inspect-os + inspect-get-mountpoints /dev/VG/Root +EOF + +if [ "$(cat test.output)" != "/dev/VG/Root +/: /dev/VG/Root +/boot: /dev/vda1 +/var: /dev/vda" ]; then + echo "$0: error: unexpected output from inspect-get-mountpoints command" + cat test.output + exit 1 +fi + rm test.fstab rm test1.img rm test.output