From f2c543b4ccad3b9f8871d952cddf66b3b438595b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 2 Jul 2021 22:49:35 +0200 Subject: Merging upstream version 1.14. Signed-off-by: Daniel Baumann --- tests/nvme_get_features_test.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/nvme_get_features_test.py b/tests/nvme_get_features_test.py index 94ed865..2e407ef 100644 --- a/tests/nvme_get_features_test.py +++ b/tests/nvme_get_features_test.py @@ -54,7 +54,8 @@ class TestNVMeGetMandatoryFeatures(TestNVMe): self.setup_log_dir(self.__class__.__name__) self.feature_id_list = ["0x01", "0x02", "0x04", "0x05", "0x07", "0x08", "0x09", "0x0A", "0x0B"] - get_vector_list_cmd = "cat /proc/interrupts | grep nvme |" \ + device = self.ctrl.split('/')[-1] + get_vector_list_cmd = "grep " + device + "q /proc/interrupts |" \ " cut -d : -f 1 | tr -d ' ' | tr '\n' ' '" proc = subprocess.Popen(get_vector_list_cmd, shell=True, @@ -80,7 +81,7 @@ class TestNVMeGetMandatoryFeatures(TestNVMe): for vector in range(self.vector_list_len): get_feat_cmd = "nvme get-feature " + self.ctrl + \ " --feature-id=" + str(feature_id) + \ - " --cdw11=" + str(vector) + " --cdw11=" + str(vector) + " -H" proc = subprocess.Popen(get_feat_cmd, shell=True, stdout=subprocess.PIPE, @@ -90,7 +91,7 @@ class TestNVMeGetMandatoryFeatures(TestNVMe): assert_equal(proc.wait(), 0) else: get_feat_cmd = "nvme get-feature " + self.ctrl + \ - " --feature-id=" + str(feature_id) + " --feature-id=" + str(feature_id) + " -H" proc = subprocess.Popen(get_feat_cmd, shell=True, stdout=subprocess.PIPE, -- cgit v1.2.3