summaryrefslogtreecommitdiffstats
path: root/test/t/test_fio.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/t/test_fio.py')
-rw-r--r--test/t/test_fio.py40
1 files changed, 39 insertions, 1 deletions
diff --git a/test/t/test_fio.py b/test/t/test_fio.py
index 0f6eba7..dadb5ac 100644
--- a/test/t/test_fio.py
+++ b/test/t/test_fio.py
@@ -10,6 +10,44 @@ class TestFio:
def test_2(self, completion):
assert completion
- @pytest.mark.complete("fio --debug=foo,")
+ @pytest.mark.complete("fio --debug=foo,", require_cmd=True)
def test_3(self, completion):
assert completion
+
+ @pytest.mark.complete("fio --ioengin", require_cmd=True)
+ def test_cmdhelp_all(self, completion):
+ """Test we got a "known present" option from --cmdhelp=all."""
+ assert completion == "e=" or "e" in completion
+
+ @pytest.mark.complete("fio --ioengine=", require_cmd=True)
+ def test_enghelp(self, completion):
+ """Test --enghelp parsing."""
+ assert completion
+
+ @pytest.mark.complete("fio --unlink=", require_cmd=True)
+ def test_cmdhelp_boolean(self, completion):
+ """Test --cmdhelp=COMMAND boolean parsing."""
+ assert completion == "0 1".split()
+
+ @pytest.mark.complete("fio --kb_base=", require_cmd=True)
+ def test_cmdhelp_valid_values(self, completion):
+ """Test --cmdhelp=COMMAND valid values parsing."""
+ # We expect kb_base args to be stable, no additions/removals.
+ assert completion == "1000 1024".split()
+
+ @pytest.mark.complete("fio --non_exist3nt_option=", require_cmd=True)
+ def test_cmdhelp_nonexistent(self, completion):
+ """Test --cmdhelp=COMMAND errors out gracefully."""
+ assert not completion
+
+ @pytest.mark.complete(
+ "fio --crctest=",
+ require_cmd=True,
+ xfail="! fio --help 2>&1 | command grep -q -- --crctest",
+ )
+ def test_crctest(self, completion):
+ assert "sha1" in completion
+
+ @pytest.mark.complete("fio --debug=", require_cmd=True)
+ def test_debug(self, completion):
+ assert "process" in completion