-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
maybe need wait a sec after created nvme ctrl in nvme_test
======================================================================
ERROR: test_ns_info (nvme_test.NVMeTestCase.test_ns_info)
Test namespace info
----------------------------------------------------------------------
Traceback (most recent call last):
File "/root/rpmbuild/BUILD/libblockdev-3.2.0/tests/nvme_test.py", line 92, in test_ns_info
info = BlockDev.nvme_get_namespace_info(self.nvme_ns_dev)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gi.repository.GLib.GError: g-bd-nvme-error-quark: Failed to open device '/dev/nvme0n1': No such file or directory (1)
======================================================================
FAIL: test_connect_multiple_ns (nvme_test.NVMeFabricsTestCase.test_connect_multiple_ns)
Test connect and disconnect multiple namespaces
----------------------------------------------------------------------
Traceback (most recent call last):
File "/root/rpmbuild/BUILD/libblockdev-3.2.0/tests/nvme_test.py", line 443, in test_connect_multiple_ns
self.assertEqual(len(namespaces), NUM_NS)
AssertionError: 1 != 3
----------------------------------------------------------------------
nvme-cli-2.10.2-1.el10.x86_64
nvmetcli-0.8-1.el10.noarch
$ git diff tests/utils.py
diff --git a/tests/utils.py b/tests/utils.py
index a9b8e187..9fe93605 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -251,7 +251,7 @@ def find_nvme_ctrl_devs_for_subnqn(subnqn):
dev_paths += [path]
except:
pass
-
+ time.sleep(1)
ret, out, err = run_command("nvme list --output-format=json --verbose")
if ret != 0:
raise RuntimeError("Error getting NVMe list: '%s %s'" % (out, err))
for i in $(seq 30);do python3 run_tests.py -s nvme_test || break;done
can not reproduce the error after apply the patch, maybe someone have a better solution for the error.
if no, I will create a MR for it.
Metadata
Metadata
Assignees
Labels
No labels