Lines Matching refs:fn
216 int (*fn)(void); in TEST() local
217 fn = reinterpret_cast<int (*)(void)>(sym); in TEST()
218 EXPECT_EQ(4, fn()); in TEST()
391 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "relo_test_get_answer")); in TEST() local
392 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
393 ASSERT_EQ(1, fn()); in TEST()
425 fn_t fn, fn2; in TEST() local
426 fn = reinterpret_cast<fn_t>(dlsym(RTLD_DEFAULT, "check_order_dlsym_get_answer")); in TEST()
427 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
431 ASSERT_EQ(42, fn()); in TEST()
478 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "check_order_reloc_get_answer")); in TEST() local
479 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
480 ASSERT_EQ(42, fn()); in TEST()
505 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "check_order_reloc_get_answer")); in TEST() local
506 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
507 ASSERT_EQ(42, fn()); in TEST()
543 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "check_order_reloc_grandchild_get_answer")); in TEST() local
544 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
545 ASSERT_EQ(42, fn()); in TEST()
589 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "check_order_reloc_nephew_get_answer")); in TEST() local
590 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
591 ASSERT_EQ(42, fn()); in TEST()
616 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle2, "check_order_reloc_get_answer")); in TEST() local
617 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
618 ASSERT_EQ(42, fn()); in TEST()
626 fn = reinterpret_cast<fn_t>(dlsym(handle2, "check_order_reloc_get_answer")); in TEST()
627 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
628 ASSERT_EQ(42, fn()); in TEST()
664 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "check_order_reloc_root_get_answer")); in TEST() local
665 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
666 ASSERT_EQ(42, fn()); in TEST()
1056 int (*fn)(void); in TEST() local
1057 fn = reinterpret_cast<int (*)(void)>(sym); in TEST()
1058 EXPECT_EQ(4, fn()); in TEST()
1061 ASSERT_TRUE(0 != dladdr(reinterpret_cast<void*>(fn), &dlinfo)); in TEST()
1063 ASSERT_TRUE(fn == dlinfo.dli_saddr); in TEST()
1077 int (*fn)(void); in TEST() local
1078 fn = reinterpret_cast<int (*)(void)>(sym); in TEST()
1079 EXPECT_EQ(4, fn()); in TEST()
1082 ASSERT_TRUE(0 != dladdr(reinterpret_cast<void*>(fn), &dlinfo)); in TEST()
1084 ASSERT_TRUE(fn == dlinfo.dli_saddr); in TEST()
1226 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "get_function_version")); in TEST() local
1227 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1228 ASSERT_EQ(1, fn()); in TEST()
1236 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "get_function_version")); in TEST() local
1237 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1238 ASSERT_EQ(2, fn()); in TEST()
1246 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "get_function_version")); in TEST() local
1247 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1248 ASSERT_EQ(20, fn()); in TEST()
1256 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "get_function_version")); in TEST() local
1257 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1258 ASSERT_EQ(3, fn()); in TEST()
1266 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "versioned_function")); in TEST() local
1267 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1268 ASSERT_EQ(3, fn()); // the default version is 3 in TEST()
1278 fn_t fn = reinterpret_cast<fn_t>(dlvsym(handle, "versioned_function", "nonversion")); in TEST() local
1279 ASSERT_TRUE(fn == nullptr); in TEST()
1284 fn_t fn = reinterpret_cast<fn_t>(dlvsym(handle, "versioned_function", "TESTLIB_V2")); in TEST() local
1285 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1286 ASSERT_EQ(2, fn()); in TEST()
1307 dlopen_b_fn fn = (dlopen_b_fn)dlsym(handle, "dlopen_b"); in TEST() local
1308 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1310 void *p = fn(); in TEST()
1322 dlopen_b_fn fn = (dlopen_b_fn)dlsym(handle, "dlopen_b"); in TEST() local
1323 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1325 void *p = fn(); in TEST()
1336 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "init_thread_local_variable")); in test_dlclose_after_thread_local_dtor() local
1337 ASSERT_TRUE(fn != nullptr) << dlerror(); in test_dlclose_after_thread_local_dtor()
1339 fn(is_dtor_triggered); in test_dlclose_after_thread_local_dtor()
1379 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "init_thread_local_variable")); in test_dlclose_before_thread_local_dtor() local
1380 ASSERT_TRUE(fn != nullptr) << dlerror(); in test_dlclose_before_thread_local_dtor()
1382 fn(is_dtor_triggered); in test_dlclose_before_thread_local_dtor()
1451 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "init_thread_local_variable")); in TEST() local
1452 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1454 fn(&is_dtor1_triggered); in TEST()
1478 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "init_thread_local_variable2")); in TEST() local
1479 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1481 fn(&is_dtor2_triggered); in TEST()