Re: [PATCH bpf-next v2 12/13] selftests/bpf: migrate bpf flow dissectors tests to test_progs

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

 



On 11/15/24 17:11, Stanislav Fomichev wrote:
> On 11/14, Alexis Lothoré (eBPF Foundation) wrote:
>> +		if (!ASSERT_GE(err, 0, "do_rx"))
>> +			break;
> 
> You seem to be already doing similar ASSERT_GE inside the do_rx, maybe
> drop one?

True, I'll drop the inner ASSERTS to align with do_tx.

[...]

>> +static void port_range_shutdown(void)
>> +{
>> +	remove_filter();
>> +}
> 
> nit: Maybe use remove_filter directly as .test_teardown? These extra
> wrappers are not adding anything (imho).

Yeah, I initially added port_range_shutdown to make init and shutdown functions
"symmetrical", but in the end that's purely cosmetic. I'll use directly
remove_filter.

[...]

>> +		test = (struct test_configuration *)&tests_input[i];
> 
> nit: What's the purpose of the cast? Is it to de-constify? Can we
> change run_test arguments to accept const struct test_configuration
> ptr instead?

Yes, that's an omission on my side. I initially thought about making the test
runner function rewrite some fields in the test configuration, but I finally did
not need to do this. I'll drop the cast and propagate the const

Thanks again for the review ! I'll prepare the next revision with all your
comments addressed.

Alexis


-- 
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux