[PATCH blktests] nvme/050: repeat checking test device restoration

Shinichiro Kawasaki shinichiro.kawasaki at wdc.com
Tue Aug 19 17:30:21 PDT 2025


On Aug 18, 2025 / 16:10, Chaitanya Kulkarni wrote:
...
> > diff --git a/tests/nvme/050 b/tests/nvme/050
> > index c710832..ba55c6e 100755
> > --- a/tests/nvme/050
> > +++ b/tests/nvme/050
...
> > @@ -49,7 +50,13 @@ test_device() {
> >   	# Remove and rescan the NVME device to ensure that it has come back
> >   	echo 1 > "/sys/bus/pci/devices/${pdev}/remove"
> >   	echo 1 > /sys/bus/pci/rescan
> > -	if [[ ! -b ${TEST_DEV} ]]; then
> > +	for ((i = 0; i < 10; i++)); do
> 
> This looks good to me, however do we want this loop bounded by 
> hard-coded value
> or we create a config var that user can set on respective setup ?

Thought it is an improvement idea, it looks too much for me.

Actually, the test case nvme/032 has the same wait logic using the same hard-
coded loop count and the sleep time, as a test item. So I can have some
confidence that the numbers work good on all blktests running systems.

> either way :-
> 
> 
> Looks good.
> 
> Reviewed-by: Chaitanya Kulkarni <kch at nvidia.com>

Thanks!


More information about the Linux-nvme mailing list