On Tue, Feb 06, 2024 at 11:07:06PM +0000, Chaitanya Kulkarni wrote: > > for dev in /sys/class/nvme/nvme*; do > > dev="$(basename "$dev")" > > - transport="$(cat "/sys/class/nvme/${dev}/transport")" > > + transport="$(cat "/sys/class/nvme/${dev}/transport" 2>/dev/null)" > > do we have to do anything if there is in error ? In this case transport will be '' and not match with '${nvme_trtype}'. So we already handle this properly. > > if [[ "$transport" == "${nvme_trtype}" ]]; then > > echo "WARNING: Test did not clean up ${nvme_trtype} device: ${dev}" > > _nvme_disconnect_ctrl "${dev}" > > @@ -840,7 +840,7 @@ _find_nvme_dev() { > > for dev in /sys/class/nvme/nvme*; do > > [ -e "$dev" ] || continue > > dev="$(basename "$dev")" > > - subsysnqn="$(cat "/sys/class/nvme/${dev}/subsysnqn")" > > + subsysnqn="$(cat "/sys/class/nvme/${dev}/subsysnqn" 2>/dev/null)"