netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PROBLEM] selftests: net/forwarding/*.sh: 'Command line is not complete. Try option "help"'
@ 2023-07-17 20:51 Mirsad Todorovac
  2023-07-18  7:22 ` Ido Schimmel
  0 siblings, 1 reply; 8+ messages in thread
From: Mirsad Todorovac @ 2023-07-17 20:51 UTC (permalink / raw)
  To: netdev
  Cc: linux-kselftest, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Shuah Khan, Ido Schimmel, Nikolay Aleksandrov,
	Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 1898 bytes --]

Hi,

There seems to be a problem with net/forwarding line of 6.5-rc2 kselftests,
vanilla Torvalds tree, commit fdf0eaf11452, on Ubuntu 22.04 LTS Jammy Jellyfish.

(Confirmed on Ubuntu 22.10 Kinetic Kudu.)

Tests fail with error message:

Command line is not complete. Try option "help"
Failed to create netif

The script

# tools/testing/seltests/net/forwarding/bridge_igmp.sh

bash `set -x` ends with an error:

++ create_netif_veth
++ local i
++ (( i = 1 ))
++ (( i <= NUM_NETIFS ))
++ local j=2
++ ip link show dev
++ [[ 255 -ne 0 ]]
++ ip link add type veth peer name
Command line is not complete. Try option "help"
++ [[ 255 -ne 0 ]]
++ echo 'Failed to create netif'
Failed to create netif
++ exit 1

The problem seems to be linked with this piece of code of "lib.sh":

create_netif_veth()
{
         local i

         for ((i = 1; i <= NUM_NETIFS; ++i)); do
                 local j=$((i+1))

                 ip link show dev ${NETIFS[p$i]} &> /dev/null
                 if [[ $? -ne 0 ]]; then
                         ip link add ${NETIFS[p$i]} type veth \
                                 peer name ${NETIFS[p$j]}
                         if [[ $? -ne 0 ]]; then
                                 echo "Failed to create netif"
                                 exit 1
                         fi
                 fi
                 i=$j
         done
}

Somehow, ${NETIFS[p$i]} is evaluated to an empty string?

However, I can't seem to see what is the expected result.

The problem was confirmed in the backlogs of 6.5-rc1 and 6.4 kselftests.

It is possible that I'm doing something terribly wrong, but it is basically
the default kselftest suite on a rather minimal Ubuntu.

Please find attached the bash output from `set -x`.

Version of iproute2 is:
ii  iproute2       5.15.0-1ubuntu2 amd64        networking and traffic control tools

Hope this helps.

Best regards,
Mirsad Todorovac

[-- Attachment #2: 6.5-rc2-net-forwarding.out --]
[-- Type: text/plain, Size: 2676 bytes --]

+ ALL_TESTS='v2reportleave_test v3include_test v3inc_allow_test v3inc_is_include_test 	   v3inc_is_exclude_test v3inc_to_exclude_test v3exc_allow_test v3exc_is_include_test 	   v3exc_is_exclude_test v3exc_to_exclude_test v3inc_block_test v3exc_block_test 	   v3exc_timeout_test v3star_ex_auto_add_test'
+ NUM_NETIFS=4
+ CHECK_TC=yes
+ TEST_GROUP=239.10.10.10
+ TEST_GROUP_MAC=01:00:5e:0a:0a:0a
+ ALL_GROUP=224.0.0.1
+ ALL_MAC=01:00:5e:00:00:01
+ MZPKT_IS_INC=22:00:9d:de:00:00:00:01:01:00:00:03:ef:0a:0a:0a:c0:00:02:01:c0:00:02:02:c0:00:02:03
+ MZPKT_IS_INC2=22:00:9d:c3:00:00:00:01:01:00:00:03:ef:0a:0a:0a:c0:00:02:0a:c0:00:02:0b:c0:00:02:0c
+ MZPKT_IS_INC3=22:00:5f:b4:00:00:00:01:01:00:00:02:ef:0a:0a:0a:c0:00:02:14:c0:00:02:1e
+ MZPKT_ALLOW=22:00:99:c3:00:00:00:01:05:00:00:03:ef:0a:0a:0a:c0:00:02:0a:c0:00:02:0b:c0:00:02:0c
+ MZPKT_ALLOW2=22:00:5b:b4:00:00:00:01:05:00:00:02:ef:0a:0a:0a:c0:00:02:14:c0:00:02:1e
+ MZPKT_IS_EXC=22:00:da:b6:00:00:00:01:02:00:00:04:ef:0a:0a:0a:c0:00:02:01:c0:00:02:02:c0:00:02:14:c0:00:02:15
+ MZPKT_IS_EXC2=22:00:5e:b4:00:00:00:01:02:00:00:02:ef:0a:0a:0a:c0:00:02:14:c0:00:02:1e
+ MZPKT_TO_EXC=22:00:9a:b1:00:00:00:01:04:00:00:03:ef:0a:0a:0a:c0:00:02:01:c0:00:02:14:c0:00:02:1e
+ MZPKT_BLOCK=22:00:98:b1:00:00:00:01:06:00:00:03:ef:0a:0a:0a:c0:00:02:01:c0:00:02:14:c0:00:02:1e
+ source lib.sh
++ ksft_skip=4
++ PING=ping
++ PING6=ping6
++ MZ=mausezahn
++ ARPING=arping
++ TEAMD=teamd
++ WAIT_TIME=5
++ PAUSE_ON_FAIL=no
++ PAUSE_ON_CLEANUP=no
++ NETIF_TYPE=veth
++ NETIF_CREATE=yes
++ MCD=smcrouted
++ MC_CLI=smcroutectl
++ PING_COUNT=10
++ PING_TIMEOUT=5
++ WAIT_TIMEOUT=20
++ INTERFACE_TIMEOUT=600
++ LOW_AGEING_TIME=1000
++ REQUIRE_JQ=yes
++ REQUIRE_MZ=yes
++ REQUIRE_MTOOLS=no
++ STABLE_MAC_ADDRS=no
++ TCPDUMP_EXTRA_FLAGS=
++ relative_path=lib.sh
++ [[ lib.sh == \l\i\b\.\s\h ]]
++ relative_path=.
++ [[ -f ./forwarding.config ]]
+++ id -u
++ [[ 0 -ne 0 ]]
++ [[ yes = \y\e\s ]]
++ check_tc_version
++ tc -j
++ [[ 0 -ne 0 ]]
++ [[ yes = \y\e\s ]]
++ require_command jq
++ local cmd=jq
++ shift
+++ command -v jq
++ [[ ! -x /usr/bin/jq ]]
++ [[ yes = \y\e\s ]]
++ require_command mausezahn
++ local cmd=mausezahn
++ shift
+++ command -v mausezahn
++ [[ ! -x /usr/sbin/mausezahn ]]
++ [[ no = \y\e\s ]]
++ [[ ! -v NUM_NETIFS ]]
++ count=0
++ [[ 0 -gt 0 ]]
++ declare -A MAC_ADDR_ORIG
++ [[ yes = \y\e\s ]]
++ create_netif
++ case "$NETIF_TYPE" in
++ create_netif_veth
++ local i
++ (( i = 1 ))
++ (( i <= NUM_NETIFS ))
++ local j=2
++ ip link show dev
++ [[ 255 -ne 0 ]]
++ ip link add type veth peer name
Command line is not complete. Try option "help"
++ [[ 255 -ne 0 ]]
++ echo 'Failed to create netif'
Failed to create netif
++ exit 1

[-- Attachment #3: config-6.5.0-rc2-debug-gfdf0eaf11452.xz --]
[-- Type: application/x-xz, Size: 57628 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-07-21 20:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-17 20:51 [PROBLEM] selftests: net/forwarding/*.sh: 'Command line is not complete. Try option "help"' Mirsad Todorovac
2023-07-18  7:22 ` Ido Schimmel
2023-07-18 10:35   ` Petr Machata
2023-07-18 18:29     ` Mirsad Todorovac
2023-07-18 18:19   ` Mirsad Todorovac
2023-07-18 18:39     ` Mirsad Todorovac
2023-07-19 12:59       ` Ido Schimmel
2023-07-21 20:41         ` Mirsad Todorovac

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).