From: Tokunori Ikegami Date: Thu, 23 Jan 2025 15:45:54 +0000 (+0900) Subject: tests: add verbose options for NS management commands X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b9b34bed6a9dd9a81bc3b0e4706bdc14c130e314;p=users%2Fsagi%2Fnvme-cli.git tests: add verbose options for NS management commands This is for debugging output if test failed. Signed-off-by: Tokunori Ikegami --- diff --git a/tests/nvme_test.py b/tests/nvme_test.py index 55d083a6..306e5b39 100644 --- a/tests/nvme_test.py +++ b/tests/nvme_test.py @@ -371,7 +371,7 @@ class TestNVMe(unittest.TestCase): """ create_ns_cmd = f"{self.nvme_bin} create-ns {self.ctrl} " + \ f"--nsze={str(nsze)} --ncap={str(ncap)} --flbas={str(flbas)} " + \ - f"--dps={str(dps)}" + f"--dps={str(dps)} --verbose" return self.exec_cmd(create_ns_cmd) def create_and_validate_ns(self, nsid, nsze, ncap, flbas, dps): @@ -408,7 +408,7 @@ class TestNVMe(unittest.TestCase): - 0 on success, error code on failure. """ attach_ns_cmd = f"{self.nvme_bin} attach-ns {self.ctrl} " + \ - f"--namespace-id={str(nsid)} --controllers={ctrl_id}" + f"--namespace-id={str(nsid)} --controllers={ctrl_id} --verbose" err = subprocess.call(attach_ns_cmd, shell=True, stdout=subprocess.DEVNULL) @@ -428,7 +428,7 @@ class TestNVMe(unittest.TestCase): - 0 on success, error code on failure. """ detach_ns_cmd = f"{self.nvme_bin} detach-ns {self.ctrl} " + \ - f"--namespace-id={str(nsid)} --controllers={ctrl_id}" + f"--namespace-id={str(nsid)} --controllers={ctrl_id} --verbose" return subprocess.call(detach_ns_cmd, shell=True, stdout=subprocess.DEVNULL) @@ -442,7 +442,7 @@ class TestNVMe(unittest.TestCase): """ # delete the namespace delete_ns_cmd = f"{self.nvme_bin} delete-ns {self.ctrl} " + \ - f"--namespace-id={str(nsid)}" + f"--namespace-id={str(nsid)} --verbose" err = subprocess.call(delete_ns_cmd, shell=True, stdout=subprocess.DEVNULL)