@@ -39,6 +39,7 @@ local_tcp_port() {
39
39
40
40
# import all the backends
41
41
for backend in backends/* .sh; do
42
+ # shellcheck disable=SC1090
42
43
. " ${backend} "
43
44
done
44
45
@@ -50,6 +51,8 @@ spawn_lxd() {
50
51
set +x
51
52
# LXD_DIR is local here because since $(lxc) is actually a function, it
52
53
# overwrites the environment and we would lose LXD_DIR's value otherwise.
54
+
55
+ # shellcheck disable=2039
53
56
local LXD_DIR
54
57
55
58
lxddir=${1}
@@ -192,7 +195,10 @@ check_empty_table() {
192
195
kill_lxd () {
193
196
# LXD_DIR is local here because since $(lxc) is actually a function, it
194
197
# overwrites the environment and we would lose LXD_DIR's value otherwise.
198
+
199
+ # shellcheck disable=2039
195
200
local LXD_DIR
201
+
196
202
daemon_dir=${1}
197
203
LXD_DIR=${daemon_dir}
198
204
daemon_pid=$( cat " ${daemon_dir} /lxd.pid" )
@@ -279,13 +285,13 @@ cleanup() {
279
285
echo " Tests Completed (${TEST_RESULT} ): hit enter to continue"
280
286
281
287
# shellcheck disable=SC2034
282
- read nothing
288
+ read -r nothing
283
289
fi
284
290
285
291
echo " ==> Cleaning up"
286
292
287
293
# Kill all the LXD instances
288
- while read daemon_dir; do
294
+ while read -r daemon_dir; do
289
295
kill_lxd " ${daemon_dir} "
290
296
done < " ${TEST_DIR} /daemons"
291
297
@@ -309,12 +315,12 @@ wipe() {
309
315
fi
310
316
311
317
# 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
313
319
kill -9 " ${pid} "
314
320
done
315
321
316
322
if [ -f " ${TEST_DIR} /loops" ]; then
317
- while read line; do
323
+ while read -r line; do
318
324
losetup -d " ${line} " || true
319
325
done < " ${TEST_DIR} /loops"
320
326
fi
@@ -333,6 +339,7 @@ trap cleanup EXIT HUP INT TERM
333
339
334
340
# Import all the testsuites
335
341
for suite in suites/* .sh; do
342
+ # shellcheck disable=SC1090
336
343
. " ${suite} "
337
344
done
338
345
0 commit comments