Home | History | Annotate | Download | only in tests

Lines Matching refs:fn

208   int (*fn)(void);
209 fn = reinterpret_cast<int (*)(void)>(sym);
210 EXPECT_EQ(4, fn());
384 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "relo_test_get_answer"));
385 ASSERT_TRUE(fn != nullptr) << dlerror();
386 ASSERT_EQ(1, fn());
418 fn_t fn, fn2;
419 fn = reinterpret_cast<fn_t>(dlsym(RTLD_DEFAULT, "check_order_dlsym_get_answer"));
420 ASSERT_TRUE(fn != nullptr) << dlerror();
424 ASSERT_EQ(42, fn());
471 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "check_order_reloc_get_answer"));
472 ASSERT_TRUE(fn != nullptr) << dlerror();
473 ASSERT_EQ(42, fn());
498 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "check_order_reloc_get_answer"));
499 ASSERT_TRUE(fn != nullptr) << dlerror();
500 ASSERT_EQ(42, fn());
536 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "check_order_reloc_grandchild_get_answer"));
537 ASSERT_TRUE(fn != nullptr) << dlerror();
538 ASSERT_EQ(42, fn());
582 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "check_order_reloc_nephew_get_answer"));
583 ASSERT_TRUE(fn != nullptr) << dlerror();
584 ASSERT_EQ(42, fn());
609 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle2, "check_order_reloc_get_answer"));
610 ASSERT_TRUE(fn != nullptr) << dlerror();
611 ASSERT_EQ(42, fn());
619 fn = reinterpret_cast<fn_t>(dlsym(handle2, "check_order_reloc_get_answer"));
620 ASSERT_TRUE(fn != nullptr) << dlerror();
621 ASSERT_EQ(42, fn());
657 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "check_order_reloc_root_get_answer"));
658 ASSERT_TRUE(fn != nullptr) << dlerror();
659 ASSERT_EQ(42, fn());
1050 int (*fn)(void);
1051 fn = reinterpret_cast<int (*)(void)>(sym);
1052 EXPECT_EQ(4, fn());
1055 ASSERT_TRUE(0 != dladdr(reinterpret_cast<void*>(fn), &dlinfo));
1057 ASSERT_TRUE(fn == dlinfo.dli_saddr);
1071 int (*fn)(void);
1072 fn = reinterpret_cast<int (*)(void)>(sym);
1073 EXPECT_EQ(4, fn());
1076 ASSERT_TRUE(0 != dladdr(reinterpret_cast<void*>(fn), &dlinfo));
1078 ASSERT_TRUE(fn == dlinfo.dli_saddr);
1227 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "get_function_version"));
1228 ASSERT_TRUE(fn != nullptr) << dlerror();
1229 ASSERT_EQ(1, fn());
1237 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "get_function_version"));
1238 ASSERT_TRUE(fn != nullptr) << dlerror();
1239 ASSERT_EQ(2, fn());
1247 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "get_function_version"));
1248 ASSERT_TRUE(fn != nullptr) << dlerror();
1249 ASSERT_EQ(20, fn());
1257 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "get_function_version"));
1258 ASSERT_TRUE(fn != nullptr) << dlerror();
1259 ASSERT_EQ(3, fn());
1267 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "versioned_function"));
1268 ASSERT_TRUE(fn != nullptr) << dlerror();
1269 ASSERT_EQ(3, fn()); // the default version is 3
1279 fn_t fn = reinterpret_cast<fn_t>(dlvsym(handle, "versioned_function", "nonversion"));
1280 ASSERT_TRUE(fn == nullptr);
1285 fn_t fn = reinterpret_cast<fn_t>(dlvsym(handle, "versioned_function", "TESTLIB_V2"));
1286 ASSERT_TRUE(fn != nullptr) << dlerror();
1287 ASSERT_EQ(2, fn());
1308 dlopen_b_fn fn = (dlopen_b_fn)dlsym(handle, "dlopen_b");
1309 ASSERT_TRUE(fn != nullptr) << dlerror();
1311 void *p = fn();
1323 dlopen_b_fn fn = (dlopen_b_fn)dlsym(handle, "dlopen_b");
1324 ASSERT_TRUE(fn != nullptr) << dlerror();
1326 void *p = fn();
1337 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "init_thread_local_variable"));
1338 ASSERT_TRUE(fn != nullptr) << dlerror();
1340 fn(is_dtor_triggered);
1372 fn_t fn = reinterpret_cast<fn_t>(dlsym(handle, "init_thread_local_variable"));
1373 ASSERT_TRUE(fn != nullptr) << dlerror();
1375 fn(is_dtor_triggered);