Commit 51217c65 authored by Chia-Yu Chang's avatar Chia-Yu Chang Committed by Jakub Kicinski
Browse files

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: default avatarChia-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: default avatarJakub Kicinski <kuba@kernel.org>
parent 8f9516da
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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)"