[bug report] blktests nvme/047 failed due to /dev/nvme0n1 not created in time

Daniel Wagner dwagner at suse.de
Thu Aug 10 02:18:10 PDT 2023


On Thu, Aug 10, 2023 at 12:19:39AM +0000, Shinichiro Kawasaki wrote:
> Yi, could you try and see if it avoids the failure?
> 
> diff --git a/tests/nvme/rc b/tests/nvme/rc
> index 4f3a994..005db80 100644
> --- a/tests/nvme/rc
> +++ b/tests/nvme/rc
> @@ -740,7 +740,7 @@ _find_nvme_dev() {
>  		if [[ "$subsysnqn" == "$subsys" ]]; then
>  			echo "$dev"
>  			for ((i = 0; i < 10; i++)); do
> -				if [[ -e /sys/block/$dev/uuid &&
> +				if [[ -e /dev/$dev && -e /sys/block/$dev/uuid &&
>  					-e /sys/block/$dev/wwid ]]; then
>  					return
>  				fi

The path for uuid is not correct. It's needs to be something like

	if [[ -e /dev/$dev && -e /sys/block/"${dev}n1"/uuid &&
		-e /sys/block/"${dev}n1"/wwid ]]; then
			return
	fi



More information about the Linux-nvme mailing list