[PATCH] nvme: add nvme pci timeout testcase

Shinichiro Kawasaki shinichiro.kawasaki at wdc.com
Wed Jan 10 01:13:59 PST 2024


Hi Chaitanya, thanks for this new test case. I will comment on the whole patch
later. Here I share my comment on the TEST_DEV topic.

On Jan 10, 2024 / 08:12, Chaitanya Kulkarni wrote:
> 
> >>>
> >>> Should this be TEST_DEV instead ?
> >>
> >> why ?
> >>
> > My understanding of blktests is, add device which we want to test in
> > config files under TEST_DEV (except null-blk and nvme-fabrics loopback
> > devices, which are usually populated inside the tests).
> > In this case, if someone do not want to disturb nvme0n1 device,
> > this test doesn't allow it.
> >
> > Regards,
> > Nitesh Shetty
> >
> 
> it is clearly stated in the documentation that blktests are destructive
> to the entire system and including any devices you have, if your
> system has sensitive data then _don't run these tests_ simple, when
> you are running blktests you are bound to disturb system you can't
> prevent that by using TEST_DEV.

It's true that blktests is destructive to the test system and the test devices,
but I still think it's good to reduce the level of destructive risk. It is
likely that /dev/nvme0n1 is the system disk of the test system and the test case
puts some risk on it. By using TEST_DEV, blktests users can specify non-system
disk for testing and reduce the risk. We can run the test case (and its
following test cases to be added in the future) more reliably.

On top of that, TEST_DEV will help blktests users to control which device to
take the destructive risk. It also helps to check that the test target device
exists and it is a block, nvme device.

So I recommend to use TEST_DEV in place of /dev/nvme0n1, and replace test() with
test_device(). TEST_DEV_SYSFS will help to access the io-timeout-fail sysfs
attribute.



More information about the Linux-nvme mailing list