[petitboot-test 2/2] tests: Add a test to confirm Petitboot can mount filesystems
Samuel Mendoza-Jonas
sam.mj at au1.ibm.com
Mon Mar 23 17:03:33 AEDT 2015
Changes in petitboot may involve updating the mount options for some
filesystems. Include a test to check that the more common filesystems
are being mounted correctly
Signed-off-by: Samuel Mendoza-Jonas <sam.mj at au1.ibm.com>
---
tests/testMountOptions.py | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
create mode 100644 tests/testMountOptions.py
diff --git a/tests/testMountOptions.py b/tests/testMountOptions.py
new file mode 100644
index 0000000..b00dee8
--- /dev/null
+++ b/tests/testMountOptions.py
@@ -0,0 +1,35 @@
+
+import pbtest
+
+class MountOptionTest(pbtest.PBTestCase):
+
+ def setUp(self):
+ self.machine = self.machineclass()
+
+ ext2disk = pbtest.RootFS(image_format='ext2')
+ self.machine.add_rootfs(ext2disk)
+
+ ext3disk = pbtest.RootFS(image_format='ext3')
+ self.machine.add_rootfs(ext3disk)
+
+ ext4disk = pbtest.RootFS(image_format='ext4')
+ self.machine.add_rootfs(ext4disk)
+
+ xfsdisk = pbtest.RootFS(image_format='xfs')
+ self.machine.add_rootfs(xfsdisk)
+
+ def testMount(self):
+ self.bootToUI()
+ self.send('x')
+ self.send('\r')
+
+ # List mounted devices and check for filesystem types
+ self.send('mount')
+ self.send('\r')
+
+ # Assume devices are listed in order added
+ self.expect('ext2', timeout=10)
+ # We expect Petitboot to mount ext3 devices as ext4
+ self.expect('ext4', timeout=10)
+ self.expect('ext4', timeout=10)
+ self.expect('xfs', timeout=10)
--
2.1.0
More information about the Petitboot
mailing list