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()
388 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "relo_test_get_answer")); in TEST() local
389 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
390 ASSERT_EQ(1, fn()); in TEST()
422 fn_t fn, fn2; in TEST() local
423 fn = reinterpret_cast<fn_t>(dlsym(RTLD_DEFAULT, "check_order_dlsym_get_answer")); in TEST()
424 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
428 ASSERT_EQ(42, fn()); in TEST()
475 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "check_order_reloc_get_answer")); in TEST() local
476 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
477 ASSERT_EQ(42, fn()); in TEST()
502 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "check_order_reloc_get_answer")); in TEST() local
503 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
504 ASSERT_EQ(42, fn()); in TEST()
540 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "check_order_reloc_grandchild_get_answer")); in TEST() local
541 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
542 ASSERT_EQ(42, fn()); in TEST()
586 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "check_order_reloc_nephew_get_answer")); in TEST() local
587 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
588 ASSERT_EQ(42, fn()); in TEST()
613 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle2, "check_order_reloc_get_answer")); in TEST() local
614 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
615 ASSERT_EQ(42, fn()); in TEST()
623 fn = reinterpret_cast<fn_t>(dlsym(handle2, "check_order_reloc_get_answer")); in TEST()
624 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
625 ASSERT_EQ(42, fn()); in TEST()
661 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "check_order_reloc_root_get_answer")); in TEST() local
662 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
663 ASSERT_EQ(42, fn()); in TEST()
1048 int (*fn)(void); in TEST() local
1049 fn = reinterpret_cast<int (*)(void)>(sym); in TEST()
1050 EXPECT_EQ(4, fn()); in TEST()
1053 ASSERT_TRUE(0 != dladdr(reinterpret_cast<void*>(fn), &dlinfo)); in TEST()
1055 ASSERT_TRUE(fn == dlinfo.dli_saddr); in TEST()
1066 int (*fn)(void); in TEST() local
1067 fn = reinterpret_cast<int (*)(void)>(sym); in TEST()
1068 EXPECT_EQ(4, fn()); in TEST()
1071 ASSERT_TRUE(0 != dladdr(reinterpret_cast<void*>(fn), &dlinfo)); in TEST()
1073 ASSERT_TRUE(fn == dlinfo.dli_saddr); in TEST()
1215 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "get_function_version")); in TEST() local
1216 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1217 ASSERT_EQ(1, fn()); in TEST()
1225 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "get_function_version")); in TEST() local
1226 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1227 ASSERT_EQ(2, fn()); in TEST()
1235 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "get_function_version")); in TEST() local
1236 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1237 ASSERT_EQ(20, fn()); in TEST()
1245 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "get_function_version")); in TEST() local
1246 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1247 ASSERT_EQ(3, fn()); in TEST()
1255 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "versioned_function")); in TEST() local
1256 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1257 ASSERT_EQ(3, fn()); // the default version is 3 in TEST()
1267 fn_t fn = reinterpret_cast<fn_t>(dlvsym(handle, "versioned_function", "nonversion")); in TEST() local
1268 ASSERT_TRUE(fn == nullptr); in TEST()
1273 fn_t fn = reinterpret_cast<fn_t>(dlvsym(handle, "versioned_function", "TESTLIB_V2")); in TEST() local
1274 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1275 ASSERT_EQ(2, fn()); in TEST()
1296 dlopen_b_fn fn = (dlopen_b_fn)dlsym(handle, "dlopen_b"); in TEST() local
1297 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1299 void *p = fn(); in TEST()
1311 dlopen_b_fn fn = (dlopen_b_fn)dlsym(handle, "dlopen_b"); in TEST() local
1312 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1314 void *p = fn(); in TEST()
1325 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "init_thread_local_variable")); in test_dlclose_after_thread_local_dtor() local
1326 ASSERT_TRUE(fn != nullptr) << dlerror(); in test_dlclose_after_thread_local_dtor()
1328 fn(is_dtor_triggered); in test_dlclose_after_thread_local_dtor()
1368 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "init_thread_local_variable")); in test_dlclose_before_thread_local_dtor() local
1369 ASSERT_TRUE(fn != nullptr) << dlerror(); in test_dlclose_before_thread_local_dtor()
1371 fn(is_dtor_triggered); in test_dlclose_before_thread_local_dtor()
1440 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "init_thread_local_variable")); in TEST() local
1441 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1443 fn(&is_dtor1_triggered); in TEST()
1467 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "init_thread_local_variable2")); in TEST() local
1468 ASSERT_TRUE(fn != nullptr) << dlerror(); in TEST()
1470 fn(&is_dtor2_triggered); in TEST()