diff options
author | Colin Cross <ccross@android.com> | 2021-08-13 00:56:48 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-08-13 00:56:48 +0000 |
commit | a93cea05cf0f92a61715e9fd6c22a7e519e8cfbd (patch) | |
tree | 51db1cace0a75ac9e33aef1efb36e3f1d6832c67 /tests/elftls_dl_test.cpp | |
parent | 4c92da431155174c6bfef91c227fe34becb340c0 (diff) | |
parent | 7da20341e91a4ece30f628fb91fbc6056c9c8a7c (diff) | |
download | platform_bionic-a93cea05cf0f92a61715e9fd6c22a7e519e8cfbd.tar.gz platform_bionic-a93cea05cf0f92a61715e9fd6c22a7e519e8cfbd.tar.bz2 platform_bionic-a93cea05cf0f92a61715e9fd6c22a7e519e8cfbd.zip |
Merge "Build bionic unit tests for musl"
Diffstat (limited to 'tests/elftls_dl_test.cpp')
-rw-r--r-- | tests/elftls_dl_test.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/elftls_dl_test.cpp b/tests/elftls_dl_test.cpp index 277b2e3454..aa975de6f2 100644 --- a/tests/elftls_dl_test.cpp +++ b/tests/elftls_dl_test.cpp @@ -27,9 +27,11 @@ */ #include <dlfcn.h> -#include <gtest/gtest.h> #include <link.h> +#include <android-base/file.h> +#include <gtest/gtest.h> + #include <thread> #include "gtest_globals.h" @@ -356,7 +358,7 @@ TEST(elftls_dl, dl_iterate_phdr) { // This test is also run with glibc, where dlpi_name may have relative path components, so // examine just the basename when searching for the library. - if (strcmp(basename(info->dlpi_name), "libtest_elftls_dynamic.so") != 0) return 0; + if (strcmp(android::base::Basename(info->dlpi_name).c_str(), "libtest_elftls_dynamic.so") != 0) return 0; tls_info.found = true; tls_info.modid = info->dlpi_tls_modid; |