[pykickstart][PATCH 4/5] Add tests for tmpfs usage
Martin Kolman
mkolman at redhat.com
Thu Nov 7 17:52:14 UTC 2013
Add tests that check parsing error is correctly
raised if --grow and/or --maxsize are used
for a tmpfs filesystem.
Related: rhbz#918621
Signed-off-by: Martin Kolman <mkolman at redhat.com>
---
tests/command_usage.py | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/tests/command_usage.py b/tests/command_usage.py
index 46b652d..6c11910 100644
--- a/tests/command_usage.py
+++ b/tests/command_usage.py
@@ -52,3 +52,19 @@ logvol / --vgname=foo --size=2000 --name=bar
volgroup foo pv.01
"""
self.assert_parse_error(long_incorrect_sequence)
+
+
+class TmpfsUsage_TestCase(CommandSequenceTest):
+ """Test tmpfs usage with the partition command"""
+
+ def runTest(self):
+ # the tmpfs filesystem supports the size and fsopt options
+ self.assert_parse('part /foo --size=100 --fstype=tmpfs --fsoptions="noexec"')
+ self.assert_parse('part /ham --fstype=tmpfs --fsoptions="size=250%"')
+ self.assert_parse('part /tmp --size=20000 --fstype=tmpfs')
+
+ # the tmpfs filesystem dos not support the --grow and --maxsize
+ # options
+ self.assert_parse_error("part --fstype=tmpfs /tmp --grow")
+ self.assert_parse_error("part --fstype=tmpfs /tmp --grow --maxsize=1000")
+ self.assert_parse_error("part --fstype=tmpfs /tmp --maxsize=1000")
--
1.8.3.1
More information about the anaconda-patches
mailing list