summaryrefslogtreecommitdiff
path: root/src/test/test_zero_length_keys.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/test_zero_length_keys.sh')
-rwxr-xr-xsrc/test/test_zero_length_keys.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/test_zero_length_keys.sh b/src/test/test_zero_length_keys.sh
new file mode 100755
index 0000000000..5471cc9120
--- /dev/null
+++ b/src/test/test_zero_length_keys.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Check that tor regenerates keys when key files are zero-length
+
+exitcode=0
+
+${SHELL:-sh} "${abs_top_srcdir:-.}/src/test/zero_length_keys.sh" "${builddir:-.}/src/or/tor" -z || exitcode=1
+${SHELL:-sh} "${abs_top_srcdir:-.}/src/test/zero_length_keys.sh" "${builddir:-.}/src/or/tor" -d || exitcode=1
+${SHELL:-sh} "${abs_top_srcdir:-.}/src/test/zero_length_keys.sh" "${builddir:-.}/src/or/tor" -e || exitcode=1
+
+exit ${exitcode}