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

Cyril Hrubis chrubis@suse.cz
Tue Oct 8 17:39:58 CEST 2024


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.

But you pass the size as a zero, at least I do not see that you ever set
request_small->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

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list