Home | History | Annotate | Download | only in tests

Lines Matching refs:fn

204   int (*fn)(void);
205 fn = reinterpret_cast<int (*)(void)>(sym);
206 EXPECT_EQ(4, fn());
341 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "relo_test_get_answer"));
342 ASSERT_TRUE(fn != nullptr) << dlerror();
343 ASSERT_EQ(1, fn());
375 fn_t fn, fn2;
376 fn = reinterpret_cast<fn_t>(dlsym(RTLD_DEFAULT, "check_order_dlsym_get_answer"));
377 ASSERT_TRUE(fn != nullptr) << dlerror();
381 ASSERT_EQ(42, fn());
428 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "check_order_reloc_get_answer"));
429 ASSERT_TRUE(fn != nullptr) << dlerror();
430 ASSERT_EQ(42, fn());
455 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "check_order_reloc_get_answer"));
456 ASSERT_TRUE(fn != nullptr) << dlerror();
457 ASSERT_EQ(42, fn());
493 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "check_order_reloc_grandchild_get_answer"));
494 ASSERT_TRUE(fn != nullptr) << dlerror();
495 ASSERT_EQ(42, fn());
539 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "check_order_reloc_nephew_get_answer"));
540 ASSERT_TRUE(fn != nullptr) << dlerror();
541 ASSERT_EQ(42, fn());
566 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle2, "check_order_reloc_get_answer"));
567 ASSERT_TRUE(fn != nullptr) << dlerror();
568 ASSERT_EQ(42, fn());
576 fn = reinterpret_cast<fn_t>(dlsym(handle2, "check_order_reloc_get_answer"));
577 ASSERT_TRUE(fn != nullptr) << dlerror();
578 ASSERT_EQ(42, fn());
614 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "check_order_reloc_root_get_answer"));
615 ASSERT_TRUE(fn != nullptr) << dlerror();
616 ASSERT_EQ(42, fn());
994 int (*fn)(void);
995 fn = reinterpret_cast<int (*)(void)>(sym);
996 EXPECT_EQ(4, fn());
999 ASSERT_TRUE(0 != dladdr(reinterpret_cast<void*>(fn), &dlinfo));
1001 ASSERT_TRUE(fn == dlinfo.dli_saddr);
1017 int (*fn)(void);
1018 fn = reinterpret_cast<int (*)(void)>(sym);
1019 EXPECT_EQ(4, fn());
1022 ASSERT_TRUE(0 != dladdr(reinterpret_cast<void*>(fn), &dlinfo));
1024 ASSERT_TRUE(fn == dlinfo.dli_saddr);
1166 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "get_function_version"));
1167 ASSERT_TRUE(fn != nullptr) << dlerror();
1168 ASSERT_EQ(1, fn());
1176 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "get_function_version"));
1177 ASSERT_TRUE(fn != nullptr) << dlerror();
1178 ASSERT_EQ(2, fn());
1186 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "get_function_version"));
1187 ASSERT_TRUE(fn != nullptr) << dlerror();
1188 ASSERT_EQ(20, fn());
1196 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "get_function_version"));
1197 ASSERT_TRUE(fn != nullptr) << dlerror();
1198 ASSERT_EQ(3, fn());
1206 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "versioned_function"));
1207 ASSERT_TRUE(fn != nullptr) << dlerror();
1208 ASSERT_EQ(3, fn()); // the default version is 3
1218 fn_t fn = reinterpret_cast<fn_t>(dlvsym(handle, "versioned_function", "nonversion"));
1219 ASSERT_TRUE(fn == nullptr);
1224 fn_t fn = reinterpret_cast<fn_t>(dlvsym(handle, "versioned_function", "TESTLIB_V2"));
1225 ASSERT_TRUE(fn != nullptr) << dlerror();
1226 ASSERT_EQ(2, fn());
1247 dlopen_b_fn fn = (dlopen_b_fn)dlsym(handle, "dlopen_b");
1248 ASSERT_TRUE(fn != nullptr) << dlerror();
1250 void *p = fn();
1343 dlopen_b_fn fn = (dlopen_b_fn)dlsym(handle, "dlopen_b");
1344 ASSERT_TRUE(fn != nullptr) << dlerror();
1346 void *p = fn();