@@ -39,6 +39,7 @@ local_tcp_port() {
3939
4040# import all the backends
4141for backend in backends/* .sh; do
42+ # shellcheck disable=SC1090
4243 . " ${backend} "
4344done
4445
@@ -50,6 +51,8 @@ spawn_lxd() {
5051 set +x
5152 # LXD_DIR is local here because since $(lxc) is actually a function, it
5253 # overwrites the environment and we would lose LXD_DIR's value otherwise.
54+
55+ # shellcheck disable=2039
5356 local LXD_DIR
5457
5558 lxddir=${1}
@@ -192,7 +195,10 @@ check_empty_table() {
192195kill_lxd () {
193196 # LXD_DIR is local here because since $(lxc) is actually a function, it
194197 # overwrites the environment and we would lose LXD_DIR's value otherwise.
198+
199+ # shellcheck disable=2039
195200 local LXD_DIR
201+
196202 daemon_dir=${1}
197203 LXD_DIR=${daemon_dir}
198204 daemon_pid=$( cat " ${daemon_dir} /lxd.pid" )
@@ -279,13 +285,13 @@ cleanup() {
279285 echo " Tests Completed (${TEST_RESULT} ): hit enter to continue"
280286
281287 # shellcheck disable=SC2034
282- read nothing
288+ read -r nothing
283289 fi
284290
285291 echo " ==> Cleaning up"
286292
287293 # Kill all the LXD instances
288- while read daemon_dir; do
294+ while read -r daemon_dir; do
289295 kill_lxd " ${daemon_dir} "
290296 done < " ${TEST_DIR} /daemons"
291297
@@ -309,12 +315,12 @@ wipe() {
309315 fi
310316
311317 # shellcheck disable=SC2009
312- ps aux | grep lxc-monitord | grep " ${1} " | awk ' {print $2}' | while read pid; do
318+ ps aux | grep lxc-monitord | grep " ${1} " | awk ' {print $2}' | while read -r pid; do
313319 kill -9 " ${pid} "
314320 done
315321
316322 if [ -f " ${TEST_DIR} /loops" ]; then
317- while read line; do
323+ while read -r line; do
318324 losetup -d " ${line} " || true
319325 done < " ${TEST_DIR} /loops"
320326 fi
@@ -333,6 +339,7 @@ trap cleanup EXIT HUP INT TERM
333339
334340# Import all the testsuites
335341for suite in suites/* .sh; do
342+ # shellcheck disable=SC1090
336343 . " ${suite} "
337344done
338345
0 commit comments