Skip to content

Commit

Permalink
selftests: tc-testing: check if 'jq' is available in taprio tests
Browse files Browse the repository at this point in the history
If 'jq' is not available the taprio tests might enter an infinite loop,
use the "dependsOn" feature from tdc to check if jq is present. If it's
not the test is skipped.

Suggested-by: Davide Caratti <[email protected]>
Signed-off-by: Pedro Tammela <[email protected]>
Reviewed-by: Davide Caratti <[email protected]>
Acked-by: Jamal Hadi Salim <[email protected]>
Reviewed-by: Davide Caratti <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
tammela authored and kuba-moo committed Jan 26, 2024
1 parent 14a12e6 commit 4f4d384
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@
"plugins": {
"requires": "nsPlugin"
},
"dependsOn": "echo '' | jq",
"setup": [
"echo \"1 1 8\" > /sys/bus/netdevsim/new_device",
"$TC qdisc replace dev $ETH handle 8001: parent root stab overhead 24 taprio num_tc 8 map 0 1 2 3 4 5 6 7 queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 base-time 0 sched-entry S ff 20000000 clockid CLOCK_TAI",
Expand All @@ -192,6 +193,7 @@
"plugins": {
"requires": "nsPlugin"
},
"dependsOn": "echo '' | jq",
"setup": [
"echo \"1 1 8\" > /sys/bus/netdevsim/new_device",
"$TC qdisc replace dev $ETH handle 8001: parent root stab overhead 24 taprio num_tc 8 map 0 1 2 3 4 5 6 7 queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 base-time 0 sched-entry S ff 20000000 flags 0x2",
Expand Down

0 comments on commit 4f4d384

Please sign in to comment.