diff options
-rw-r--r-- | changes/bug28562 | 5 | ||||
-rw-r--r-- | changes/ticket28731 | 4 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | contrib/win32build/tor-mingw.nsi.in | 2 | ||||
-rw-r--r-- | src/feature/control/control.c | 6 | ||||
-rw-r--r-- | src/test/test_rebind.py | 10 | ||||
-rwxr-xr-x | src/test/test_rebind.sh | 15 | ||||
-rw-r--r-- | src/win32/orconfig.h | 2 |
8 files changed, 32 insertions, 14 deletions
diff --git a/changes/bug28562 b/changes/bug28562 new file mode 100644 index 0000000000..e14362164d --- /dev/null +++ b/changes/bug28562 @@ -0,0 +1,5 @@ + o Minor bugfixes (testing): + - Use a separate DataDirectory for the test_rebind script. + Previously, this script would run using the default DataDirectory, + and sometimes fail. Fixes bug 28562; bugfix on 0.3.5.1-alpha. + Patch from Taylor R Campbell. diff --git a/changes/ticket28731 b/changes/ticket28731 deleted file mode 100644 index f8b116cc12..0000000000 --- a/changes/ticket28731 +++ /dev/null @@ -1,4 +0,0 @@ - o Minor features (bootstrap): - - Add the bootstrap tag name to the log messages, so people - troubleshooting connection problems can look up a symbol instead - of a number. Closes ticket 28731. diff --git a/configure.ac b/configure.ac index c0d58c4faa..1d4c31f86b 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ dnl Copyright (c) 2007-2018, The Tor Project, Inc. dnl See LICENSE for licensing information AC_PREREQ([2.63]) -AC_INIT([tor],[0.3.5.5-alpha-dev]) +AC_INIT([tor],[0.3.5.6-rc-dev]) AC_CONFIG_SRCDIR([src/app/main/tor_main.c]) AC_CONFIG_MACRO_DIR([m4]) diff --git a/contrib/win32build/tor-mingw.nsi.in b/contrib/win32build/tor-mingw.nsi.in index 99685598fa..d64808e191 100644 --- a/contrib/win32build/tor-mingw.nsi.in +++ b/contrib/win32build/tor-mingw.nsi.in @@ -8,7 +8,7 @@ !include "LogicLib.nsh" !include "FileFunc.nsh" !insertmacro GetParameters -!define VERSION "0.3.5.5-alpha-dev" +!define VERSION "0.3.5.6-rc-dev" !define INSTALLER "tor-${VERSION}-win32.exe" !define WEBSITE "https://www.torproject.org/" !define LICENSE "LICENSE" diff --git a/src/feature/control/control.c b/src/feature/control/control.c index 8208b80c23..795902e6f4 100644 --- a/src/feature/control/control.c +++ b/src/feature/control/control.c @@ -7153,7 +7153,7 @@ control_event_bootstrap_core(int loglevel, bootstrap_status_t status, status = progress; tor_log(loglevel, LD_CONTROL, - "Bootstrapped %d%% (%s): %s", status, tag, summary); + "Bootstrapped %d%%: %s", status, summary); tor_snprintf(buf, sizeof(buf), "BOOTSTRAP PROGRESS=%d TAG=%s SUMMARY=\"%s\"", status, tag, summary); @@ -7309,9 +7309,9 @@ control_event_bootstrap_problem(const char *warn, const char *reason, hostaddr = tor_strdup("?"); log_fn(severity, - LD_CONTROL, "Problem bootstrapping. Stuck at %d%% (%s): %s. (%s; %s; " + LD_CONTROL, "Problem bootstrapping. Stuck at %d%%: %s. (%s; %s; " "count %d; recommendation %s; host %s at %s)", - status, tag, summary, warn, reason, + status, summary, warn, reason, bootstrap_problems, recommendation, or_id, hostaddr); diff --git a/src/test/test_rebind.py b/src/test/test_rebind.py index 2215b42253..6f759b717e 100644 --- a/src/test/test_rebind.py +++ b/src/test/test_rebind.py @@ -73,12 +73,19 @@ socks_port = pick_random_port() assert control_port != 0 assert socks_port != 0 +if len(sys.argv) < 3: + fail('Usage: %s <path-to-tor> <data-dir>' % sys.argv[0]) + if not os.path.exists(sys.argv[1]): fail('ERROR: cannot find tor at %s' % sys.argv[1]) +if not os.path.exists(sys.argv[2]): + fail('ERROR: cannot find datadir at %s' % sys.argv[2]) tor_path = sys.argv[1] +data_dir = sys.argv[2] tor_process = subprocess.Popen([tor_path, + '-DataDirectory', data_dir, '-ControlPort', '127.0.0.1:{}'.format(control_port), '-SOCKSPort', '127.0.0.1:{}'.format(socks_port), '-Log', 'debug stdout', @@ -90,9 +97,6 @@ tor_process = subprocess.Popen([tor_path, if tor_process == None: fail('ERROR: running tor failed') -if len(sys.argv) < 2: - fail('Usage: %s <path-to-tor>' % sys.argv[0]) - wait_for_log('Opened Control listener on') try_connecting_to_socksport() diff --git a/src/test/test_rebind.sh b/src/test/test_rebind.sh index 76eb9f2e4d..498072de35 100755 --- a/src/test/test_rebind.sh +++ b/src/test/test_rebind.sh @@ -14,6 +14,19 @@ fi exitcode=0 -"${PYTHON:-python}" "${abs_top_srcdir:-.}/src/test/test_rebind.py" "${TESTING_TOR_BINARY}" || exitcode=1 +tmpdir= +clean () { test -n "$tmpdir" && test -d "$tmpdir" && rm -rf "$tmpdir" || :; } +trap clean EXIT HUP INT TERM + +tmpdir="`mktemp -d -t tor_rebind_test.XXXXXX`" +if [ -z "$tmpdir" ]; then + echo >&2 mktemp failed + exit 2 +elif [ ! -d "$tmpdir" ]; then + echo >&2 mktemp failed to make a directory + exit 3 +fi + +"${PYTHON:-python}" "${abs_top_srcdir:-.}/src/test/test_rebind.py" "${TESTING_TOR_BINARY}" "$tmpdir" || exitcode=1 exit ${exitcode} diff --git a/src/win32/orconfig.h b/src/win32/orconfig.h index 94bcbbd4dc..4645d4a20f 100644 --- a/src/win32/orconfig.h +++ b/src/win32/orconfig.h @@ -218,7 +218,7 @@ #define USING_TWOS_COMPLEMENT /* Version number of package */ -#define VERSION "0.3.5.5-alpha-dev" +#define VERSION "0.3.5.6-rc-dev" |