> From: Jakub Kicinski <k...@kernel.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.

Reply via email to