Lines Matching refs:fn
202 int (*fn)(void); in TEST() local
203 fn = reinterpret_cast<int (*)(void)>(sym); in TEST()
204 EXPECT_EQ(4, fn()); in TEST()
377 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "relo_test_get_answer")); in TEST() local
378 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
379 ASSERT_EQ(1, fn()); in TEST()
411 fn_t fn, fn2; in TEST() local
412 fn = reinterpret_cast<fn_t>(dlsym(RTLD_DEFAULT, "check_order_dlsym_get_answer")); in TEST()
413 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
417 ASSERT_EQ(42, fn()); in TEST()
464 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "check_order_reloc_get_answer")); in TEST() local
465 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
466 ASSERT_EQ(42, fn()); in TEST()
491 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "check_order_reloc_get_answer")); in TEST() local
492 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
493 ASSERT_EQ(42, fn()); in TEST()
529 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "check_order_reloc_grandchild_get_answer")); in TEST() local
530 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
531 ASSERT_EQ(42, fn()); in TEST()
575 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "check_order_reloc_nephew_get_answer")); in TEST() local
576 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
577 ASSERT_EQ(42, fn()); in TEST()
602 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle2, "check_order_reloc_get_answer")); in TEST() local
603 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
604 ASSERT_EQ(42, fn()); in TEST()
612 fn = reinterpret_cast<fn_t>(dlsym(handle2, "check_order_reloc_get_answer")); in TEST()
613 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
614 ASSERT_EQ(42, fn()); in TEST()
650 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "check_order_reloc_root_get_answer")); in TEST() local
651 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
652 ASSERT_EQ(42, fn()); in TEST()
1042 int (*fn)(void); in TEST() local
1043 fn = reinterpret_cast<int (*)(void)>(sym); in TEST()
1044 EXPECT_EQ(4, fn()); in TEST()
1047 ASSERT_TRUE(0 != dladdr(reinterpret_cast<void*>(fn), &dlinfo)); in TEST()
1049 ASSERT_TRUE(fn == dlinfo.dli_saddr); in TEST()
1060 int (*fn)(void); in TEST() local
1061 fn = reinterpret_cast<int (*)(void)>(sym); in TEST()
1062 EXPECT_EQ(4, fn()); in TEST()
1065 ASSERT_TRUE(0 != dladdr(reinterpret_cast<void*>(fn), &dlinfo)); in TEST()
1067 ASSERT_TRUE(fn == dlinfo.dli_saddr); in TEST()
1209 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "get_function_version")); in TEST() local
1210 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1211 ASSERT_EQ(1, fn()); in TEST()
1219 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "get_function_version")); in TEST() local
1220 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1221 ASSERT_EQ(2, fn()); in TEST()
1229 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "get_function_version")); in TEST() local
1230 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1231 ASSERT_EQ(20, fn()); in TEST()
1239 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "get_function_version")); in TEST() local
1240 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1241 ASSERT_EQ(3, fn()); in TEST()
1249 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "versioned_function")); in TEST() local
1250 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1251 ASSERT_EQ(3, fn()); // the default version is 3 in TEST()
1262 fn_t fn = reinterpret_cast<fn_t>(dlvsym(handle, "versioned_function", "nonversion")); in TEST() local
1263 ASSERT_TRUE(fn == nullptr); in TEST()
1268 fn_t fn = reinterpret_cast<fn_t>(dlvsym(handle, "versioned_function", "TESTLIB_V2")); in TEST() local
1269 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1270 ASSERT_EQ(2, fn()); in TEST()
1294 dlopen_b_fn fn = (dlopen_b_fn)dlsym(handle, "dlopen_b"); in TEST() local
1295 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1297 void *p = fn(); in TEST()
1309 dlopen_b_fn fn = (dlopen_b_fn)dlsym(handle, "dlopen_b"); in TEST() local
1310 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1312 void *p = fn(); in TEST()
1323 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "init_thread_local_variable")); in test_dlclose_after_thread_local_dtor() local
1324 ASSERT_TRUE(fn != nullptr) << dlerror(); in test_dlclose_after_thread_local_dtor()
1326 fn(is_dtor_triggered); in test_dlclose_after_thread_local_dtor()
1366 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "init_thread_local_variable")); in test_dlclose_before_thread_local_dtor() local
1367 ASSERT_TRUE(fn != nullptr) << dlerror(); in test_dlclose_before_thread_local_dtor()
1369 fn(is_dtor_triggered); in test_dlclose_before_thread_local_dtor()
1438 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "init_thread_local_variable")); in TEST() local
1439 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1441 fn(&is_dtor1_triggered); in TEST()
1465 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "init_thread_local_variable2")); in TEST() local
1466 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1468 fn(&is_dtor2_triggered); in TEST()