Re: [net-next v2 3/3] selftests/net: Test PACKET_AUXDATA

Joe Damato
2026-04-06T16:36:19Z

On Sat, Apr 04, 2026 at 11:10:13AM -0400, Willem de Bruijn wrote:
> Joe Damato wrote:
> > Extend the packet socket selftest, adding a recvmsg path, to test
> > PACKET_AUXDATA. Check basic attributes of tpacket_auxdata.
> >
> > Signed-off-by: Joe Damato <joe@dama.to>
>
> > @@ -322,8 +376,11 @@ static void parse_opts(int argc, char **argv)
> > {
> > int c;
> >
> > - while ((c = getopt(argc, argv, "bcCdDgl:qt:vV")) != -1) {
> > + while ((c = getopt(argc, argv, "abcCdDgl:qt:vV")) != -1) {
> > switch (c) {
> > + case 'a':
> > + cfg_aux_data = true;
> > + break;
>
> These are intended as independent test cases: test_auxdata,
> test_drops. By using flags the flags can be combined. Are all
> combinations of flags expected to work? Else maybe we should instead
> have a -T "test_name", or so, to keep them mutually exclusive and
> easy to reason about.
>
> Or just a test that two flags are not set at the same time.

Sure, I can add a two line at the bottom with the existing flags checks. I
don't think adding a -T "test_name" is worth the effort, though.