commit | 11dc4cda238641c08cf7a7734f5ea9fcd0a4cd9b | [log] [tgz] |
---|---|---|
author | Elliott Hughes <[email protected]> | Wed Mar 20 16:36:06 2024 -0700 |
committer | Elliott Hughes <[email protected]> | Wed Mar 20 16:36:06 2024 -0700 |
tree | 17db20b4f98ef20788923149f401b0672fafa6ce | |
parent | e67b391d8956a07ec0944e3b105ffeb747d08b64 [diff] |
emutls-key-deletion: check that dlopen() succeeded. Test: treehugger Change-Id: I09859903d7ed79b9380ff2eca844608e7fe254be
diff --git a/tests/device/emutls-key-deletion/jni/dlclose_main.cpp b/tests/device/emutls-key-deletion/jni/dlclose_main.cpp index 8cc87d4..1256a84 100644 --- a/tests/device/emutls-key-deletion/jni/dlclose_main.cpp +++ b/tests/device/emutls-key-deletion/jni/dlclose_main.cpp
@@ -12,6 +12,10 @@ int main() { std::thread([] { void* solib = dlopen("libndktest.so", RTLD_NOW); + if (!solib) { + fprintf(stderr, "can't find libndktest.so (%s)\n", dlerror()); + abort(); + } void (*test_func)() = (void(*)())dlsym(solib, "test_func"); if (!test_func) { fprintf(stderr, "can't find test_func func (%s)\n", dlerror());