[tor-commits] [tor/master] test_bt.sh: Check stderr for backtrace as well as stdout.

nickm at torproject.org nickm at torproject.org
Mon May 2 16:59:40 UTC 2016


commit b72aa18d73869563e88b85930408781495deed2c
Author: Nick Mathewson <nickm at torproject.org>
Date:   Mon May 2 12:58:58 2016 -0400

    test_bt.sh: Check stderr for backtrace as well as stdout.
    
    addresssanitizer likes to put backtraces on stderr.
---
 changes/bug18934    | 3 +++
 src/test/test_bt.sh | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/changes/bug18934 b/changes/bug18934
new file mode 100644
index 0000000..fba703e
--- /dev/null
+++ b/changes/bug18934
@@ -0,0 +1,3 @@
+  o Minor features (testing):
+    - Let backtrace tests work correctly under AddressSanitizer.
+      Fixes part of bug 18934.
diff --git a/src/test/test_bt.sh b/src/test/test_bt.sh
index 033acac..83fa3ff 100755
--- a/src/test/test_bt.sh
+++ b/src/test/test_bt.sh
@@ -4,7 +4,7 @@
 exitcode=0
 
 "${builddir:-.}/src/test/test-bt-cl" backtraces || exit $?
-"${builddir:-.}/src/test/test-bt-cl" assert | "${PYTHON:-python}" "${abs_top_srcdir:-.}/src/test/bt_test.py" || exitcode="$?"
-"${builddir:-.}/src/test/test-bt-cl" crash  | "${PYTHON:-python}" "${abs_top_srcdir:-.}/src/test/bt_test.py" || exitcode="$?"
+"${builddir:-.}/src/test/test-bt-cl" assert 2>&1 | "${PYTHON:-python}" "${abs_top_srcdir:-.}/src/test/bt_test.py" || exitcode="$?"
+"${builddir:-.}/src/test/test-bt-cl" crash  2>&1 | "${PYTHON:-python}" "${abs_top_srcdir:-.}/src/test/bt_test.py" || exitcode="$?"
 
 exit ${exitcode}



More information about the tor-commits mailing list