Lines Matching refs:fd
20 int fd, i; in test_file() local
26 fd = mkstemp(templ); in test_file()
27 if (fd < 0) { in test_file()
34 close(fd); in test_file()
41 if (size != write(fd, buf, size)) in test_file()
45 close(fd); in test_file()
241 int dso_cnt, limit, i, fd; in test__dso_data_cache() local
261 fd = dso__data_fd(dso, &machine); in test__dso_data_cache()
262 TEST_ASSERT_VAL("failed to get fd", fd > 0); in test__dso_data_cache()
275 TEST_ASSERT_VAL("dsos[0] is not open", dsos[0]->data.fd != -1); in test__dso_data_cache()
278 fd = dso__data_fd(dsos[i], &machine); in test__dso_data_cache()
279 TEST_ASSERT_VAL("failed to get fd", fd > 0); in test__dso_data_cache()
282 TEST_ASSERT_VAL("failed to close dsos[0]", dsos[0]->data.fd == -1); in test__dso_data_cache()
298 int fd, fd_extra; in test__dso_data_reopen() local
322 fd = dso__data_fd(dso_0, &machine); in test__dso_data_reopen()
323 TEST_ASSERT_VAL("failed to get fd", fd > 0); in test__dso_data_reopen()
326 fd = dso__data_fd(dso_1, &machine); in test__dso_data_reopen()
327 TEST_ASSERT_VAL("failed to get fd", fd > 0); in test__dso_data_reopen()
337 fd = dso__data_fd(dso_2, &machine); in test__dso_data_reopen()
338 TEST_ASSERT_VAL("failed to get fd", fd > 0); in test__dso_data_reopen()
344 TEST_ASSERT_VAL("failed to close dso_0", dso_0->data.fd == -1); in test__dso_data_reopen()
347 fd = dso__data_fd(dso_0, &machine); in test__dso_data_reopen()
348 TEST_ASSERT_VAL("failed to get fd", fd > 0); in test__dso_data_reopen()
354 TEST_ASSERT_VAL("failed to close dso_1", dso_1->data.fd == -1); in test__dso_data_reopen()