Lines Matching refs:pid
65 pid_t pid() const { return child_pid; } in pid() function in fd_sharer
260 void readAndCheckDmaBuffer(std::vector<DmaBuffer>* dmabufs, pid_t pid, const std::string name, in readAndCheckDmaBuffer() argument
264 EXPECT_TRUE(ReadDmaBufInfo(pid, dmabufs)); in readAndCheckDmaBuffer()
269 EXPECT_PID_IN_FDREFS(dmabufs->begin(), pid, expectFdrefs); in readAndCheckDmaBuffer()
270 EXPECT_PID_IN_MAPREFS(dmabufs->begin(), pid, expectMapRefs); in readAndCheckDmaBuffer()
273 bool checkPidRef(DmaBuffer& dmabuf, pid_t pid, int expectFdrefs) { in checkPidRef() argument
274 int fdrefs = dmabuf.fdrefs().find(pid)->second; in checkPidRef()
322 pid_t pid = getpid(); in TEST_F() local
328 ASSERT_TRUE(ReadDmaBufInfo(pid, &dmabufs)); in TEST_F()
334 EXPECT_PID_IN_FDREFS(dmabufs.begin(), pid, true); in TEST_F()
338 ASSERT_TRUE(ReadDmaBufInfo(pid, &dmabufs)); in TEST_F()
346 pid_t pid = getpid(); in TEST_F() local
354 ASSERT_TRUE(ReadDmaBufInfo(pid, &dmabufs)); in TEST_F()
360 EXPECT_PID_IN_FDREFS(dmabufs.begin(), pid, true); in TEST_F()
361 EXPECT_PID_IN_MAPREFS(dmabufs.begin(), pid, true); in TEST_F()
365 ASSERT_TRUE(ReadDmaBufInfo(pid, &dmabufs)); in TEST_F()
370 EXPECT_PID_IN_FDREFS(dmabufs.begin(), pid, false); in TEST_F()
371 EXPECT_PID_IN_MAPREFS(dmabufs.begin(), pid, true); in TEST_F()
378 ASSERT_TRUE(ReadDmaBufInfo(pid, &dmabufs)); in TEST_F()
388 pid_t pid = getpid(); in TEST_F() local
396 readAndCheckDmaBuffer(&dmabufs, pid, "dmabuftester-4k", 1UL, 0UL, "ion", 1UL, 4096ULL, true, in TEST_F()
400 readAndCheckDmaBuffer(&dmabufs, pid, "dmabuftester-4k", 1UL, 0UL, "ion", 2UL, 4096ULL, true, in TEST_F()
402 EXPECT_TRUE(checkPidRef(dmabufs[0], pid, 1)); in TEST_F()
403 readAndCheckDmaBuffer(&dmabufs, sharer.pid(), "dmabuftester-4k", 1UL, 0UL, "ion", 2UL, in TEST_F()
405 EXPECT_TRUE(checkPidRef(dmabufs[0], sharer.pid(), 1)); in TEST_F()
408 readAndCheckDmaBuffer(&dmabufs, pid, "dmabuftester-4k", 1UL, 0UL, "ion", 3UL, 4096ULL, true, in TEST_F()
410 EXPECT_TRUE(checkPidRef(dmabufs[0], pid, 1)); in TEST_F()
411 readAndCheckDmaBuffer(&dmabufs, sharer.pid(), "dmabuftester-4k", 1UL, 0UL, "ion", 3UL, in TEST_F()
413 EXPECT_TRUE(checkPidRef(dmabufs[0], sharer.pid(), 2)); in TEST_F()
416 readAndCheckDmaBuffer(&dmabufs, pid, "dmabuftester-4k", 1UL, 0UL, "ion", 1UL, 4096ULL, true, in TEST_F()
421 ASSERT_TRUE(ReadDmaBufInfo(pid, &dmabufs)); in TEST_F()
431 pid_t pid = getpid(); in TEST_F() local
437 readAndCheckDmaBuffer(&dmabufs, pid, "dmabuftester-4k", 1UL, 0UL, "ion", 1UL, 4096ULL, true, in TEST_F()
441 readAndCheckDmaBuffer(&dmabufs, pid, "dmabuftester-4k", 1UL, 0UL, "ion", 2UL, 4096ULL, true, in TEST_F()
443 EXPECT_TRUE(checkPidRef(dmabufs[0], pid, 2)); in TEST_F()
446 readAndCheckDmaBuffer(&dmabufs, pid, "dmabuftester-4k", 1UL, 0UL, "ion", 1UL, 4096ULL, true, in TEST_F()
448 EXPECT_TRUE(checkPidRef(dmabufs[0], pid, 1)); in TEST_F()
452 ASSERT_TRUE(ReadDmaBufInfo(pid, &dmabufs)); in TEST_F()
461 pid_t pid = getpid(); in TEST_F() local
467 readAndCheckDmaBuffer(&dmabufs, pid, "dmabuftester-4k", 1UL, 0UL, "ion", 1UL, 4096ULL, true, in TEST_F()
471 readAndCheckDmaBuffer(&dmabufs, pid, "dmabuftester-4k", 1UL, 0UL, "ion", 2UL, 4096ULL, true, in TEST_F()
473 readAndCheckDmaBuffer(&dmabufs, sharer.pid(), "dmabuftester-4k", 1UL, 0UL, "ion", 2UL, in TEST_F()
476 readAndCheckDmaBuffer(&dmabufs, pid, "dmabuftester-4k", 1UL, 0UL, "ion", 1UL, 4096ULL, true, in TEST_F()
481 ASSERT_TRUE(ReadDmaBufInfo(pid, &dmabufs)); in TEST_F()