From 0d3b37b580a6c8dc4a72dcce5ea99b0869ce82b2 Mon Sep 17 00:00:00 2001 From: Slawomir Jankowski Date: Wed, 19 Aug 2020 15:27:11 +0200 Subject: [PATCH 1/3] Fix notification about NVME device Signed-off-by: Slawomir Jankowski --- casadm/cas_lib.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/casadm/cas_lib.c b/casadm/cas_lib.c index d72601f..1f4c90e 100644 --- a/casadm/cas_lib.c +++ b/casadm/cas_lib.c @@ -971,9 +971,7 @@ int start_cache(uint16_t cache_id, unsigned int cache_init, if (!cmd.metadata_mode_optimal) cas_printf(LOG_NOTICE, "Selected metadata mode is not optimal for device %s.\n" - "You can improve cache performance by formating your device\n" - "to use optimal metadata mode with following command:\n" - "casadm --nvme --format atomic --device %s\n", + "You can improve cache performance by formatting your device\n", cache_device, cache_device); check_cache_scheduler(cache_device, From 873be2bf3a80d8e314e31483cc4c7165e89ebd6d Mon Sep 17 00:00:00 2001 From: Slawomir Jankowski Date: Wed, 19 Aug 2020 15:54:48 +0200 Subject: [PATCH 2/3] Fix test for casadm help Signed-off-by: Slawomir Jankowski --- test/functional/api/cas/cli_help_messages.py | 11 ----------- .../functional/tests/cli/test_cli_help_and_version.py | 4 ---- 2 files changed, 15 deletions(-) diff --git a/test/functional/api/cas/cli_help_messages.py b/test/functional/api/cas/cli_help_messages.py index fa087aa..d5ffa4d 100644 --- a/test/functional/api/cas/cli_help_messages.py +++ b/test/functional/api/cas/cli_help_messages.py @@ -22,7 +22,6 @@ casadm_help = [ r"-E --flush-core Flush dirty data of a given core from the caching device " r"to this core device", r"-C --io-class Manage IO classes", - r"-N --nvme Manage NVMe namespace", r"-V --version Print CAS version", r"-H --help Print help", r"--zero-metadata Clear metadata from caching device", @@ -45,16 +44,6 @@ version_help = [ r"-o --output-format \ Output format: \{table|csv\}" ] -nvme_help = [ - r"Usage: casadm --nvme --format \ --device \ \[option\.\.\.\]", - r"Manage NVMe namespace", - r"Options that are valid with --nvme \(-N\) are:", - r"-F --format \ Change NVMe metadata mode \{normal|atomic\} " - r"WARNING: Reboot required\!", - r"-d --device \ NVMe device to be formatted", - r"-f --force Force NVMe format" -] - ioclass_help = [ r"Usage: casadm --io-class \{--load-config|--list\}", r"Manage IO classes", diff --git a/test/functional/tests/cli/test_cli_help_and_version.py b/test/functional/tests/cli/test_cli_help_and_version.py index 482b00a..1047226 100644 --- a/test/functional/tests/cli/test_cli_help_and_version.py +++ b/test/functional/tests/cli/test_cli_help_and_version.py @@ -81,10 +81,6 @@ def test_cli_help(shortcut): + (" -H" if shortcut else " --help")) check_stdout_msg(output, ioclass_help) - output = TestRun.executor.run("casadm" + (" -N" if shortcut else " --nvme") - + (" -H" if shortcut else " --help")) - check_stdout_msg(output, nvme_help) - output = TestRun.executor.run("casadm" + (" -V" if shortcut else " --version") + (" -H" if shortcut else " --help")) check_stdout_msg(output, version_help) From 77db7de4bcb23ac8de7b5bca996259b37efa2c92 Mon Sep 17 00:00:00 2001 From: Slawomir Jankowski Date: Wed, 19 Aug 2020 15:55:32 +0200 Subject: [PATCH 3/3] Fix test for casadm version Signed-off-by: Slawomir Jankowski --- test/functional/tests/cli/test_cli_help_and_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/tests/cli/test_cli_help_and_version.py b/test/functional/tests/cli/test_cli_help_and_version.py index 1047226..e809614 100644 --- a/test/functional/tests/cli/test_cli_help_and_version.py +++ b/test/functional/tests/cli/test_cli_help_and_version.py @@ -122,5 +122,5 @@ def names_in_output(output): def versions_in_output(output): - version_pattern = re.compile(r"(\d){2}\.(\d){2}\.(\d){2}\.(\d){8}") + version_pattern = re.compile(r"(\d){2}\.(\d){2}\.(\d)\.(\d){4}.(\S)") return len(version_pattern.findall(output)) == 3