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