Lines Matching refs:dmabufs
204 std::vector<DmaBuffer> dmabufs; in TEST() local
205 EXPECT_TRUE(ReadDmaBufInfo(&dmabufs, path)); in TEST()
207 EXPECT_EQ(dmabufs.size(), 2UL); in TEST()
209 EXPECT_EQ(dmabufs[0].size(), 45056UL); in TEST()
210 EXPECT_EQ(dmabufs[0].inode(), 22069UL); in TEST()
211 EXPECT_EQ(dmabufs[0].count(), 2UL); in TEST()
212 EXPECT_EQ(dmabufs[0].exporter(), "ion"); in TEST()
213 EXPECT_TRUE(dmabufs[0].name().empty()); in TEST()
214 EXPECT_EQ(dmabufs[0].total_refs(), 0ULL); in TEST()
215 EXPECT_TRUE(dmabufs[0].fdrefs().empty()); in TEST()
216 EXPECT_TRUE(dmabufs[0].maprefs().empty()); in TEST()
218 EXPECT_EQ(dmabufs[1].size(), 1048576UL); in TEST()
219 EXPECT_EQ(dmabufs[1].inode(), 19834UL); in TEST()
220 EXPECT_EQ(dmabufs[1].count(), 1UL); in TEST()
221 EXPECT_EQ(dmabufs[1].exporter(), "ion"); in TEST()
222 EXPECT_FALSE(dmabufs[1].name().empty()); in TEST()
223 EXPECT_EQ(dmabufs[1].name(), "CAMERA"); in TEST()
224 EXPECT_EQ(dmabufs[1].total_refs(), 0ULL); in TEST()
225 EXPECT_TRUE(dmabufs[1].fdrefs().empty()); in TEST()
226 EXPECT_TRUE(dmabufs[1].maprefs().empty()); in TEST()
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()
265 EXPECT_EQ(dmabufs->size(), 1UL); in readAndCheckDmaBuffer()
266 EXPECT_ONE_BUF_EQ(dmabufs->begin(), name, fdrefs_size, maprefs_size, exporter, refcount, in readAndCheckDmaBuffer()
269 EXPECT_PID_IN_FDREFS(dmabufs->begin(), pid, expectFdrefs); in readAndCheckDmaBuffer()
270 EXPECT_PID_IN_MAPREFS(dmabufs->begin(), pid, expectMapRefs); in readAndCheckDmaBuffer()
323 std::vector<DmaBuffer> dmabufs; in TEST_F() local
328 ASSERT_TRUE(ReadDmaBufInfo(pid, &dmabufs)); in TEST_F()
330 EXPECT_EQ(dmabufs.size(), 1UL); in TEST_F()
331 EXPECT_ONE_BUF_EQ(dmabufs.begin(), "dmabuftester-4k", 1UL, 0UL, "ion", 1UL, 4096ULL); in TEST_F()
334 EXPECT_PID_IN_FDREFS(dmabufs.begin(), pid, true); in TEST_F()
338 ASSERT_TRUE(ReadDmaBufInfo(pid, &dmabufs)); in TEST_F()
339 EXPECT_TRUE(dmabufs.empty()); in TEST_F()
347 std::vector<DmaBuffer> dmabufs; in TEST_F() local
354 ASSERT_TRUE(ReadDmaBufInfo(pid, &dmabufs)); in TEST_F()
356 EXPECT_EQ(dmabufs.size(), 1UL); in TEST_F()
357 EXPECT_ONE_BUF_EQ(dmabufs.begin(), "dmabuftester-4k", 1UL, 1UL, "ion", 2UL, 4096ULL); 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()
367 EXPECT_EQ(dmabufs.size(), 1UL); in TEST_F()
368 EXPECT_ONE_BUF_EQ(dmabufs.begin(), "<unknown>", 0UL, 1UL, "<unknown>", 0UL, 4096ULL); 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()
379 EXPECT_TRUE(dmabufs.empty()); in TEST_F()
389 std::vector<DmaBuffer> dmabufs; 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()
422 EXPECT_TRUE(dmabufs.empty()); in TEST_F()
432 std::vector<DmaBuffer> dmabufs; 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()
453 EXPECT_TRUE(dmabufs.empty()); in TEST_F()
462 std::vector<DmaBuffer> dmabufs; 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()
482 EXPECT_TRUE(dmabufs.empty()); in TEST_F()