diff --git a/autotest.sh b/autotest.sh index 34d2c855b..7bb775e36 100755 --- a/autotest.sh +++ b/autotest.sh @@ -79,7 +79,8 @@ if [ $(uname -s) = Linux ]; then # discover if it is OCSSD or not so load the kernel driver first. - for dev in $(find /dev -maxdepth 1 -regex '/dev/nvme[0-9]+'); do + while IFS= read -r -d '' dev + do # Send Open Channel 2.0 Geometry opcode "0xe2" - not supported by NVMe device. if nvme admin-passthru $dev --namespace-id=1 --data-len=4096 --opcode=0xe2 --read >/dev/null; then bdf="$(basename $(readlink -e /sys/class/nvme/${dev#/dev/}/device))" @@ -87,7 +88,7 @@ if [ $(uname -s) = Linux ]; then PCI_BLACKLIST+=" $bdf" OCSSD_PCI_DEVICES+=" $bdf" fi - done + done < <(find /dev -maxdepth 1 -regex '/dev/nvme[0-9]+' -print0) export OCSSD_PCI_DEVICES diff --git a/scripts/check_format.sh b/scripts/check_format.sh index f7ff0a0dc..351ec753f 100755 --- a/scripts/check_format.sh +++ b/scripts/check_format.sh @@ -243,7 +243,7 @@ if hash shellcheck 2>/dev/null; then SHCK_EXCLUDE="SC1001,SC1003,\ SC1083,SC1113,SC2001,SC2002,SC2003,SC2004,SC2005,\ SC2010,SC2012,SC2013,SC2016,\ -SC2034,SC2044,SC2045,SC2046,\ +SC2034,SC2045,SC2046,\ SC2068,SC2086,SC2089,SC2090,\ SC2097,SC2098,SC2103,SC2115,SC2116,SC2119,SC2120,SC2121,SC2124,SC2126,SC2128,\ SC2129,SC2140,SC2142,SC2143,SC2145,SC2146,SC2148,SC2152,SC2153,SC2154,SC2155,\ diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index b5067d2a8..a5fb347a7 100644 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -312,7 +312,8 @@ function report_test_completion() { function process_core() { ret=0 - for core in $(find . -type f \( -name 'core\.?[0-9]*' -o -name '*.core' \)); do + while IFS= read -r -d '' core; + do exe=$(eu-readelf -n "$core" | grep psargs | sed "s/.*psargs: \([^ \'\" ]*\).*/\1/") if [[ ! -f "$exe" ]]; then exe=$(eu-readelf -n "$core" | grep -oP -m1 "$exe.+") @@ -327,7 +328,7 @@ function process_core() { mv $core $output_dir chmod a+r $output_dir/$core ret=1 - done + done < <(find . -type f \( -name 'core\.?[0-9]*' -o -name '*.core' \) -print0) return $ret }