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 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