[PATCH blktests v3 2/2] nvme: test the nvme reservation feature

Guixin Liu kanie at linux.alibaba.com
Mon Oct 14 01:43:24 PDT 2024


在 2024/10/14 15:23, Daniel Wagner 写道:
> On Sat, Oct 12, 2024 at 07:11:57PM GMT, Guixin Liu wrote:
>> +requires() {
>> +	_nvme_requires
>> +}
> It's probably a good idea to test if the reservation feature is
> available, otherwise this test just fails on older kernels.

I checked the exists of resv_enable,

"if [[ -f "${ns_path}/resv_enable" ]] ; then", if not exist, skip this

test case.

>> +Running nvme/054
>> +Register
>> +
>> +NVME Reservation status:
>> +
>> +gen       : 0
>> +rtype     : 0
>> +regctl    : 0
>> +ptpls     : 0
>> +
>> +NVME Reservation  success
> I think this is a bit fragile, because the output of the nvme command
> might be extended or reformatted (obviously not on purpose but happens).
> I'd recommend to explicitly check for the expected values in the test.

OK, I will add a "grep -E "xxx|xxx|xxx" " to filter the result we cared now.

Best Regards,

Guixin Liu




More information about the Linux-nvme mailing list