ShellCheck - shell script analysis tool version: 0.11.0 license: GNU General Public License, version 3 website: https://www.shellcheck.net Redirect to /tmp/tmp.mhNLIPByD2 and /tmp/tmp.GG0dOnlYcI Tree base: f40ddcc0c0ca ("Revert "nfc/nci: Add the inconsistency check between the input data length and count"") Now at: 03f0ca124bbc ("selftests: net: amt: wait longer for connection before sending packets") ====== Checking before the patch ====== Checking tools/testing/selftests/net/amt.sh - d3851748df781e9b1d47393736f70f71071c94bb89b088f962d33658bb7a1241 In amt.sh line 76: readonly LISTENER=$(mktemp -u listener-XXXXXXXX) ^------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In amt.sh line 77: readonly GATEWAY=$(mktemp -u gateway-XXXXXXXX) ^-----^ SC2155 (warning): Declare and assign separately to avoid masking return values. In amt.sh line 78: readonly RELAY=$(mktemp -u relay-XXXXXXXX) ^---^ SC2155 (warning): Declare and assign separately to avoid masking return values. In amt.sh line 79: readonly SOURCE=$(mktemp -u source-XXXXXXXX) ^----^ SC2155 (warning): Declare and assign separately to avoid masking return values. In amt.sh line 80: readonly SMCROUTEDIR="$(mktemp -d)" ^---------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In amt.sh line 90: smcpid=$(< $SMCROUTEDIR/amt.pid) ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: smcpid=$(< "$SMCROUTEDIR"/amt.pid) In amt.sh line 91: kill $smcpid ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: kill "$smcpid" In amt.sh line 93: rm -rf $SMCROUTEDIR ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm -rf "$SMCROUTEDIR" In amt.sh line 176: ip netns exec "${RELAY}" smcrouted -P $SMCROUTEDIR/amt.pid ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${RELAY}" smcrouted -P "$SMCROUTEDIR"/amt.pid In amt.sh line 187: if [ $REMOTE == "\"10.0.0.2\"" ]; then ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$REMOTE" == "\"10.0.0.2\"" ]; then In amt.sh line 197: for i in `seq 10`; do ^------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`. Did you mean: for i in $(seq 10); do In amt.sh line 207: for i in `seq 10`; do ^-^ SC2034 (warning): i appears unused. Verify use (or export if used externally). ^------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`. Did you mean: for i in $(seq 10); do In amt.sh line 217: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. For more information: https://www.shellcheck.net/wiki/SC2034 -- i appears unused. Verify use (or ... https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ... https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... ====== Checking the tree with the patch ====== Checking tools/testing/selftests/net/amt.sh - d3851748df781e9b1d47393736f70f71071c94bb89b088f962d33658bb7a1241 In amt.sh line 76: readonly LISTENER=$(mktemp -u listener-XXXXXXXX) ^------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In amt.sh line 77: readonly GATEWAY=$(mktemp -u gateway-XXXXXXXX) ^-----^ SC2155 (warning): Declare and assign separately to avoid masking return values. In amt.sh line 78: readonly RELAY=$(mktemp -u relay-XXXXXXXX) ^---^ SC2155 (warning): Declare and assign separately to avoid masking return values. In amt.sh line 79: readonly SOURCE=$(mktemp -u source-XXXXXXXX) ^----^ SC2155 (warning): Declare and assign separately to avoid masking return values. In amt.sh line 80: readonly SMCROUTEDIR="$(mktemp -d)" ^---------^ SC2155 (warning): Declare and assign separately to avoid masking return values. In amt.sh line 90: smcpid=$(< $SMCROUTEDIR/amt.pid) ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: smcpid=$(< "$SMCROUTEDIR"/amt.pid) In amt.sh line 91: kill $smcpid ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: kill "$smcpid" In amt.sh line 93: rm -rf $SMCROUTEDIR ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm -rf "$SMCROUTEDIR" In amt.sh line 176: ip netns exec "${RELAY}" smcrouted -P $SMCROUTEDIR/amt.pid ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${RELAY}" smcrouted -P "$SMCROUTEDIR"/amt.pid In amt.sh line 187: if [ $REMOTE == "\"10.0.0.2\"" ]; then ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "$REMOTE" == "\"10.0.0.2\"" ]; then In amt.sh line 197: for i in `seq 10`; do ^------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`. Did you mean: for i in $(seq 10); do In amt.sh line 207: for i in `seq 10`; do ^-^ SC2034 (warning): i appears unused. Verify use (or export if used externally). ^------^ SC2006 (style): Use $(...) notation instead of legacy backticks `...`. Did you mean: for i in $(seq 10); do In amt.sh line 217: if [ $? -ne 0 ]; then ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?. For more information: https://www.shellcheck.net/wiki/SC2034 -- i appears unused. Verify use (or ... https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ... https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...