Re: [PATCH net-next v7 10/10] selftest: net-drv: hds: add test for HDS feature

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

 



On Fri,  3 Jan 2025 15:03:25 +0000 Taehee Yoo wrote:
> +    try:
> +        netnl.rings_set({'header': {'dev-index': cfg.ifindex}, 'hds-thresh': hds_gt})
> +    except NlError as e:
> +        if e.error == errno.EOPNOTSUPP:
> +            raise KsftSkipEx("ring-set not supported by the device")
> +        ksft_eq(e.error, errno.EINVAL)
> +    else:
> +        raise KsftFailEx("exceeded hds-thresh should be failed")

Nice work on the tests! FWIW you could use ksft_raises(NlError) here,
but this works too. You can leave it as is if you prefer.




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux