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()
105 int fd = dso__data_get_fd(dso, machine); in dso__data_fd() local
107 if (fd >= 0) in dso__data_fd()
110 return fd; in dso__data_fd()
252 int dso_cnt, limit, i, fd; in test__dso_data_cache() local
272 fd = dso__data_fd(dso, &machine); in test__dso_data_cache()
273 TEST_ASSERT_VAL("failed to get fd", fd > 0); in test__dso_data_cache()
286 TEST_ASSERT_VAL("dsos[0] is not open", dsos[0]->data.fd != -1); in test__dso_data_cache()
289 fd = dso__data_fd(dsos[i], &machine); in test__dso_data_cache()
290 TEST_ASSERT_VAL("failed to get fd", fd > 0); in test__dso_data_cache()
293 TEST_ASSERT_VAL("failed to close dsos[0]", dsos[0]->data.fd == -1); in test__dso_data_cache()
309 int fd, fd_extra; in test__dso_data_reopen() local
333 fd = dso__data_fd(dso_0, &machine); in test__dso_data_reopen()
334 TEST_ASSERT_VAL("failed to get fd", fd > 0); in test__dso_data_reopen()
337 fd = dso__data_fd(dso_1, &machine); in test__dso_data_reopen()
338 TEST_ASSERT_VAL("failed to get fd", fd > 0); in test__dso_data_reopen()
348 fd = dso__data_fd(dso_2, &machine); in test__dso_data_reopen()
349 TEST_ASSERT_VAL("failed to get fd", fd > 0); in test__dso_data_reopen()
355 TEST_ASSERT_VAL("failed to close dso_0", dso_0->data.fd == -1); in test__dso_data_reopen()
358 fd = dso__data_fd(dso_0, &machine); in test__dso_data_reopen()
359 TEST_ASSERT_VAL("failed to get fd", fd > 0); in test__dso_data_reopen()
365 TEST_ASSERT_VAL("failed to close dso_1", dso_1->data.fd == -1); in test__dso_data_reopen()