aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/v4l2-compliance/v4l2-test-buffers.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/utils/v4l2-compliance/v4l2-test-buffers.cpp b/utils/v4l2-compliance/v4l2-test-buffers.cpp
index dc829189..98fa587d 100644
--- a/utils/v4l2-compliance/v4l2-test-buffers.cpp
+++ b/utils/v4l2-compliance/v4l2-test-buffers.cpp
@@ -719,7 +719,9 @@ static int captureBufs(struct node *node, const cv4l_queue &q,
fail_on_test(memcmp(&buf.g_timecode(), &orig_buf.timecode,
sizeof(orig_buf.timecode)));
}
+ fail_on_test(buf.g_flags() & V4L2_BUF_FLAG_DONE);
fail_on_test(buf.qbuf(node));
+ fail_on_test(buf.g_flags() & V4L2_BUF_FLAG_DONE);
if (--count == 0)
break;
}
@@ -746,7 +748,9 @@ static int captureBufs(struct node *node, const cv4l_queue &q,
fail_on_test(memcmp(&buf.g_timecode(), &orig_buf.timecode,
sizeof(orig_buf.timecode)));
}
+ fail_on_test(buf.g_flags() & V4L2_BUF_FLAG_DONE);
fail_on_test(buf.qbuf(node));
+ fail_on_test(buf.g_flags() & V4L2_BUF_FLAG_DONE);
}
if (use_poll)
fcntl(node->g_fd(), F_SETFL, fd_flags);
@@ -778,6 +782,7 @@ static int setupM2M(struct node *node, cv4l_queue &q)
fail_on_test(buf.querybuf(node, i));
fail_on_test(buf.qbuf(node));
+ fail_on_test(buf.g_flags() & V4L2_BUF_FLAG_DONE);
}
if (v4l_type_is_video(q.g_type())) {
cv4l_fmt fmt(q.g_type());
@@ -828,6 +833,7 @@ static int bufferOutputErrorTest(struct node *node, const buffer &orig_buf)
}
}
fail_on_test(buf.qbuf(node, false));
+ fail_on_test(buf.g_flags() & V4L2_BUF_FLAG_DONE);
for (unsigned p = 0; p < buf.g_num_planes(); p++) {
fail_on_test(buf.g_bytesused(p) != buf.g_length(p));
fail_on_test(buf.g_data_offset(p));
@@ -864,6 +870,7 @@ static int setupMmap(struct node *node, cv4l_queue &q)
}
fail_on_test(buf.qbuf(node));
+ fail_on_test(buf.g_flags() & V4L2_BUF_FLAG_DONE);
fail_on_test(!buf.qbuf(node));
fail_on_test(!buf.prepare_buf(node));
// Test with invalid buffer index
@@ -926,6 +933,7 @@ int testMmap(struct node *node, unsigned frame_count)
fail_on_test(buf.querybuf(node, i));
fail_on_test(buf.qbuf(node));
+ fail_on_test(buf.g_flags() & V4L2_BUF_FLAG_DONE);
}
// calling STREAMOFF...
fail_on_test(node->streamoff(q.g_type()));
@@ -936,6 +944,7 @@ int testMmap(struct node *node, unsigned frame_count)
fail_on_test(buf.querybuf(node, i));
fail_on_test(buf.qbuf(node));
+ fail_on_test(buf.g_flags() & V4L2_BUF_FLAG_DONE);
}
// Now request buffers again, freeing the old buffers.
// Good check for whether all the internal vb2 calls are in
@@ -1040,6 +1049,7 @@ static int setupUserPtr(struct node *node, cv4l_queue &q)
}
fail_on_test(buf.qbuf(node));
+ fail_on_test(buf.g_flags() & V4L2_BUF_FLAG_DONE);
fail_on_test(buf.querybuf(node, i));
fail_on_test(buf.check(q, Queued, i));
}
@@ -1141,6 +1151,7 @@ static int setupDmaBuf(struct node *expbuf_node, struct node *node,
}
fail_on_test(buf.qbuf(node));
+ fail_on_test(buf.g_flags() & V4L2_BUF_FLAG_DONE);
fail_on_test(buf.querybuf(node, i));
fail_on_test(buf.check(q, Queued, i));
}
@@ -1318,6 +1329,7 @@ static int testStreaming(struct node *node, unsigned frame_count)
if (alternate)
field ^= 1;
fail_on_test(node->qbuf(buf));
+ fail_on_test(buf.g_flags() & V4L2_BUF_FLAG_DONE);
}
fail_on_test(node->streamon());
@@ -1326,10 +1338,12 @@ static int testStreaming(struct node *node, unsigned frame_count)
buftype2s(q.g_type()).c_str(),
buf.g_sequence(), field2s(buf.g_field()).c_str());
fflush(stdout);
+ fail_on_test(buf.g_flags() & V4L2_BUF_FLAG_DONE);
buf.s_field(field);
if (alternate)
field ^= 1;
fail_on_test(node->qbuf(buf));
+ fail_on_test(buf.g_flags() & V4L2_BUF_FLAG_DONE);
if (frame_count-- == 0)
break;
}

Privacy Policy