[net] selftests/net/forwarding: define libs as TEST_PROGS_EXTENDED
diff mbox series

Message ID 20200325084101.9156-1-liuhangbin@gmail.com
State Mainlined
Commit c085dbfb1cfcf74e2ef2ef435291e7e63f046d6a
Headers show
Series
  • [net] selftests/net/forwarding: define libs as TEST_PROGS_EXTENDED
Related show

Commit Message

Hangbin Liu March 25, 2020, 8:41 a.m. UTC
The lib files should not be defined as TEST_PROGS, or we will run them
in run_kselftest.sh.

Also remove ethtool_lib.sh exec permission.

Fixes: 81573b18f26d ("selftests/net/forwarding: add Makefile to install tests")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
 .../testing/selftests/net/forwarding/Makefile | 31 ++++++++++---------
 .../selftests/net/forwarding/ethtool_lib.sh   |  0
 2 files changed, 16 insertions(+), 15 deletions(-)
 mode change 100755 => 100644 tools/testing/selftests/net/forwarding/ethtool_lib.sh

Comments

Vadym Kochan March 25, 2020, 10:26 a.m. UTC | #1
Hi Hangbin Liu,

On Wed, Mar 25, 2020 at 04:41:01PM +0800, Hangbin Liu wrote:
> The lib files should not be defined as TEST_PROGS, or we will run them
> in run_kselftest.sh.
> 
> Also remove ethtool_lib.sh exec permission.
> 
> Fixes: 81573b18f26d ("selftests/net/forwarding: add Makefile to install tests")
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Thanks for fixing it, sorry for my mistake. Actually forwarding tests
requires interfaces list as runtime parameter or if it is defined in 
forwarding.config file, so may be they should not run by run_kselftest
at all and only added via TEST_PROGS_EXTENDED ?

> ---
>  .../testing/selftests/net/forwarding/Makefile | 31 ++++++++++---------
>  .../selftests/net/forwarding/ethtool_lib.sh   |  0
>  2 files changed, 16 insertions(+), 15 deletions(-)
>  mode change 100755 => 100644 tools/testing/selftests/net/forwarding/ethtool_lib.sh
> 
> diff --git a/tools/testing/selftests/net/forwarding/Makefile b/tools/testing/selftests/net/forwarding/Makefile
> index 44616103508b..250fbb2d1625 100644
> --- a/tools/testing/selftests/net/forwarding/Makefile
> +++ b/tools/testing/selftests/net/forwarding/Makefile
> @@ -5,11 +5,7 @@ TEST_PROGS = bridge_igmp.sh \
>  	bridge_sticky_fdb.sh \
>  	bridge_vlan_aware.sh \
>  	bridge_vlan_unaware.sh \
> -	devlink_lib.sh \
> -	ethtool_lib.sh \
>  	ethtool.sh \
> -	fib_offload_lib.sh \
> -	forwarding.config.sample \
>  	gre_inner_v4_multipath.sh \
>  	gre_inner_v6_multipath.sh \
>  	gre_multipath.sh \
> @@ -21,8 +17,6 @@ TEST_PROGS = bridge_igmp.sh \
>  	ipip_hier_gre_key.sh \
>  	ipip_hier_gre_keys.sh \
>  	ipip_hier_gre.sh \
> -	ipip_lib.sh \
> -	lib.sh \
>  	loopback.sh \
>  	mirror_gre_bound.sh \
>  	mirror_gre_bridge_1d.sh \
> @@ -32,15 +26,11 @@ TEST_PROGS = bridge_igmp.sh \
>  	mirror_gre_changes.sh \
>  	mirror_gre_flower.sh \
>  	mirror_gre_lag_lacp.sh \
> -	mirror_gre_lib.sh \
>  	mirror_gre_neigh.sh \
>  	mirror_gre_nh.sh \
>  	mirror_gre.sh \
> -	mirror_gre_topo_lib.sh \
>  	mirror_gre_vlan_bridge_1q.sh \
>  	mirror_gre_vlan.sh \
> -	mirror_lib.sh \
> -	mirror_topo_lib.sh \
>  	mirror_vlan.sh \
>  	router_bridge.sh \
>  	router_bridge_vlan.sh \
> @@ -50,17 +40,12 @@ TEST_PROGS = bridge_igmp.sh \
>  	router_multipath.sh \
>  	router.sh \
>  	router_vid_1.sh \
> -	sch_ets_core.sh \
>  	sch_ets.sh \
> -	sch_ets_tests.sh \
> -	sch_tbf_core.sh \
> -	sch_tbf_etsprio.sh \
>  	sch_tbf_ets.sh \
>  	sch_tbf_prio.sh \
>  	sch_tbf_root.sh \
>  	tc_actions.sh \
>  	tc_chains.sh \
> -	tc_common.sh \
>  	tc_flower_router.sh \
>  	tc_flower.sh \
>  	tc_shblocks.sh \
> @@ -72,4 +57,20 @@ TEST_PROGS = bridge_igmp.sh \
>  	vxlan_bridge_1q.sh \
>  	vxlan_symmetric.sh
>  
> +TEST_PROGS_EXTENDED := devlink_lib.sh \
> +	ethtool_lib.sh \
> +	fib_offload_lib.sh \
> +	forwarding.config.sample \
> +	ipip_lib.sh \
> +	lib.sh \
> +	mirror_gre_lib.sh \
> +	mirror_gre_topo_lib.sh \
> +	mirror_lib.sh \
> +	mirror_topo_lib.sh \
> +	sch_ets_core.sh \
> +	sch_ets_tests.sh \
> +	sch_tbf_core.sh \
> +	sch_tbf_etsprio.sh \
> +	tc_common.sh
> +
>  include ../../lib.mk
> diff --git a/tools/testing/selftests/net/forwarding/ethtool_lib.sh b/tools/testing/selftests/net/forwarding/ethtool_lib.sh
> old mode 100755
> new mode 100644
> -- 
> 2.19.2
>
Hangbin Liu March 25, 2020, 1:37 p.m. UTC | #2
On Wed, Mar 25, 2020 at 12:26:33PM +0200, Vadym Kochan wrote:
> Hi Hangbin Liu,
> 
> On Wed, Mar 25, 2020 at 04:41:01PM +0800, Hangbin Liu wrote:
> > The lib files should not be defined as TEST_PROGS, or we will run them
> > in run_kselftest.sh.
> > 
> > Also remove ethtool_lib.sh exec permission.
> > 
> > Fixes: 81573b18f26d ("selftests/net/forwarding: add Makefile to install tests")
> > Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
> Thanks for fixing it, sorry for my mistake. Actually forwarding tests
> requires interfaces list as runtime parameter or if it is defined in 
> forwarding.config file, so may be they should not run by run_kselftest
> at all and only added via TEST_PROGS_EXTENDED ?

Before I run forwarding test, I usually do
`cp forwarding.config.sample forwarding.config` first. I think the runner
should aware of this.

Thanks
Hangbin
David Miller March 25, 2020, 7:01 p.m. UTC | #3
From: Hangbin Liu <liuhangbin@gmail.com>
Date: Wed, 25 Mar 2020 16:41:01 +0800

> The lib files should not be defined as TEST_PROGS, or we will run them
> in run_kselftest.sh.
> 
> Also remove ethtool_lib.sh exec permission.
> 
> Fixes: 81573b18f26d ("selftests/net/forwarding: add Makefile to install tests")
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>

Applied, thanks.

Patch
diff mbox series

diff --git a/tools/testing/selftests/net/forwarding/Makefile b/tools/testing/selftests/net/forwarding/Makefile
index 44616103508b..250fbb2d1625 100644
--- a/tools/testing/selftests/net/forwarding/Makefile
+++ b/tools/testing/selftests/net/forwarding/Makefile
@@ -5,11 +5,7 @@  TEST_PROGS = bridge_igmp.sh \
 	bridge_sticky_fdb.sh \
 	bridge_vlan_aware.sh \
 	bridge_vlan_unaware.sh \
-	devlink_lib.sh \
-	ethtool_lib.sh \
 	ethtool.sh \
-	fib_offload_lib.sh \
-	forwarding.config.sample \
 	gre_inner_v4_multipath.sh \
 	gre_inner_v6_multipath.sh \
 	gre_multipath.sh \
@@ -21,8 +17,6 @@  TEST_PROGS = bridge_igmp.sh \
 	ipip_hier_gre_key.sh \
 	ipip_hier_gre_keys.sh \
 	ipip_hier_gre.sh \
-	ipip_lib.sh \
-	lib.sh \
 	loopback.sh \
 	mirror_gre_bound.sh \
 	mirror_gre_bridge_1d.sh \
@@ -32,15 +26,11 @@  TEST_PROGS = bridge_igmp.sh \
 	mirror_gre_changes.sh \
 	mirror_gre_flower.sh \
 	mirror_gre_lag_lacp.sh \
-	mirror_gre_lib.sh \
 	mirror_gre_neigh.sh \
 	mirror_gre_nh.sh \
 	mirror_gre.sh \
-	mirror_gre_topo_lib.sh \
 	mirror_gre_vlan_bridge_1q.sh \
 	mirror_gre_vlan.sh \
-	mirror_lib.sh \
-	mirror_topo_lib.sh \
 	mirror_vlan.sh \
 	router_bridge.sh \
 	router_bridge_vlan.sh \
@@ -50,17 +40,12 @@  TEST_PROGS = bridge_igmp.sh \
 	router_multipath.sh \
 	router.sh \
 	router_vid_1.sh \
-	sch_ets_core.sh \
 	sch_ets.sh \
-	sch_ets_tests.sh \
-	sch_tbf_core.sh \
-	sch_tbf_etsprio.sh \
 	sch_tbf_ets.sh \
 	sch_tbf_prio.sh \
 	sch_tbf_root.sh \
 	tc_actions.sh \
 	tc_chains.sh \
-	tc_common.sh \
 	tc_flower_router.sh \
 	tc_flower.sh \
 	tc_shblocks.sh \
@@ -72,4 +57,20 @@  TEST_PROGS = bridge_igmp.sh \
 	vxlan_bridge_1q.sh \
 	vxlan_symmetric.sh
 
+TEST_PROGS_EXTENDED := devlink_lib.sh \
+	ethtool_lib.sh \
+	fib_offload_lib.sh \
+	forwarding.config.sample \
+	ipip_lib.sh \
+	lib.sh \
+	mirror_gre_lib.sh \
+	mirror_gre_topo_lib.sh \
+	mirror_lib.sh \
+	mirror_topo_lib.sh \
+	sch_ets_core.sh \
+	sch_ets_tests.sh \
+	sch_tbf_core.sh \
+	sch_tbf_etsprio.sh \
+	tc_common.sh
+
 include ../../lib.mk
diff --git a/tools/testing/selftests/net/forwarding/ethtool_lib.sh b/tools/testing/selftests/net/forwarding/ethtool_lib.sh
old mode 100755
new mode 100644