[LTP] [PATCH v3 2/3] netns: Rewrite to use tst_net.sh

Cyril Hrubis chrubis@suse.cz
Tue May 10 15:08:30 CEST 2022


Hi!
> +# Communication type between kernel and user space for basic setup: enabling and
> +# assigning IP addresses to the virtual ethernet devices. (Uses 'ip' command for
> +# netlink and 'ifconfig' for ioctl.)
> +# (netlink|ioctl)
> +COMM_TYPE="netlink"
> +
> +do_cleanup=
> +
> +netns_parse_args()
> +{
> +	case $1 in
> +	e) NS_EXEC="ns_exec" ;;
> +	I) COMM_TYPE="ioctl"; tst_require_cmds ifconfig ;;
> +	esac
> +}
> +
> +netns_usage()
> +{
> +	echo "usage: $0 [ -e ] [ -t ]"
                                  ^
				  -I
> +	echo "OPTIONS"
> +	echo "-e use ns_exec instead of ip"
> +	echo "-I test ioctl (with ifconfig) instead of netlink (with ip)"
> +}

Otherwise it looks like a nice cleanup.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list