Skip to contentSkip to conversation

selftests: tc-testing: use $IP in hfsc test 8c39 setup

PATCH Applied Ivan Vecera 4 participants 4 messages Oct 14 – Oct 20

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests: tc-testing: use $IP in hfsc test 8c39 setup

Test 8c39 brings up lo with a bare "ip" command. nsPlugin runs it as "$IP netns exec <ns> ip ...", and as tdc runs commands with an empty environment, "ip netns exec" searches only the default execvp() path (/bin:/usr/bin). On systems that install ip only in /sbin, like Fedora, the setup fails:

  # ./tdc.py -e 8c39
  Test 8c39: HFSC classify walk still reaches leaf after lateral drift
  -----> prepare stage *** Could not execute: "ip link set lo up"
  -----> prepare stage *** Error message: "exec of "ip" failed: No such file or directory

Use $IP like all other tdc tests do.

Fixes 1e24c4f2ee44 ("selftests: tc-testing: add a lateral-drift hfsc classify-walk test")
---
 tools/testing/selftests/tc-testing/tc-tests/qdiscs/hfsc.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/tc-testing/tc-tests/qdiscs/hfsc.json +1 -1
index 4f6bbb8b57f9..557730eef055 100644
@@ -181,7 +181,7 @@
             "requires": "nsPlugin"
         },
         "setup": [
-            "ip link set lo up",
+            "$IP link set lo up",
             "$TC qdisc add dev lo handle 1: root hfsc default 30",
             "$TC class add dev lo parent 1: classid 1:1 hfsc rt m2 100kbit",
             "$TC class add dev lo parent 1:1 classid 1:10 hfsc rt m2 50kbit",
Signature · 1 line
2.56.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines · Ivan Vecera

Test 8c39 brings up lo with a bare "ip" command. nsPlugin runs it as "$IP netns exec <ns> ip ...", and as tdc runs commands with an empty environment, "ip netns exec" searches only the default execvp() path (/bin:/usr/bin). On systems that install ip only in /sbin, like Fedora, the setup fails:

  # ./tdc.py -e 8c39
  Test 8c39: HFSC classify walk still reaches leaf after lateral drift
  -----> prepare stage *** Could not execute: "ip link set lo up"
  -----> prepare stage *** Error message: "exec of "ip" failed: No such file or directory
Quoted 4 lines

Use $IP like all other tdc tests do.

Fixes 1e24c4f2ee44 ("selftests: tc-testing: add a lateral-drift hfsc classify-walk test")
Reviewed-by on v1 1/1
#2 lore raw
In reply to Ivan Vecera
Quoted 35 lines · Ivan Vecera

Test 8c39 brings up lo with a bare "ip" command. nsPlugin runs it as "$IP netns exec <ns> ip ...", and as tdc runs commands with an empty environment, "ip netns exec" searches only the default execvp() path (/bin:/usr/bin). On systems that install ip only in /sbin, like Fedora, the setup fails:

  # ./tdc.py -e 8c39
  Test 8c39: HFSC classify walk still reaches leaf after lateral drift
  -----> prepare stage *** Could not execute: "ip link set lo up"
  -----> prepare stage *** Error message: "exec of "ip" failed: No such file or directory

Use $IP like all other tdc tests do.

Fixes 1e24c4f2ee44 ("selftests: tc-testing: add a lateral-drift hfsc classify-walk test")
---
 tools/testing/selftests/tc-testing/tc-tests/qdiscs/hfsc.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/tc-testing/tc-tests/qdiscs/hfsc.json +1 -1
index 4f6bbb8b57f9..557730eef055 100644
@@ -181,7 +181,7 @@
             "requires": "nsPlugin"
         },
         "setup": [
-            "ip link set lo up",
+            "$IP link set lo up",
             "$TC qdisc add dev lo handle 1: root hfsc default 30",
             "$TC class add dev lo parent 1: classid 1:1 hfsc rt m2 100kbit",
             "$TC class add dev lo parent 1:1 classid 1:10 hfsc rt m2 50kbit",
Signature · 1 line
2.56.0
#3 lore raw
In reply to Ivan Vecera
This patch was applied to netdev/net.git (main) by Paolo Abeni <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <[email protected]>:

Quoted 10 lines · On Wed, 14 Oct 2026 14:14:12 +0200 you wrote:

Test 8c39 brings up lo with a bare "ip" command. nsPlugin runs it as "$IP netns exec <ns> ip ...", and as tdc runs commands with an empty environment, "ip netns exec" searches only the default execvp() path (/bin:/usr/bin). On systems that install ip only in /sbin, like Fedora, the setup fails:

  # ./tdc.py -e 8c39
  Test 8c39: HFSC classify walk still reaches leaf after lateral drift

[...]

Here is the summary with links:
- [net] selftests: tc-testing: use $IP in hfsc test 8c39 setup

    https://git.kernel.org/netdev/net/c/b6ef0d965fe8

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html