From a81e562f315eccf04c18ed3eb9c945b977b7fde9 Mon Sep 17 00:00:00 2001 From: Narasimhan V Date: Thu, 6 Aug 2020 19:39:58 +0530 Subject: [PATCH] Getting interrupt list only for current controller Recently there was a fix for getting the interrupt vector list in get_features selftest. That gets the list for all nvme controllers in the system. Fixing it by getting the list for only current controller. Signed-off-by: Narasimhan V --- tests/nvme_get_features_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/nvme_get_features_test.py b/tests/nvme_get_features_test.py index 94ed865..5d68bbc 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, -- 2.49.0