lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m2pl9komz5.fsf@gmail.com>
Date: Fri, 14 Nov 2025 11:46:54 +0000
From: Donald Hunter <donald.hunter@...il.com>
To: Hangbin Liu <liuhangbin@...il.com>
Cc: netdev@...r.kernel.org,  Jakub Kicinski <kuba@...nel.org>,  "David S.
 Miller" <davem@...emloft.net>,  Eric Dumazet <edumazet@...gle.com>,  Paolo
 Abeni <pabeni@...hat.com>,  Simon Horman <horms@...nel.org>,  Jan Stancek
 <jstancek@...hat.com>,  "Matthieu Baerts (NGI0)" <matttbe@...nel.org>,
  Asbjørn Sloth Tønnesen
 <ast@...erby.net>,  Stanislav Fomichev
 <sdf@...ichev.me>,  Ido Schimmel <idosch@...dia.com>,  Guillaume Nault
 <gnault@...hat.com>,  Sabrina Dubroca <sd@...asysnail.net>,  Petr Machata
 <petrm@...dia.com>
Subject: Re: [PATCHv4 net-next 3/3] tools: ynl: add YNL test framework

Hangbin Liu <liuhangbin@...il.com> writes:
>
> +cleanup() {
> +	if [[ -n "$testns" ]]; then
> +		ip netns exec "$testns" bash -c "echo $NSIM_ID > /sys/bus/netdevsim/del_device" 2>/dev/null || true
> +		ip netns del "$testns" 2>/dev/null || true
> +	fi
> +}
> +
> +# Check if ynl command is available
> +if ! command -v $ynl &>/dev/null && [[ ! -x $ynl ]]; then
> +	ktap_skip_all "ynl command not found: $ynl"
> +	exit "$KSFT_SKIP"
> +fi
> +
> +trap cleanup EXIT
> +
> +ktap_print_header
> +ktap_set_plan 9
> +setup
> +
> +# Run all tests
> +cli_list_families
> +cli_netdev_ops
> +cli_ethtool_ops
> +cli_rt_route_ops
> +cli_rt_addr_ops
> +cli_rt_link_ops
> +cli_rt_neigh_ops
> +cli_rt_rule_ops
> +cli_nlctrl_ops
> +
> +ktap_finished

minor nit: ktap_finished should probably be in the 'cleanup' trap handler

> +cleanup() {
> +	if [[ -n "$testns" ]]; then
> +		ip netns exec "$testns" bash -c "echo $NSIM_ID > /sys/bus/netdevsim/del_device" 2>/dev/null || true
> +		ip netns del "$testns" 2>/dev/null || true
> +	fi
> +}
> +
> +# Check if ynl-ethtool command is available
> +if ! command -v $ynl_ethtool &>/dev/null && [[ ! -x $ynl_ethtool ]]; then
> +	ktap_skip_all "ynl-ethtool command not found: $ynl_ethtool"
> +	exit "$KSFT_SKIP"
> +fi
> +
> +trap cleanup EXIT
> +
> +ktap_print_header
> +ktap_set_plan 8
> +setup
> +
> +# Run all tests
> +ethtool_device_info
> +ethtool_statistics
> +ethtool_ring_params
> +ethtool_coalesce_params
> +ethtool_pause_params
> +ethtool_features_info
> +ethtool_channels_info
> +ethtool_time_stamping
> +
> +ktap_finished

And here.

Otherwise LGTM. 

Reviewed-by: Donald Hunter <donald.hunter@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ