Commit 05ec46b
committed
nvme/032,050: ensure that test target NVME device has PCI transport
The test case nvme/032 sets the value "pci" to the global variable
nvme_trtype to ensure that the test case runs only when TEST_DEV is a
NVME device using PCI transport. However, this approach was not working
as intended since the global variable is not referred to. The test case
was run for NVME devices using non-PCI transport, and reported false-
positive failures.
Commit c634b8a ("nvme/032: skip on non-PCI devices") introduced the
helper function _require_test_dev_is_nvme_pci(). This function ensures
that the test case nvme/032 is skipped when TEST_DEV is not a NVME
device with PCI transport. Despite this improvement, the unused global
variable nvme_trtype continued to be set. Remove the unnecessary
substitution code.
In the same manner, the test case nvme/050 is expected to be run only
when TEST_DEV is a NVME device with PCI transport. It also sets the
global variable nvme_trtype, but it caused unexpected failure as
reported in the Link. Modify the test case to use
_require_test_dev_is_nvme_pci() to ensure the requirement.
Fixes: c634b8a ("nvme/032: skip on non-PCI devices")
Link: linux-blktests#214
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>1 parent b1b99d1 commit 05ec46b
2 files changed
+4
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | 14 | | |
18 | 15 | | |
19 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | 13 | | |
17 | 14 | | |
18 | 15 | | |
19 | 16 | | |
20 | 17 | | |
21 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
0 commit comments