diff options
author | teor <teor@torproject.org> | 2019-11-14 10:59:15 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-11-14 11:57:50 +1000 |
commit | c7838c71fb3d023c8e255896118c59ed8af688eb (patch) | |
tree | 52458f72c9b4df1d9e5879158ee8c8bde6ad138e /src/test/conf_failures | |
parent | 51a6c0c8fd147a852a9567f1b1987b686bcc1800 (diff) | |
download | tor-c7838c71fb3d023c8e255896118c59ed8af688eb.tar.gz tor-c7838c71fb3d023c8e255896118c59ed8af688eb.zip |
test/parseconf: Add failure cases in conf_failures/
These failure cases can be used to test the failure behaviour
and failure logs of test_parseconf.sh.
See the README for details.
Part of 32451.
Diffstat (limited to 'src/test/conf_failures')
-rw-r--r-- | src/test/conf_failures/README | 5 | ||||
-rw-r--r-- | src/test/conf_failures/fail-error-success/error | 1 | ||||
-rw-r--r-- | src/test/conf_failures/fail-error-success/torrc | 0 | ||||
-rw-r--r-- | src/test/conf_failures/fail-error/error | 1 | ||||
-rw-r--r-- | src/test/conf_failures/fail-error/torrc | 1 | ||||
-rw-r--r-- | src/test/conf_failures/fail-expected-error/expected | 0 | ||||
-rw-r--r-- | src/test/conf_failures/fail-expected-error/torrc | 1 | ||||
-rw-r--r-- | src/test/conf_failures/fail-expected-log/expected | 0 | ||||
-rw-r--r-- | src/test/conf_failures/fail-expected-log/expected_log | 1 | ||||
-rw-r--r-- | src/test/conf_failures/fail-expected-log/torrc | 0 | ||||
-rw-r--r-- | src/test/conf_failures/fail-expected/expected | 1 | ||||
-rw-r--r-- | src/test/conf_failures/fail-expected/torrc | 0 |
12 files changed, 11 insertions, 0 deletions
diff --git a/src/test/conf_failures/README b/src/test/conf_failures/README new file mode 100644 index 0000000000..0da470eeb4 --- /dev/null +++ b/src/test/conf_failures/README @@ -0,0 +1,5 @@ +This directory contains typical test_parseconf.sh failure cases. + +If these directories are copied into conf_examples, test_parseconf.sh will +fail. Use these failure cases to make sure test_parseconf.sh handles failures +correctly, and produces useful output. diff --git a/src/test/conf_failures/fail-error-success/error b/src/test/conf_failures/fail-error-success/error new file mode 100644 index 0000000000..569a631e86 --- /dev/null +++ b/src/test/conf_failures/fail-error-success/error @@ -0,0 +1 @@ +Tor diff --git a/src/test/conf_failures/fail-error-success/torrc b/src/test/conf_failures/fail-error-success/torrc new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/src/test/conf_failures/fail-error-success/torrc diff --git a/src/test/conf_failures/fail-error/error b/src/test/conf_failures/fail-error/error new file mode 100644 index 0000000000..4c0be97832 --- /dev/null +++ b/src/test/conf_failures/fail-error/error @@ -0,0 +1 @@ +no match diff --git a/src/test/conf_failures/fail-error/torrc b/src/test/conf_failures/fail-error/torrc new file mode 100644 index 0000000000..bb6fe186a4 --- /dev/null +++ b/src/test/conf_failures/fail-error/torrc @@ -0,0 +1 @@ +bad bad bad diff --git a/src/test/conf_failures/fail-expected-error/expected b/src/test/conf_failures/fail-expected-error/expected new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/src/test/conf_failures/fail-expected-error/expected diff --git a/src/test/conf_failures/fail-expected-error/torrc b/src/test/conf_failures/fail-expected-error/torrc new file mode 100644 index 0000000000..bb6fe186a4 --- /dev/null +++ b/src/test/conf_failures/fail-expected-error/torrc @@ -0,0 +1 @@ +bad bad bad diff --git a/src/test/conf_failures/fail-expected-log/expected b/src/test/conf_failures/fail-expected-log/expected new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/src/test/conf_failures/fail-expected-log/expected diff --git a/src/test/conf_failures/fail-expected-log/expected_log b/src/test/conf_failures/fail-expected-log/expected_log new file mode 100644 index 0000000000..bb6fe186a4 --- /dev/null +++ b/src/test/conf_failures/fail-expected-log/expected_log @@ -0,0 +1 @@ +bad bad bad diff --git a/src/test/conf_failures/fail-expected-log/torrc b/src/test/conf_failures/fail-expected-log/torrc new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/src/test/conf_failures/fail-expected-log/torrc diff --git a/src/test/conf_failures/fail-expected/expected b/src/test/conf_failures/fail-expected/expected new file mode 100644 index 0000000000..67be85f127 --- /dev/null +++ b/src/test/conf_failures/fail-expected/expected @@ -0,0 +1 @@ +bad diff --git a/src/test/conf_failures/fail-expected/torrc b/src/test/conf_failures/fail-expected/torrc new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/src/test/conf_failures/fail-expected/torrc |