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 Reviewed-on: http://gerrit.cloudera.org:8080/3733 Tested-by: Kudu Jenkins Reviewed-by: Adar Dembo <a...@cloudera.com> --- M CMakeLists.txt M src/kudu/fs/block_manager-test.cc M src/kudu/fs/log_block_manager.cc M src/kudu/util/CMakeLists.txt M src/kudu/util/test_util.cc A src/kudu/util/test_util_prod.cc A src/kudu/util/test_util_prod.h 7 files changed, 81 insertions(+), 8 deletions(-) Approvals: Adar Dembo: Looks good to me, approved Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/3733 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1a4025a3d859b139b74be997706bd27d0ba7b292 Gerrit-PatchSet: 5 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Todd Lipcon <t...@apache.org> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Dan Burkert <d...@cloudera.com> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon <t...@apache.org>