Re: [net-next v2 3/3] selftests/net: Test PACKET_AUXDATA
From: Willem de Bruijn
Date: Sat Apr 04 2026 - 11:10:40 EST
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@xxxxxxx>
> @@ -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.