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] [day] [month] [year] [list]
Message-ID: <BY5PR12MB4322F05EFBE23C2024058CD9DC8E9@BY5PR12MB4322.namprd12.prod.outlook.com>
Date:   Tue, 9 Feb 2021 03:59:34 +0000
From:   Parav Pandit <parav@...dia.com>
To:     Jakub Kicinski <kuba@...nel.org>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "davem@...emloft.net" <davem@...emloft.net>
Subject: RE: [PATCH net-next v2 7/7] netdevsim: Add netdevsim port add test
 cases



> From: Jakub Kicinski <kuba@...nel.org>
> Sent: Tuesday, February 9, 2021 2:51 AM
> 
> 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.
> 
Do you mean I should improve the test to do more code coverage for 600 LoC?

> If you come up with something better please don't post v3 it in reply to
> previous threads.
Can you please explain? If only test case improves, wouldn't it be v3 for the last patch?
I must be missing something here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ