diff options
author | Pedro Tammela <pctammela@mojatatu.com> | 2023-10-17 12:23:09 -0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-10-18 18:07:51 -0700 |
commit | 35027c790970c40a5093550af7c9f1c77de182b4 (patch) | |
tree | 4bc07cbff7c9f1b38ad6f1f8e9a87c570111aa73 /tools/testing/selftests/tc-testing/scripts | |
parent | f157b73d511416226f70c3cb1750eb6fdfa76a2a (diff) | |
download | linux-stable-35027c790970c40a5093550af7c9f1c77de182b4.tar.gz linux-stable-35027c790970c40a5093550af7c9f1c77de182b4.tar.bz2 linux-stable-35027c790970c40a5093550af7c9f1c77de182b4.zip |
selftests: tc-testing: move auxiliary scripts to a dedicated folder
Some taprio tests need auxiliary scripts to wait for workqueue events to
process. Move them to a dedicated folder in order to package them for
the kselftests tarball.
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
Link: https://lore.kernel.org/r/20231017152309.3196320-3-pctammela@mojatatu.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing/selftests/tc-testing/scripts')
-rwxr-xr-x | tools/testing/selftests/tc-testing/scripts/taprio_wait_for_admin.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/testing/selftests/tc-testing/scripts/taprio_wait_for_admin.sh b/tools/testing/selftests/tc-testing/scripts/taprio_wait_for_admin.sh new file mode 100755 index 000000000000..f5335e8ad6b4 --- /dev/null +++ b/tools/testing/selftests/tc-testing/scripts/taprio_wait_for_admin.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +TC="$1"; shift +ETH="$1"; shift + +# The taprio architecture changes the admin schedule from a hrtimer and not +# from process context, so we need to wait in order to make sure that any +# schedule change actually took place. +while :; do + has_admin="$($TC -j qdisc show dev $ETH root | jq '.[].options | has("admin")')" + if [ "$has_admin" = "false" ]; then + break; + fi + + sleep 1 +done |