Home | History | Annotate | Download | only in tests

Lines Matching refs:fn

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