Re: [PATCH 2/6] tests/nvme: add new test for rand-read on the nvme character device

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

 



>> +
>> +	if [ -z "$fail" ]; then
>> +		echo "Test complete"
>> +	else
>> +		echo "Test failed"
>> +		return 1
>> +	fi
> I see that several test have this structure, but would it not be better
> to do:
> 
> """
> if [ -n "$fail" ]; then
>    echo "Test failed"
>    return 1
> fi
> 
> return "Test complete"
> """
> 
> I point this out because I noticed that most nvme tests just set the
> "test complete" string at the end of the test function.
> 

Yes, "Test complete" is sufficient to validate the correctness
and keeps the code small.

-ck





[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