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: <20210208132113.128b3116@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Mon, 8 Feb 2021 13:21:13 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Parav Pandit <parav@...dia.com>
Cc:     <netdev@...r.kernel.org>, <davem@...emloft.net>
Subject: Re: [PATCH net-next v2 7/7] netdevsim: Add netdevsim port add test
 cases

On Sun, 7 Feb 2021 10:44:12 +0200 Parav Pandit wrote:
> +	RET=0
> +	USR_PF_PORT_INDEX=600
> +	USR_PFNUM_A=2
> +	USR_PFNUM_B=3
> +	USR_SF_PORT_INDEX=601
> +	USR_SFNUM_A=44
> +	USR_SFNUM_B=55
> +
> +	devlink port add $DL_HANDLE flavour pcipf pfnum $USR_PFNUM_A
> +	check_err $? "Failed PF port addition"
> +
> +	devlink port show
> +	check_err $? "Failed PF port show"
> +
> +	devlink port add $DL_HANDLE flavour pcisf pfnum $USR_PFNUM_A
> +	check_err $? "Failed SF port addition"
> +
> +	devlink port add $DL_HANDLE flavour pcisf pfnum $USR_PFNUM_A \
> +			sfnum $USR_SFNUM_A
> +	check_err $? "Failed SF port addition"
> +
> +	devlink port add $DL_HANDLE flavour pcipf pfnum $USR_PFNUM_B
> +	check_err $? "Failed second PF port addition"
> +
> +	devlink port add $DL_HANDLE/$USR_SF_PORT_INDEX flavour pcisf \
> +			pfnum $USR_PFNUM_B sfnum $USR_SFNUM_B
> +	check_err $? "Failed SF port addition"
> +
> +	devlink port show
> +	check_err $? "Failed PF port show"
> +
> +	state=$(function_state_get "state")
> +	check_err $? "Failed to get function state"
> +	[ "$state" == "inactive" ]
> +	check_err $? "Unexpected function state $state"
> +
> +	state=$(function_state_get "opstate")
> +	check_err $? "Failed to get operational state"
> +	[ "$state" == "detached" ]
> +	check_err $? "Unexpected function opstate $opstate"
> +
> +	devlink port function set $DL_HANDLE/$USR_SF_PORT_INDEX state active
> +	check_err $? "Failed to set state"
> +
> +	state=$(function_state_get "state")
> +	check_err $? "Failed to get function state"
> +	[ "$state" == "active" ]
> +	check_err $? "Unexpected function state $state"
> +
> +	state=$(function_state_get "opstate")
> +	check_err $? "Failed to get operational state"
> +	[ "$state" == "attached" ]
> +	check_err $? "Unexpected function opstate $opstate"
> +
> +	devlink port del $DL_HANDLE/$USR_SF_PORT_INDEX
> +	check_err $? "Failed SF port deletion"
> +
> +	log_test "port_add test"

I don't think this very basic test is worth the 600 LoC of netdevsim
code.

If you come up with something better please don't post v3 it in reply 
to previous threads.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ