ShellCheck - shell script analysis tool version: 0.10.0 license: GNU General Public License, version 3 website: https://www.shellcheck.net Redirect to /tmp/tmp.wAZrEcP924 and /tmp/tmp.uat6xyrhAs Tree base: 521a940154ca ("net: dst_metadata: fix IP_DF bit not extracted from tunnel headers") Now at: e1ed9068e5df ("selftests: openvswitch: add a simple test for tunnel metadata") ====== Checking before the patch ====== Checking tools/testing/selftests/net/openvswitch/openvswitch.sh - d68fdf4084a3597b59d0d312e2f1fd42dff6491ab389c2e973f83ff27b2cb2bc In openvswitch.sh line 33: echo "`date +"[%m-%d %H:%M:%S]"` $*" >> ${ovs_dir}/debug.log ^------------------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "$(date +"[%m-%d %H:%M:%S]") $*" >> "${ovs_dir}"/debug.log In openvswitch.sh line 34: [ $VERBOSE = 0 ] || echo $* ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$VERBOSE" = 0 ] || echo "$*" In openvswitch.sh line 38: info "waiting $WAIT_TIMEOUT s for: $@" ^-- SC2145 (error): Argument mixes string and array. Use * or separate argument. In openvswitch.sh line 61: ovs_base=`pwd` ^---^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`. Did you mean: ovs_base=$(pwd) In openvswitch.sh line 68: NO_BIN=0 ^----^ SC2034 (warning): NO_BIN appears unused. Verify use (or export if used externally). In openvswitch.sh line 72: if [ -e $d ]; then ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ -e "$d" ]; then In openvswitch.sh line 77: ovs_setenv $1 ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_setenv "$1" In openvswitch.sh line 81: [ -e ${ovs_dir}/cleanup ] && . "$ovs_dir/cleanup" ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----------------^ SC1091 (info): Not following: ./cleanup: openBinaryFile: does not exist (No such file or directory) Did you mean: [ -e "${ovs_dir}"/cleanup ] && . "$ovs_dir/cleanup" In openvswitch.sh line 85: echo "$1" > ${ovs_dir}/cleanup.tmp ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "$1" > "${ovs_dir}"/cleanup.tmp In openvswitch.sh line 86: cat ${ovs_dir}/cleanup >> ${ovs_dir}/cleanup.tmp ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: cat "${ovs_dir}"/cleanup >> "${ovs_dir}"/cleanup.tmp In openvswitch.sh line 87: mv ${ovs_dir}/cleanup.tmp ${ovs_dir}/cleanup ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: mv "${ovs_dir}"/cleanup.tmp "${ovs_dir}"/cleanup In openvswitch.sh line 91: sandbox=$1 ^-----^ SC2034 (warning): sandbox appears unused. Verify use (or export if used externally). In openvswitch.sh line 95: test -e ${ovs_dir}/cleanup || : > ${ovs_dir}/cleanup ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: test -e "${ovs_dir}"/cleanup || : > "${ovs_dir}"/cleanup In openvswitch.sh line 100: (ovs_setenv $1; shift; ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: (ovs_setenv "$1"; shift; In openvswitch.sh line 101: info "run cmd: $@"; "$@" >> ${ovs_dir}/debug.log) ^-- SC2145 (error): Argument mixes string and array. Use * or separate argument. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: info "run cmd: $@"; "$@" >> "${ovs_dir}"/debug.log) In openvswitch.sh line 103: ovs_setenv $1 ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_setenv "$1" In openvswitch.sh line 111: ovs_sbx "$sbxname" python3 $ovs_base/ovs-dpctl.py add-dp $* ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_sbx "$sbxname" python3 "$ovs_base"/ovs-dpctl.py add-dp "$*" In openvswitch.sh line 118: ovs_sbx "$1" python3 $ovs_base/ovs-dpctl.py add-if "$2" "$3" \ ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_sbx "$1" python3 "$ovs_base"/ovs-dpctl.py add-if "$2" "$3" \ In openvswitch.sh line 121: python3 $ovs_base/ovs-dpctl.py add-if \ ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: python3 "$ovs_base"/ovs-dpctl.py add-if \ In openvswitch.sh line 122: -u "$2" "$3" >$ovs_dir/$3.out 2>$ovs_dir/$3.err & ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -u "$2" "$3" >"$ovs_dir"/"$3".out 2>"$ovs_dir"/"$3".err & In openvswitch.sh line 130: ovs_sbx "$1" python3 $ovs_base/ovs-dpctl.py del-if "$2" "$3" || return 1 ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_sbx "$1" python3 "$ovs_base"/ovs-dpctl.py del-if "$2" "$3" || return 1 In openvswitch.sh line 139: $* >> $ovs_dir/stdout 2>> $ovs_dir/stderr & ^-- SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $* >> "$ovs_dir"/stdout 2>> "$ovs_dir"/stderr & In openvswitch.sh line 141: ip netns exec $netns $* >> $ovs_dir/stdout 2>> $ovs_dir/stderr & ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$netns" "$*" >> "$ovs_dir"/stdout 2>> "$ovs_dir"/stderr & In openvswitch.sh line 150: ovs_netns_spawn_daemon $sbx "_default" $* ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_netns_spawn_daemon "$sbx" "_default" "$*" In openvswitch.sh line 174: if [ $TRACING -eq 1 ]; then ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$TRACING" -eq 1 ]; then In openvswitch.sh line 176: ovs_wait grep -q "listening on any" ${ovs_dir}/stderr ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_wait grep -q "listening on any" "${ovs_dir}"/stderr In openvswitch.sh line 184: ovs_sbx "$1" python3 $ovs_base/ovs-dpctl.py add-flow "$2" "$3" "$4" ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_sbx "$1" python3 "$ovs_base"/ovs-dpctl.py add-flow "$2" "$3" "$4" In openvswitch.sh line 185: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In openvswitch.sh line 194: ovs_sbx "$1" python3 $ovs_base/ovs-dpctl.py del-flows "$2" ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_sbx "$1" python3 "$ovs_base"/ovs-dpctl.py del-flows "$2" In openvswitch.sh line 202: perf record -a -q -e skb:kfree_skb -o ${ovs_dir}/perf.data $* \ ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: perf record -a -q -e skb:kfree_skb -o "${ovs_dir}"/perf.data "$*" \ In openvswitch.sh line 203: >> ${ovs_dir}/stdout 2>> ${ovs_dir}/stderr ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: >> "${ovs_dir}"/stdout 2>> "${ovs_dir}"/stderr In openvswitch.sh line 211: local perf_output=`perf script -i ${ovs_dir}/perf.data -F trace:event,trace` ^---------^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local perf_output=$(perf script -i "${ovs_dir}"/perf.data -F trace:event,trace) In openvswitch.sh line 214: return `echo "$perf_output" | grep "$pattern" | wc -l` ^-- SC2046 (warning): Quote this to prevent word splitting. ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`. ^-------------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. Did you mean: return $(echo "$perf_output" | grep "$pattern" | wc -l) In openvswitch.sh line 221: ovs_add_flow $@ &> /dev/null $@ && return 1 ^-- SC2068 (error): Double quote array expansions to avoid re-splitting elements. ^-- SC2068 (error): Double quote array expansions to avoid re-splitting elements. In openvswitch.sh line 265: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In openvswitch.sh line 279: set -- $testcase; ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: set -- "$testcase"; In openvswitch.sh line 280: ovs_test_flow_fails "test_psample" psample $min_key $2 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_test_flow_fails "test_psample" psample "$min_key" "$2" In openvswitch.sh line 304: $ovs_dir/s0.out | cut -d ":" -f 2 | tr -d ' ') ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "$ovs_dir"/s0.out | cut -d ":" -f 2 | tr -d ' ') In openvswitch.sh line 311: ovs_spawn_daemon "test_psample" python3 $ovs_base/ovs-dpctl.py psample-events ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_spawn_daemon "test_psample" python3 "$ovs_base"/ovs-dpctl.py psample-events In openvswitch.sh line 312: ovs_wait grep -q "listening for psample events" ${ovs_dir}/stdout ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_wait grep -q "listening for psample events" "${ovs_dir}"/stdout In openvswitch.sh line 318: ovs_wait grep -q "userspace action command" $ovs_dir/s0.out || return 1 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_wait grep -q "userspace action command" "$ovs_dir"/s0.out || return 1 In openvswitch.sh line 322: $ovs_dir/stdout || return 1 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "$ovs_dir"/stdout || return 1 In openvswitch.sh line 324: ovs_wait grep -q "rate:4294967295,group:2,cookie:eeff0c" $ovs_dir/stdout || return 1 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_wait grep -q "rate:4294967295,group:2,cookie:eeff0c" "$ovs_dir"/stdout || return 1 In openvswitch.sh line 332: which perf >/dev/null 2>&1 || return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: which perf >/dev/null 2>&1 || return "$ksft_skip" In openvswitch.sh line 333: which pahole >/dev/null 2>&1 || return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: which pahole >/dev/null 2>&1 || return "$ksft_skip" In openvswitch.sh line 363: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In openvswitch.sh line 381: ovs_drop_reason_count 0x${ovs_drop_subsys}0001 # OVS_DROP_FLOW_ACTION ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_drop_reason_count 0x"${ovs_drop_subsys}"0001 # OVS_DROP_FLOW_ACTION In openvswitch.sh line 398: ovs_drop_reason_count 0x${ovs_drop_subsys}0004 # OVS_DROP_EXPLICIT_ACTION_ERROR ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_drop_reason_count 0x"${ovs_drop_subsys}"0004 # OVS_DROP_EXPLICIT_ACTION_ERROR In openvswitch.sh line 406: ovs_drop_reason_count 0x${ovs_drop_subsys}0003 # OVS_DROP_EXPLICIT_ACTION ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_drop_reason_count 0x"${ovs_drop_subsys}"0003 # OVS_DROP_EXPLICIT_ACTION In openvswitch.sh line 421: which arping >/dev/null 2>&1 || return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: which arping >/dev/null 2>&1 || return "$ksft_skip" In openvswitch.sh line 436: HW_CLIENT=`ip netns exec client ip link show dev c1 | grep -E 'link/ether [0-9a-f:]+' | awk '{print $2;}'` ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`. Did you mean: HW_CLIENT=$(ip netns exec client ip link show dev c1 | grep -E 'link/ether [0-9a-f:]+' | awk '{print $2;}') In openvswitch.sh line 442: HW_SERVER=`ip netns exec server ip link show dev s1 | grep -E 'link/ether [0-9a-f:]+' | awk '{print $2;}'` ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`. Did you mean: HW_SERVER=$(ip netns exec server ip link show dev s1 | grep -E 'link/ether [0-9a-f:]+' | awk '{print $2;}') In openvswitch.sh line 462: which nc >/dev/null 2>/dev/null || return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: which nc >/dev/null 2>/dev/null || return "$ksft_skip" In openvswitch.sh line 513: if [ $? == 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In openvswitch.sh line 567: which nc >/dev/null 2>/dev/null || return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: which nc >/dev/null 2>/dev/null || return "$ksft_skip" In openvswitch.sh line 615: if [ $? == 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In openvswitch.sh line 629: which nc >/dev/null 2>/dev/null || return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: which nc >/dev/null 2>/dev/null || return "$ksft_skip" In openvswitch.sh line 706: [ $(python3 $ovs_base/ovs-dpctl.py show nv0 | grep port | \ ^-- SC2046 (warning): Quote this to prevent word splitting. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. Did you mean: [ $(python3 "$ovs_base"/ovs-dpctl.py show nv0 | grep port | \ In openvswitch.sh line 710: [ $(python3 $ovs_base/ovs-dpctl.py show nv0 | grep port | \ ^-- SC2046 (warning): Quote this to prevent word splitting. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. Did you mean: [ $(python3 "$ovs_base"/ovs-dpctl.py show nv0 | grep port | \ In openvswitch.sh line 749: ovs_wait grep -q "listening on upcall packet handler" ${ovs_dir}/left0.out ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_wait grep -q "listening on upcall packet handler" "${ovs_dir}"/left0.out In openvswitch.sh line 753: >$ovs_dir/arping.stdout 2>$ovs_dir/arping.stderr ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: >"$ovs_dir"/arping.stdout 2>"$ovs_dir"/arping.stderr In openvswitch.sh line 755: grep -E "MISS upcall\[0/yes\]: .*arp\(sip=172.31.110.1,tip=172.31.110.20,op=1,sha=" $ovs_dir/left0.out >/dev/null 2>&1 || return 1 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: grep -E "MISS upcall\[0/yes\]: .*arp\(sip=172.31.110.1,tip=172.31.110.20,op=1,sha=" "$ovs_dir"/left0.out >/dev/null 2>&1 || return 1 In openvswitch.sh line 782: eval test_${tname} ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: eval test_"${tname}" In openvswitch.sh line 794: read a ^--^ SC2162 (info): read without -r will mangle backslashes. ^-- SC2034 (warning): a appears unused. Verify use (or export if used externally). In openvswitch.sh line 802: rm -rf test_${tname} ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm -rf test_"${tname}" In openvswitch.sh line 811: [ $all_skipped = true ] && [ $exitcode=$ksft_skip ] && exitcode=0 ^-- SC2077 (error): You need spaces around the comparison operator. In openvswitch.sh line 814: $ksft_skip) ^--------^ SC2254 (warning): Quote expansions in case patterns to match literally rather than as a glob. In openvswitch.sh line 845: shift $(($OPTIND-1)) ^-----^ SC2004 (style): $/${} is unnecessary on arithmetic variables. For more information: https://www.shellcheck.net/wiki/SC2068 -- Double quote array expansions to ... https://www.shellcheck.net/wiki/SC2077 -- You need spaces around the compar... https://www.shellcheck.net/wiki/SC2145 -- Argument mixes string and array. ... ====== Checking the tree with the patch ====== Checking tools/testing/selftests/net/openvswitch/openvswitch.sh - d68fdf4084a3597b59d0d312e2f1fd42dff6491ab389c2e973f83ff27b2cb2bc In openvswitch.sh line 34: echo "`date +"[%m-%d %H:%M:%S]"` $*" >> ${ovs_dir}/debug.log ^------------------------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "$(date +"[%m-%d %H:%M:%S]") $*" >> "${ovs_dir}"/debug.log In openvswitch.sh line 35: [ $VERBOSE = 0 ] || echo $* ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: [ "$VERBOSE" = 0 ] || echo "$*" In openvswitch.sh line 39: info "waiting $WAIT_TIMEOUT s for: $@" ^-- SC2145 (error): Argument mixes string and array. Use * or separate argument. In openvswitch.sh line 62: ovs_base=`pwd` ^---^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`. Did you mean: ovs_base=$(pwd) In openvswitch.sh line 69: NO_BIN=0 ^----^ SC2034 (warning): NO_BIN appears unused. Verify use (or export if used externally). In openvswitch.sh line 73: if [ -e $d ]; then ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ -e "$d" ]; then In openvswitch.sh line 78: ovs_setenv $1 ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_setenv "$1" In openvswitch.sh line 82: [ -e ${ovs_dir}/cleanup ] && . "$ovs_dir/cleanup" ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----------------^ SC1091 (info): Not following: ./cleanup: openBinaryFile: does not exist (No such file or directory) Did you mean: [ -e "${ovs_dir}"/cleanup ] && . "$ovs_dir/cleanup" In openvswitch.sh line 86: echo "$1" > ${ovs_dir}/cleanup.tmp ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: echo "$1" > "${ovs_dir}"/cleanup.tmp In openvswitch.sh line 87: cat ${ovs_dir}/cleanup >> ${ovs_dir}/cleanup.tmp ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: cat "${ovs_dir}"/cleanup >> "${ovs_dir}"/cleanup.tmp In openvswitch.sh line 88: mv ${ovs_dir}/cleanup.tmp ${ovs_dir}/cleanup ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: mv "${ovs_dir}"/cleanup.tmp "${ovs_dir}"/cleanup In openvswitch.sh line 92: sandbox=$1 ^-----^ SC2034 (warning): sandbox appears unused. Verify use (or export if used externally). In openvswitch.sh line 96: test -e ${ovs_dir}/cleanup || : > ${ovs_dir}/cleanup ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: test -e "${ovs_dir}"/cleanup || : > "${ovs_dir}"/cleanup In openvswitch.sh line 101: (ovs_setenv $1; shift; ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: (ovs_setenv "$1"; shift; In openvswitch.sh line 102: info "run cmd: $@"; "$@" >> ${ovs_dir}/debug.log) ^-- SC2145 (error): Argument mixes string and array. Use * or separate argument. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: info "run cmd: $@"; "$@" >> "${ovs_dir}"/debug.log) In openvswitch.sh line 104: ovs_setenv $1 ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_setenv "$1" In openvswitch.sh line 112: ovs_sbx "$sbxname" python3 $ovs_base/ovs-dpctl.py add-dp $* ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_sbx "$sbxname" python3 "$ovs_base"/ovs-dpctl.py add-dp "$*" In openvswitch.sh line 119: ovs_sbx "$1" python3 $ovs_base/ovs-dpctl.py add-if \ ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_sbx "$1" python3 "$ovs_base"/ovs-dpctl.py add-if \ In openvswitch.sh line 122: python3 $ovs_base/ovs-dpctl.py add-if \ ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: python3 "$ovs_base"/ovs-dpctl.py add-if \ In openvswitch.sh line 123: -u -t "$2" "$3" "$4" >$ovs_dir/$4.out 2>$ovs_dir/$4.err & ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: -u -t "$2" "$3" "$4" >"$ovs_dir"/"$4".out 2>"$ovs_dir"/"$4".err & In openvswitch.sh line 131: ovs_sbx "$1" python3 $ovs_base/ovs-dpctl.py del-if "$2" "$3" || return 1 ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_sbx "$1" python3 "$ovs_base"/ovs-dpctl.py del-if "$2" "$3" || return 1 In openvswitch.sh line 140: $* >> $ovs_dir/stdout 2>> $ovs_dir/stderr & ^-- SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: $* >> "$ovs_dir"/stdout 2>> "$ovs_dir"/stderr & In openvswitch.sh line 142: ip netns exec $netns $* >> $ovs_dir/stdout 2>> $ovs_dir/stderr & ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$netns" "$*" >> "$ovs_dir"/stdout 2>> "$ovs_dir"/stderr & In openvswitch.sh line 151: ovs_netns_spawn_daemon $sbx "_default" $* ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_netns_spawn_daemon "$sbx" "_default" "$*" In openvswitch.sh line 175: if [ $TRACING -eq 1 ]; then ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$TRACING" -eq 1 ]; then In openvswitch.sh line 177: ovs_wait grep -q "listening on any" ${ovs_dir}/stderr ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_wait grep -q "listening on any" "${ovs_dir}"/stderr In openvswitch.sh line 185: ovs_sbx "$1" python3 $ovs_base/ovs-dpctl.py add-flow "$2" "$3" "$4" ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_sbx "$1" python3 "$ovs_base"/ovs-dpctl.py add-flow "$2" "$3" "$4" In openvswitch.sh line 186: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. In openvswitch.sh line 195: ovs_sbx "$1" python3 $ovs_base/ovs-dpctl.py del-flows "$2" ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_sbx "$1" python3 "$ovs_base"/ovs-dpctl.py del-flows "$2" In openvswitch.sh line 203: perf record -a -q -e skb:kfree_skb -o ${ovs_dir}/perf.data $* \ ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: perf record -a -q -e skb:kfree_skb -o "${ovs_dir}"/perf.data "$*" \ In openvswitch.sh line 204: >> ${ovs_dir}/stdout 2>> ${ovs_dir}/stderr ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: >> "${ovs_dir}"/stdout 2>> "${ovs_dir}"/stderr In openvswitch.sh line 212: local perf_output=`perf script -i ${ovs_dir}/perf.data -F trace:event,trace` ^---------^ SC2155 (warning): Declare and assign separately to avoid masking return values. ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: local perf_output=$(perf script -i "${ovs_dir}"/perf.data -F trace:event,trace) In openvswitch.sh line 215: return `echo "$perf_output" | grep "$pattern" | wc -l` ^-- SC2046 (warning): Quote this to prevent word splitting. ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`. ^-------------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. Did you mean: return $(echo "$perf_output" | grep "$pattern" | wc -l) In openvswitch.sh line 222: ovs_add_flow $@ &> /dev/null $@ && return 1 ^-- SC2068 (error): Double quote array expansions to avoid re-splitting elements. ^-- SC2068 (error): Double quote array expansions to avoid re-splitting elements. In openvswitch.sh line 266: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In openvswitch.sh line 280: set -- $testcase; ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: set -- "$testcase"; In openvswitch.sh line 281: ovs_test_flow_fails "test_psample" psample $min_key $2 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_test_flow_fails "test_psample" psample "$min_key" "$2" In openvswitch.sh line 305: $ovs_dir/s0.out | cut -d ":" -f 2 | tr -d ' ') ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "$ovs_dir"/s0.out | cut -d ":" -f 2 | tr -d ' ') In openvswitch.sh line 312: ovs_spawn_daemon "test_psample" python3 $ovs_base/ovs-dpctl.py psample-events ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_spawn_daemon "test_psample" python3 "$ovs_base"/ovs-dpctl.py psample-events In openvswitch.sh line 313: ovs_wait grep -q "listening for psample events" ${ovs_dir}/stdout ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_wait grep -q "listening for psample events" "${ovs_dir}"/stdout In openvswitch.sh line 319: ovs_wait grep -q "userspace action command" $ovs_dir/s0.out || return 1 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_wait grep -q "userspace action command" "$ovs_dir"/s0.out || return 1 In openvswitch.sh line 323: $ovs_dir/stdout || return 1 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "$ovs_dir"/stdout || return 1 In openvswitch.sh line 325: ovs_wait grep -q "rate:4294967295,group:2,cookie:eeff0c" $ovs_dir/stdout || return 1 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_wait grep -q "rate:4294967295,group:2,cookie:eeff0c" "$ovs_dir"/stdout || return 1 In openvswitch.sh line 333: which perf >/dev/null 2>&1 || return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: which perf >/dev/null 2>&1 || return "$ksft_skip" In openvswitch.sh line 334: which pahole >/dev/null 2>&1 || return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: which pahole >/dev/null 2>&1 || return "$ksft_skip" In openvswitch.sh line 364: return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: return "$ksft_skip" In openvswitch.sh line 382: ovs_drop_reason_count 0x${ovs_drop_subsys}0001 # OVS_DROP_FLOW_ACTION ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_drop_reason_count 0x"${ovs_drop_subsys}"0001 # OVS_DROP_FLOW_ACTION In openvswitch.sh line 399: ovs_drop_reason_count 0x${ovs_drop_subsys}0004 # OVS_DROP_EXPLICIT_ACTION_ERROR ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_drop_reason_count 0x"${ovs_drop_subsys}"0004 # OVS_DROP_EXPLICIT_ACTION_ERROR In openvswitch.sh line 407: ovs_drop_reason_count 0x${ovs_drop_subsys}0003 # OVS_DROP_EXPLICIT_ACTION ^----------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_drop_reason_count 0x"${ovs_drop_subsys}"0003 # OVS_DROP_EXPLICIT_ACTION In openvswitch.sh line 422: which arping >/dev/null 2>&1 || return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: which arping >/dev/null 2>&1 || return "$ksft_skip" In openvswitch.sh line 437: HW_CLIENT=`ip netns exec client ip link show dev c1 | grep -E 'link/ether [0-9a-f:]+' | awk '{print $2;}'` ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`. Did you mean: HW_CLIENT=$(ip netns exec client ip link show dev c1 | grep -E 'link/ether [0-9a-f:]+' | awk '{print $2;}') In openvswitch.sh line 443: HW_SERVER=`ip netns exec server ip link show dev s1 | grep -E 'link/ether [0-9a-f:]+' | awk '{print $2;}'` ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`. Did you mean: HW_SERVER=$(ip netns exec server ip link show dev s1 | grep -E 'link/ether [0-9a-f:]+' | awk '{print $2;}') In openvswitch.sh line 463: which nc >/dev/null 2>/dev/null || return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: which nc >/dev/null 2>/dev/null || return "$ksft_skip" In openvswitch.sh line 514: if [ $? == 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In openvswitch.sh line 568: which nc >/dev/null 2>/dev/null || return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: which nc >/dev/null 2>/dev/null || return "$ksft_skip" In openvswitch.sh line 616: if [ $? == 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. In openvswitch.sh line 630: which nc >/dev/null 2>/dev/null || return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: which nc >/dev/null 2>/dev/null || return "$ksft_skip" In openvswitch.sh line 707: [ $(python3 $ovs_base/ovs-dpctl.py show nv0 | grep port | \ ^-- SC2046 (warning): Quote this to prevent word splitting. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. Did you mean: [ $(python3 "$ovs_base"/ovs-dpctl.py show nv0 | grep port | \ In openvswitch.sh line 711: [ $(python3 $ovs_base/ovs-dpctl.py show nv0 | grep port | \ ^-- SC2046 (warning): Quote this to prevent word splitting. ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-------^ SC2126 (style): Consider using 'grep -c' instead of 'grep|wc -l'. Did you mean: [ $(python3 "$ovs_base"/ovs-dpctl.py show nv0 | grep port | \ In openvswitch.sh line 750: ovs_wait grep -q "listening on upcall packet handler" ${ovs_dir}/left0.out ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_wait grep -q "listening on upcall packet handler" "${ovs_dir}"/left0.out In openvswitch.sh line 754: >$ovs_dir/arping.stdout 2>$ovs_dir/arping.stderr ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: >"$ovs_dir"/arping.stdout 2>"$ovs_dir"/arping.stderr In openvswitch.sh line 756: grep -E "MISS upcall\[0/yes\]: .*arp\(sip=172.31.110.1,tip=172.31.110.20,op=1,sha=" $ovs_dir/left0.out >/dev/null 2>&1 || return 1 ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: grep -E "MISS upcall\[0/yes\]: .*arp\(sip=172.31.110.1,tip=172.31.110.20,op=1,sha=" "$ovs_dir"/left0.out >/dev/null 2>&1 || return 1 In openvswitch.sh line 768: ovs_sbx "${sbxname}" ip -netns ${ns} link add dev ${name} type ${tnl_type} $* || return 1 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2048 (warning): Use "$@" (with quotes) to prevent whitespace problems. ^-- SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_sbx "${sbxname}" ip -netns "${ns}" link add dev "${name}" type "${tnl_type}" "$*" || return 1 In openvswitch.sh line 770: ovs_sbx "${sbxname}" ip -netns ${ns} addr add dev ${name} ${addr} || return 1 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_sbx "${sbxname}" ip -netns "${ns}" addr add dev "${name}" "${addr}" || return 1 In openvswitch.sh line 771: ovs_sbx "${sbxname}" ip -netns ${ns} link set dev ${name} mtu 1450 up || return 1 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_sbx "${sbxname}" ip -netns "${ns}" link set dev "${name}" mtu 1450 up || return 1 In openvswitch.sh line 775: which arping >/dev/null 2>&1 || return $ksft_skip ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: which arping >/dev/null 2>&1 || return "$ksft_skip" In openvswitch.sh line 804: ovs_add_kernel_tunnel "${sbxname}" tns vxlan vxlan${i} ${addr} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ovs_add_kernel_tunnel "${sbxname}" tns vxlan vxlan"${i}" "${addr}" \ In openvswitch.sh line 805: remote 172.31.110.2 id ${id} dstport 4789 \ ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: remote 172.31.110.2 id "${id}" dstport 4789 \ In openvswitch.sh line 806: ttl ${ttl} df ${df} ${csum} || return 1 ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ttl "${ttl}" df "${df}" "${csum}" || return 1 In openvswitch.sh line 810: ${ovs_dir}/ovs-vxlan0.out || return 1 ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${ovs_dir}"/ovs-vxlan0.out || return 1 In openvswitch.sh line 815: arping -I vxlan${i} 172.31.22${i}.2 -c 1 \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: arping -I vxlan"${i}" 172.31.22"${i}".2 -c 1 \ In openvswitch.sh line 816: >${ovs_dir}/arping.stdout 2>${ovs_dir}/arping.stderr ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: >"${ovs_dir}"/arping.stdout 2>"${ovs_dir}"/arping.stderr In openvswitch.sh line 827: ${ovs_dir}/ovs-vxlan0.out || return 1 ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${ovs_dir}"/ovs-vxlan0.out || return 1 In openvswitch.sh line 856: eval test_${tname} ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: eval test_"${tname}" In openvswitch.sh line 868: read a ^--^ SC2162 (info): read without -r will mangle backslashes. ^-- SC2034 (warning): a appears unused. Verify use (or export if used externally). In openvswitch.sh line 876: rm -rf test_${tname} ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm -rf test_"${tname}" In openvswitch.sh line 885: [ $all_skipped = true ] && [ $exitcode=$ksft_skip ] && exitcode=0 ^-- SC2077 (error): You need spaces around the comparison operator. In openvswitch.sh line 888: $ksft_skip) ^--------^ SC2254 (warning): Quote expansions in case patterns to match literally rather than as a glob. In openvswitch.sh line 919: shift $(($OPTIND-1)) ^-----^ SC2004 (style): $/${} is unnecessary on arithmetic variables. For more information: https://www.shellcheck.net/wiki/SC2068 -- Double quote array expansions to ... https://www.shellcheck.net/wiki/SC2077 -- You need spaces around the compar... https://www.shellcheck.net/wiki/SC2145 -- Argument mixes string and array. ...