[LTP] [PATCH v1 1/1] keyctl05: improve the dns_res_payload for boundary testing

Pengfei Xu pengfei.xu@intel.com
Thu Jan 11 10:12:02 CET 2024


On 2024-01-11 at 09:51:52 +0100, Petr Vorel wrote:
> > Because the following patch will fix the add_key syscall incoming data boundary
> > size issue, 6 bytes incoming data should pass:
> > https://lore.kernel.org/all/1784441.1704907412@warthog.procyon.org.uk/
> >  -> https://lore.kernel.org/all/1850031.1704921100@warthog.procyon.org.uk/
> > In order to test above boundary incoming data size, change the dns_res_payload
> > size.
> 
> > Signed-off-by: Pengfei Xu <pengfei.xu@intel.com>
> > ---
> >  testcases/kernel/syscalls/keyctl/keyctl05.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> > diff --git a/testcases/kernel/syscalls/keyctl/keyctl05.c b/testcases/kernel/syscalls/keyctl/keyctl05.c
> > index 90cf1ef06..50e78853c 100644
> > --- a/testcases/kernel/syscalls/keyctl/keyctl05.c
> > +++ b/testcases/kernel/syscalls/keyctl/keyctl05.c
> > @@ -199,11 +199,11 @@ static void do_test(unsigned int i)
> >  	 * We need to pass check in dns_resolver_preparse(),
> >  	 * give it dummy server list request.
> >  	 * From v6.7-rc8 commit 1997b3cb4217b09e49659b634c94da47f0340409:
> > -	 * the incoming data for add_key syscall should be larger than 6 bytes,
> > -	 * because struct dns_server_list_v1_header without body is 6 bytes.
> > +	 * the incoming data for add_key syscall should be not less than 6
> > +	 * bytes, because struct dns_server_list_v1_header is 6 bytes.
> > +	 * The minimum payload will be tested here for boundary testing.
> >  	 */
> > -	static char dns_res_payload[] = { 0x00, 0x00, 0x01, 0xff, 0x00, \
> 
> nit (already pushed): \ is not needed for arrays.

Indeed, thanks for your remind!

Thanks!

> 
> Kind regards,
> Petr
> 
> > -					  0x00, 0x00 };
> > +	static char dns_res_payload[] = { 0x00, 0x00, 0x01, 0xff, 0x00, 0x00 };
> 
> >  	switch (i) {
> >  	case 0:


More information about the ltp mailing list