am 0b10ffb4: Merge "Fix dlsym_failure NULL handle test"
* commit '0b10ffb40f3b426a7b5e734f90c41f56351729a0': Fix dlsym_failure NULL handle test
This commit is contained in:
commit
88923ba4d8
@ -101,17 +101,13 @@ TEST(dlfcn, dlsym_failures) {
|
|||||||
|
|
||||||
void* sym;
|
void* sym;
|
||||||
|
|
||||||
// lp64 RTLD_DEFAULT=(void*)0
|
#if defined(__BIONIC__) && !defined(__LP64__)
|
||||||
#if !defined(__LP64__)
|
// RTLD_DEFAULT in lp32 bionic is not (void*)0
|
||||||
// NULL handle.
|
// so it can be distinguished from the NULL handle.
|
||||||
sym = dlsym(NULL, "test");
|
sym = dlsym(NULL, "test");
|
||||||
ASSERT_TRUE(sym == NULL);
|
ASSERT_TRUE(sym == NULL);
|
||||||
#if defined(__BIONIC__)
|
|
||||||
ASSERT_SUBSTR("dlsym library handle is null", dlerror());
|
ASSERT_SUBSTR("dlsym library handle is null", dlerror());
|
||||||
#else
|
|
||||||
ASSERT_SUBSTR("undefined symbol: test", dlerror()); // glibc isn't specific about the failure.
|
|
||||||
#endif
|
#endif
|
||||||
#endif // !defined(__LP64__)
|
|
||||||
|
|
||||||
// NULL symbol name.
|
// NULL symbol name.
|
||||||
#if defined(__BIONIC__)
|
#if defined(__BIONIC__)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user