Re: [PATCH bpf-next v2 2/4] bpf: sockmap, add a sendmsg test so we can check that path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 26, 2024 at 01:17 PM +01, Jakub Sitnicki wrote:
> On Wed, Jan 24, 2024 at 10:54 AM -08, John Fastabend wrote:

[...]

>> @@ -92,6 +136,15 @@ static void test_sockmap_pop(void)
>>  	/* Pop from end */
>>  	pop_simple_send(&opts, POP_END, 5);
>>  
>> +	/* Empty pop from start of sendmsg */
>> +	pop_complex_send(&opts, 0, 0);
>> +	/* Pop from start of sendmsg */
>> +	pop_complex_send(&opts, 0, 10);
>> +	/* Pop from middle of sendmsg */
>> +	pop_complex_send(&opts, 100, 10);
>> +	/* Pop from end of sendmsg */
>> +	pop_complex_send(&opts, 394, 10);
>
> Isn't the start offset here past the end? 15*26=390?

Plus terminating null bytes. Nevermind. I can't count.




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux