aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2023-01-10 09:11:52 -0500
committerDavid Goulet <dgoulet@torproject.org>2023-01-10 09:11:58 -0500
commitd456885dac3b5bdfff663ed502fd11f9e0d0e070 (patch)
treeabb52752aabb51416d838f72199bd24247833cfe /src/test
parent1d9166c8c915c14f67612ace8a9449aa3049c2f9 (diff)
downloadtor-d456885dac3b5bdfff663ed502fd11f9e0d0e070.tar.gz
tor-d456885dac3b5bdfff663ed502fd11f9e0d0e070.zip
shellcheck: Fix new warnings
Nothing important, mostly false positive except one case. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/test')
-rwxr-xr-xsrc/test/test_include.sh3
-rwxr-xr-xsrc/test/test_rebind.sh3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/test/test_include.sh b/src/test/test_include.sh
index 6cf695fe44..10d3bc502d 100755
--- a/src/test/test_include.sh
+++ b/src/test/test_include.sh
@@ -48,6 +48,9 @@ if "${TOR_BINARY}" --list-modules | grep -q "relay: no"; then
fi
tmpdir=
+# For some reasons, shellcheck is not seeing that we can call this
+# function from the trap below.
+# shellcheck disable=SC2317
clean () {
if [ -n "$tmpdir" ] && [ -d "$tmpdir" ]; then
rm -rf "$tmpdir"
diff --git a/src/test/test_rebind.sh b/src/test/test_rebind.sh
index 879008c1c1..aae2a9a6a0 100755
--- a/src/test/test_rebind.sh
+++ b/src/test/test_rebind.sh
@@ -46,6 +46,9 @@ if "${TOR_BINARY}" --list-modules | grep -q "relay: no"; then
fi
tmpdir=
+# For some reasons, shellcheck is not seeing that we can call this
+# function from the trap below.
+# shellcheck disable=SC2317
clean () {
if [ -n "$tmpdir" ] && [ -d "$tmpdir" ]; then
rm -rf "$tmpdir"