diff options
| author | Chia-Yu Chang <chia-yu.chang@nokia-bell-labs.com> | 2025-07-22 11:59:13 +0200 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-07-23 17:52:08 -0700 |
| commit | 51217c659e741e7e5452ac550aaf83692d3d14cd (patch) | |
| tree | 392fd2cef202769735939d278f5d6cef9084bfdc /tools/testing/selftests/tc-testing | |
| parent | sched: Add enqueue/dequeue of dualpi2 qdisc (diff) | |
| download | linux-51217c659e741e7e5452ac550aaf83692d3d14cd.tar.gz linux-51217c659e741e7e5452ac550aaf83692d3d14cd.zip | |
selftests/tc-testing: Fix warning and style check on tdc.sh
Replace exit code check with '! cmd' and add both quote and $(...)
around 'nproc' to prevent warning and issue reported by shellcheck.
Signed-off-by: Chia-Yu Chang <chia-yu.chang@nokia-bell-labs.com>
Link: https://patch.msgid.link/20250722095915.24485-5-chia-yu.chang@nokia-bell-labs.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing/selftests/tc-testing')
| -rwxr-xr-x | tools/testing/selftests/tc-testing/tdc.sh | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/testing/selftests/tc-testing/tdc.sh b/tools/testing/selftests/tc-testing/tdc.sh index 589b18ed758a..7a81088802d1 100755 --- a/tools/testing/selftests/tc-testing/tdc.sh +++ b/tools/testing/selftests/tc-testing/tdc.sh @@ -4,8 +4,7 @@ # If a module is required and was not compiled # the test that requires it will fail anyways try_modprobe() { - modprobe -q -R "$1" - if [ $? -ne 0 ]; then + if ! modprobe -q -R "$1"; then echo "Module $1 not found... skipping." else modprobe "$1" @@ -67,4 +66,4 @@ try_modprobe sch_hfsc try_modprobe sch_hhf try_modprobe sch_htb try_modprobe sch_teql -./tdc.py -J`nproc` +./tdc.py -J"$(nproc)" |
