Re: [PATCH net-next 2/5] selftests: drv-net: Test XDP_PASS/DROP support

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

 



On Thu, 10 Jul 2025 11:43:48 -0700 Mohsin Bashir wrote:
> +    try:
> +        cmd(
> +        f"ip link set dev {cfg.ifname} mtu {bpf_info.mtu} xdp obj {abs_path} "
> +        f"sec {bpf_info.xdp_sec}",
> +        shell=True
> +        )
> +        defer(ip, f"link set dev {cfg.ifname} mtu 1500 xdp off")
> +    except Exception as e:
> +        raise KsftSkipEx(f"Failed to attach XDP porgram: {bpf_info.name}") from e

Please don't catch the exception here, let it break the test.
The cmd exception carries the info we need to debug, I had
to remove this to see why the test was skipping. We could try
to add the error lines to the SkipEx but frankly I don't think
it's worth the LoC.
-- 
pw-bot: cr




[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