tools/testing/selftests/tc-testing/scripts/taprio_wait_for_admin.sh

Source file repositories/reference/linux-study-clean/tools/testing/selftests/tc-testing/scripts/taprio_wait_for_admin.sh

File Facts

System
Linux kernel
Corpus path
tools/testing/selftests/tc-testing/scripts/taprio_wait_for_admin.sh
Extension
.sh
Size
393 bytes
Lines
17
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: tools
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

#!/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

Annotation

Implementation Notes