[LTP] [PATCH v5 16/16] Add listmount04 test

Andrea Cervesato andrea.cervesato@suse.com
Tue Oct 8 17:33:32 CEST 2024


Hi,

On 10/8/24 17:00, Cyril Hrubis wrote:
> Hi!
>> +	{
>> +		.req = &request_small,
>> +		.mnt_ids = mnt_ids,
>> +		.nr_mnt_ids = MNT_SIZE,
>> +		.flags = 0,
>> +		.exp_errno = EINVAL,
>> +		.msg = "request has insufficient size",
>> +	},
> It took me a while to realize that this is a request with .size set to
> 0, which is obviously rejected as invalid. Maybe it should be called
> request_zero_size instead.
This is actually a request with a small memory size for mnt_id_req. I 
remove 4 bytes allocation from the struct, so it doesn't make sense 
request_zero_size.
>
> Also there is quite a bit more errors we can trigger, looking at
> statmount kernel syscall we can easily trigger at least:
>
> - param > 0 && param <= MNT_UNIUQE_ID_OFFSET -> EINVAL
> - spare != 0 -> EINVAL
> - nonexisting mnt_ns_id -> ENOENT
>
Andrea


More information about the ltp mailing list