Commit 79e56681 authored by Maciej Wawryk's avatar Maciej Wawryk Committed by Jim Harris
Browse files

test: Shellcheck - correct rule: Prefer [ p ] && [ q ]



Correct shellcheck rule SC2166: Prefer [ p ] && [ q ]
as [ p -a q ] is not well defined.

Signed-off-by: default avatarMaciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I3fb2fb0e790bbdd296b64673c301324632d7c37b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472173


Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent e82eef54
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -244,7 +244,7 @@ if hash shellcheck 2>/dev/null; then
SC2010,SC2012,SC2016,SC2034,SC2045,SC2046,SC2068,SC2086,SC2089,SC2090,\
SC2097,SC2098,SC2119,SC2120,SC2121,SC2124,SC2126,SC2128,\
SC2129,SC2140,SC2142,SC2143,SC2148,SC2152,SC2153,SC2154,SC2155,\
SC2162,SC2164,SC2165,SC2166"
SC2162,SC2164,SC2165"
	# SPDK fails some error checks which have been deprecated in later versions of shellcheck.
	# We will not try to fix these error checks, but instead just leave the error types here
	# so that we can still run with older versions of shellcheck.
+1 −1
Original line number Diff line number Diff line
@@ -561,7 +561,7 @@ function status_linux {
		fi
		device=$(cat /sys/bus/pci/devices/$bdf/device)
		vendor=$(cat /sys/bus/pci/devices/$bdf/vendor)
		if [ "$driver" = "nvme" -a -d /sys/bus/pci/devices/$bdf/nvme ]; then
		if [ "$driver" = "nvme" ] && [ -d /sys/bus/pci/devices/$bdf/nvme ]; then
			name="\t"$(ls /sys/bus/pci/devices/$bdf/nvme);
		else
			name="-";