[tor-commits] [tor/master] test: a file with no config options, at the end of an %include directory

nickm at torproject.org nickm at torproject.org
Wed Sep 25 17:14:38 UTC 2019


commit 83fa962c1af086a72c0a0ef1a9df12032e9a73ac
Author: teor <teor at torproject.org>
Date:   Mon Sep 23 12:29:25 2019 +1000

    test: a file with no config options, at the end of an %include directory
    
    (The file must contain whitespace or comments to trigger the bug.)
    
    Regression test for 31408.
---
 src/test/conf_examples/include_bug_31408/expected                   | 2 ++
 src/test/conf_examples/include_bug_31408/included/01_nickname.inc   | 1 +
 src/test/conf_examples/include_bug_31408/included/02_no_configs.inc | 3 +++
 src/test/conf_examples/include_bug_31408/torrc                      | 2 ++
 4 files changed, 8 insertions(+)

diff --git a/src/test/conf_examples/include_bug_31408/expected b/src/test/conf_examples/include_bug_31408/expected
new file mode 100644
index 000000000..2e822f1a7
--- /dev/null
+++ b/src/test/conf_examples/include_bug_31408/expected
@@ -0,0 +1,2 @@
+Nickname test31408
+ORPort 31408
diff --git a/src/test/conf_examples/include_bug_31408/included/01_nickname.inc b/src/test/conf_examples/include_bug_31408/included/01_nickname.inc
new file mode 100644
index 000000000..508dd89a3
--- /dev/null
+++ b/src/test/conf_examples/include_bug_31408/included/01_nickname.inc
@@ -0,0 +1 @@
+Nickname test31408
diff --git a/src/test/conf_examples/include_bug_31408/included/02_no_configs.inc b/src/test/conf_examples/include_bug_31408/included/02_no_configs.inc
new file mode 100644
index 000000000..140e927f1
--- /dev/null
+++ b/src/test/conf_examples/include_bug_31408/included/02_no_configs.inc
@@ -0,0 +1,3 @@
+# Bug 31048 is triggered when the last file in a config directory:
+#   * contains no configuration options,
+#   * but is non-empty: that is, it contains comments or whitespace.
diff --git a/src/test/conf_examples/include_bug_31408/torrc b/src/test/conf_examples/include_bug_31408/torrc
new file mode 100644
index 000000000..a42685e93
--- /dev/null
+++ b/src/test/conf_examples/include_bug_31408/torrc
@@ -0,0 +1,2 @@
+%include "included"
+ORPort 31408





More information about the tor-commits mailing list