kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdcry...@apache.org
Subject [1/3] incubator-kudu git commit: Do not run (g)addr2line translator on MacOS X
Date Mon, 13 Jun 2016 19:39:37 GMT
Repository: incubator-kudu
Updated Branches:
  refs/heads/master 04dd0e97c -> 1ead68156

Do not run (g)addr2line translator on MacOS X

When running tests on MacOS X, omit using the
stacktrace_addr2line.pl utility to translate addresses to line numbers.
For current builds on MacOS X, neither (g)addr2line nor atos
translate stack address into line number without extra-hassle.
This is so even for binaries linked without PIE
(see the -no_pie linker's option).

As for the extra-hassle part: there are at least two ways
to address that, but neither looks like a good candidate
in the context of the script.

  Option A:
    Provide the atos utility with reference to running test process
    using '-p <pid>' option.  This, however, triggers a pop-up
    requesting for password if it's run the very first time.

  Option B:
    Take a snapshot of running test process using MacOS X tools
    and provide the atos utility with the load address
    using '-l <addr>' option.

Change-Id: Idf8a81ae7f2e1b938734a4b66bec82cb731d90cc
Reviewed-on: http://gerrit.cloudera.org:8080/3360
Tested-by: Kudu Jenkins
Reviewed-by: David Ribeiro Alves <dralves@apache.org>

Project: http://git-wip-us.apache.org/repos/asf/incubator-kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kudu/commit/3844042c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kudu/tree/3844042c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kudu/diff/3844042c

Branch: refs/heads/master
Commit: 3844042cfabcaed5532b3f383ac0ad533daaad6a
Parents: 04dd0e9
Author: Alexey Serbin <aserbin@cloudera.com>
Authored: Thu Jun 9 18:55:14 2016 -0700
Committer: David Ribeiro Alves <dralves@apache.org>
Committed: Fri Jun 10 21:05:28 2016 +0000

 build-support/run-test.sh | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/build-support/run-test.sh b/build-support/run-test.sh
index 946af40..d3c8f25 100755
--- a/build-support/run-test.sh
+++ b/build-support/run-test.sh
@@ -136,10 +136,22 @@ for ATTEMPT_NUMBER in $(seq 1 $TEST_EXECUTION_ATTEMPTS) ; do
   # even when retries are successful.
   rm -f $XMLFILE
+  if [[ $OSTYPE =~ ^darwin ]]; then
+    #
+    # For builds on MacOS X 10.11, neither (g)addr2line nor atos translates
+    # address into line number.  The atos utility is able to do that only
+    # if load address (-l <addr>) or reference to currently running process
+    # (-p <pid>) is given.  This is so even for binaries linked with
+    # PIE disabled.
+    #
+    addr2line_filter=cat
+  else
+    addr2line_filter="$SOURCE_ROOT/build-support/stacktrace_addr2line.pl $ABS_TEST_PATH"
+  fi
   echo "Running $TEST_NAME, redirecting output into $LOGFILE" \
   $ABS_TEST_PATH "$@" --test_timeout_after $KUDU_TEST_TIMEOUT 2>&1 \
-    | $SOURCE_ROOT/build-support/stacktrace_addr2line.pl $ABS_TEST_PATH \
+    | $addr2line_filter \
     | $pipe_cmd > $LOGFILE

View raw message