From 9c58125086a595bf049b8cbd6c2c3f5e019d8c33 Mon Sep 17 00:00:00 2001 From: Martin Kolman Date: Thu, 7 Nov 2013 10:35:46 +0100 Subject: [PATCH] Add tests for tmpfs usage Add tests that check parsing error is correctly raised if --grow and/or --maxsize are used for a tmpfs filesystem. Related: rhbz#918621 --- 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") -- 2.11.4.GIT