Re: [PATCH blktests] Make the NVMe tests more reliable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/6/19 1:11 AM, Johannes Thumshirn wrote:
On 06/08/2019 01:25, Bart Van Assche wrote:
[...]

+			for ((i=0;i<10;i++)); do
+				[ -e /sys/block/$dev/uuid ] &&
+					[ -e /sys/block/$dev/wwid ] &&
+					return 0
+				sleep .1
+			done
+			return 1
  		fi
  	done
+	return 1

Hmmm, I don't really understand why you're adding the return {0,1} here.
None of the callers of _find_nvme_loop_dev() does anything with the
return value of the function.

They expect either a nvme-device or an empty string and fail if the
string is empty due to a non-empty diff in the golden output.

Hi Johannes,

The "return 0" statement has been added to break out of the two for-loops. The first "return 1" statement has been added to make sure that the echo "$dev" statement is executed at most once. The final "return 1" statement has been added to make the return value consistent.

Do you perhaps want me to leave out {0,1} from the return statements?

Bart.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux