* [PATCH net v2 06/17] selftests: forwarding: Add a helper to skip test when using veth pairs
2023-08-08 14:14 [PATCH net v2 00/17] selftests: forwarding: Various fixes Ido Schimmel
@ 2023-08-08 14:14 ` Ido Schimmel
2023-08-09 1:55 ` Hangbin Liu
0 siblings, 1 reply; 5+ messages in thread
From: Ido Schimmel @ 2023-08-08 14:14 UTC (permalink / raw)
To: netdev
Cc: davem, kuba, pabeni, edumazet, petrm, razor, mirsad.todorovac,
Ido Schimmel
A handful of tests require physical loopbacks to be used instead of veth
pairs. Add a helper that these tests will invoke in order to be skipped
when executed with veth pairs.
Fixes: 64916b57c0b1 ("selftests: forwarding: Add speed and auto-negotiation test")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr>
---
tools/testing/selftests/net/forwarding/lib.sh | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh
index 40a8c1541b7f..f69015bf2dea 100755
--- a/tools/testing/selftests/net/forwarding/lib.sh
+++ b/tools/testing/selftests/net/forwarding/lib.sh
@@ -164,6 +164,17 @@ check_port_mab_support()
fi
}
+skip_on_veth()
+{
+ local kind=$(ip -j -d link show dev ${NETIFS[p1]} |
+ jq -r '.[].linkinfo.info_kind')
+
+ if [[ $kind == veth ]]; then
+ echo "SKIP: Test cannot be run with veth pairs"
+ exit $ksft_skip
+ fi
+}
+
if [[ "$(id -u)" -ne 0 ]]; then
echo "SKIP: need root privileges"
exit $ksft_skip
--
2.40.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net v2 06/17] selftests: forwarding: Add a helper to skip test when using veth pairs
2023-08-08 14:14 ` [PATCH net v2 06/17] selftests: forwarding: Add a helper to skip test when using veth pairs Ido Schimmel
@ 2023-08-09 1:55 ` Hangbin Liu
2023-08-09 5:47 ` Ido Schimmel
0 siblings, 1 reply; 5+ messages in thread
From: Hangbin Liu @ 2023-08-09 1:55 UTC (permalink / raw)
To: Ido Schimmel
Cc: netdev, davem, kuba, pabeni, edumazet, petrm, razor,
mirsad.todorovac
On Tue, Aug 08, 2023 at 05:14:52PM +0300, Ido Schimmel wrote:
> A handful of tests require physical loopbacks to be used instead of veth
> pairs. Add a helper that these tests will invoke in order to be skipped
> when executed with veth pairs.
Hi Ido,
How to create physical loopbacks?
Thanks
Hangbin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net v2 06/17] selftests: forwarding: Add a helper to skip test when using veth pairs
2023-08-09 1:55 ` Hangbin Liu
@ 2023-08-09 5:47 ` Ido Schimmel
2023-08-09 6:46 ` Hangbin Liu
0 siblings, 1 reply; 5+ messages in thread
From: Ido Schimmel @ 2023-08-09 5:47 UTC (permalink / raw)
To: Hangbin Liu
Cc: Ido Schimmel, netdev, davem, kuba, pabeni, edumazet, petrm, razor,
mirsad.todorovac
On Wed, Aug 09, 2023 at 09:55:25AM +0800, Hangbin Liu wrote:
> On Tue, Aug 08, 2023 at 05:14:52PM +0300, Ido Schimmel wrote:
> > A handful of tests require physical loopbacks to be used instead of veth
> > pairs. Add a helper that these tests will invoke in order to be skipped
> > when executed with veth pairs.
>
> Hi Ido,
>
> How to create physical loopbacks?
It's the same concept as veth. Take two physical ports and connect them
with a cable.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net v2 06/17] selftests: forwarding: Add a helper to skip test when using veth pairs
2023-08-09 5:47 ` Ido Schimmel
@ 2023-08-09 6:46 ` Hangbin Liu
0 siblings, 0 replies; 5+ messages in thread
From: Hangbin Liu @ 2023-08-09 6:46 UTC (permalink / raw)
To: Ido Schimmel; +Cc: netdev
On Wed, Aug 09, 2023 at 08:47:45AM +0300, Ido Schimmel wrote:
> On Wed, Aug 09, 2023 at 09:55:25AM +0800, Hangbin Liu wrote:
> > On Tue, Aug 08, 2023 at 05:14:52PM +0300, Ido Schimmel wrote:
> > > A handful of tests require physical loopbacks to be used instead of veth
> > > pairs. Add a helper that these tests will invoke in order to be skipped
> > > when executed with veth pairs.
> >
> > Hi Ido,
> >
> > How to create physical loopbacks?
>
> It's the same concept as veth. Take two physical ports and connect them
> with a cable.
With a cable.. Thanks, haha!
Hangbin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net v2 06/17] selftests: forwarding: Add a helper to skip test when using veth pairs
@ 2023-08-09 7:44 kernel test robot
0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2023-08-09 7:44 UTC (permalink / raw)
Cc: oe-kbuild-all, llvm
In-Reply-To: <20230808141503.4060661-7-idosch@nvidia.com>
References: <20230808141503.4060661-7-idosch@nvidia.com>
TO: Ido Schimmel <idosch@nvidia.com>
Hi Ido,
kernel test robot noticed the following build errors:
[auto build test ERROR on net/main]
url: https://github.com/intel-lab-lkp/linux/commits/Ido-Schimmel/selftests-forwarding-Skip-test-when-no-interfaces-are-specified/20230809-000303
base: net/main
patch link: https://lore.kernel.org/r/20230808141503.4060661-7-idosch%40nvidia.com
patch subject: [PATCH net v2 06/17] selftests: forwarding: Add a helper to skip test when using veth pairs
config: riscv-randconfig-r031-20230808 (https://download.01.org/0day-ci/archive/20230809/202308091512.SuOL2n62-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20230809/202308091512.SuOL2n62-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308091512.SuOL2n62-lkp@intel.com/
All errors (new ones prefixed by >>):
>> ld.lld: error: vmlinux.a(init/main.o):(function do_one_initcall: .text+0x4c0): relocation R_RISCV_HI20 out of range: 527723 is not in [-524288, 524287]; references 'trace_initcall_start.______f'
>>> referenced by rcupdate.h:777 (include/linux/rcupdate.h:777)
>>> defined in vmlinux.a(init/main.o)
--
>> ld.lld: error: vmlinux.a(init/main.o):(function do_one_initcall: .text+0x518): relocation R_RISCV_HI20 out of range: 527723 is not in [-524288, 524287]; references 'trace_initcall_start.______f.82'
>>> referenced by rcupdate.h:777 (include/linux/rcupdate.h:777)
>>> defined in vmlinux.a(init/main.o)
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-08-09 7:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-09 7:44 [PATCH net v2 06/17] selftests: forwarding: Add a helper to skip test when using veth pairs kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2023-08-08 14:14 [PATCH net v2 00/17] selftests: forwarding: Various fixes Ido Schimmel
2023-08-08 14:14 ` [PATCH net v2 06/17] selftests: forwarding: Add a helper to skip test when using veth pairs Ido Schimmel
2023-08-09 1:55 ` Hangbin Liu
2023-08-09 5:47 ` Ido Schimmel
2023-08-09 6:46 ` Hangbin Liu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.