[LTP] [PATCH 1/1] clone302: Fix short size test

Petr Vorel pvorel@suse.cz
Fri Sep 1 19:00:38 CEST 2023


Hi Martin,

> Hi,

> On 01. 09. 23 16:44, Petr Vorel wrote:
> > Test uses sizeof(struct clone_args)-1 as invalid size. Original struct
> > size 64 was suitable (because > 64 results in EINVAL), but unrelated

> Nit: <64

Thanks! (I meant that, but fingers wrote the opposite comparator.)

> > change in 45f6916ba increased the size to 88, thus test failed to due
> > unexpected clone3() pass.

> > Depending on struct clone_args size is not good idea, let's use
> > arbitrary value 1.

> This will work, but we could also define a "minimal" struct clone_args
> (without any fields other than the required ones) and use the size of that
> (-1 of course). That would give better coverage and leave no untested gap
> between 1 and minimal struct size.

Very good idea. I'm setting this as changes requested.

Kind regards,
Petr


More information about the ltp mailing list