summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAnders Roxell <anders.roxell@linaro.org>2019-08-15 10:58:26 +0300
committerDavid S. Miller <davem@davemloft.net>2019-08-15 21:34:32 +0300
commit2aafdf5a5786ebbd8ccfe132ed6267c6962c5c3c (patch)
treedcfe3f51920f1125b43a536a0537fae0c7757e09 /tools
parentc554336efa9bbc28d6ec14efbee3c7d63c61a34f (diff)
downloadlinux-2aafdf5a5786ebbd8ccfe132ed6267c6962c5c3c.tar.xz
selftests: net: tcp_fastopen_backup_key.sh: fix shellcheck issue
When running tcp_fastopen_backup_key.sh the following issue was seen in a busybox environment. ./tcp_fastopen_backup_key.sh: line 33: [: -ne: unary operator expected Shellcheck showed the following issue. $ shellcheck tools/testing/selftests/net/tcp_fastopen_backup_key.sh In tools/testing/selftests/net/tcp_fastopen_backup_key.sh line 33: if [ $val -ne 0 ]; then ^-- SC2086: Double quote to prevent globbing and word splitting. Rework to do a string comparison instead. Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/selftests/net/tcp_fastopen_backup_key.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/tcp_fastopen_backup_key.sh b/tools/testing/selftests/net/tcp_fastopen_backup_key.sh
index 41476399e184..f6e65674b83c 100755
--- a/tools/testing/selftests/net/tcp_fastopen_backup_key.sh
+++ b/tools/testing/selftests/net/tcp_fastopen_backup_key.sh
@@ -30,7 +30,7 @@ do_test() {
ip netns exec "${NETNS}" ./tcp_fastopen_backup_key "$1"
val=$(ip netns exec "${NETNS}" nstat -az | \
grep TcpExtTCPFastOpenPassiveFail | awk '{print $2}')
- if [ $val -ne 0 ]; then
+ if [ "$val" != 0 ]; then
echo "FAIL: TcpExtTCPFastOpenPassiveFail non-zero"
return 1
fi