]> www.infradead.org Git - users/hch/nvme-cli.git/commitdiff
Getting interrupt list only for current controller
authorNarasimhan V <sim@linux.vnet.ibm.com>
Thu, 6 Aug 2020 14:09:58 +0000 (19:39 +0530)
committerKeith Busch <kbusch@kernel.org>
Thu, 6 Aug 2020 16:16:04 +0000 (10:16 -0600)
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 <sim@linux.vnet.ibm.com>
tests/nvme_get_features_test.py

index 94ed86574bf094cffe7745631708aa964e0a49da..5d68bbc2ecc328a06f02fdc373ff4b13d0d13ac7 100644 (file)
@@ -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,