Adar Dembo has submitted this change and it was merged.

Change subject: Fix block_manager-test running in some builds

Fix block_manager-test running in some builds

Even though the patch for KUDU-1538 passed pre-commit, it failed in the RELEASE
builds post-commit.

The issue appears to be that my trickery with weak symbols only worked in
some cases, depending on the link order, for dynamically linked builds,
since weak symbols are actually only relevant for statically linked ones.
Apparently in the precommit build, the link order was such that the gtest
detection did not work on block_manager-test, and thus things were fine.
But, in the release static build post-commit, the gtest detection worked,
and it broke the test in question.

This patch changes the gtest detection to use dlsym() instead of a weak symbol.
It appears to work more reliably in all types of builds. This also fixes the
test to properly manipulate the block ID sequence in the test that was failing.

Change-Id: I1a4025a3d859b139b74be997706bd27d0ba7b292
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <>
M CMakeLists.txt
M src/kudu/fs/
M src/kudu/fs/
M src/kudu/util/CMakeLists.txt
M src/kudu/util/
A src/kudu/util/
A src/kudu/util/test_util_prod.h
7 files changed, 81 insertions(+), 8 deletions(-)

  Adar Dembo: Looks good to me, approved
  Kudu Jenkins: Verified

To view, visit
To unsubscribe, visit

Gerrit-MessageType: merged
Gerrit-Change-Id: I1a4025a3d859b139b74be997706bd27d0ba7b292
Gerrit-PatchSet: 5
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <>
Gerrit-Reviewer: Adar Dembo <>
Gerrit-Reviewer: Dan Burkert <>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <>

Reply via email to