aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2021-01-19 09:50:43 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2021-01-19 09:50:43 +0100
commit6f73812725efb2ce5f3bad33de93d7ad8f900356 (patch)
treee3b7e6e848731abcfdd013a1d247c913d084851b
parent3abb9556eff581e3ba424972cc54a40611ead80b (diff)
v4l2-compliance: improve VIDIOC_TRY_DE/ENCODER_CMD tests
If the VIDIOC_DE/ENCODER_CMD ioctl returns ENOTTY, then the corresponding VIDIOC_TRY_DE/ENCODER_CMD ioctl must return that as well. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--utils/v4l2-compliance/v4l2-test-codecs.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/v4l2-compliance/v4l2-test-codecs.cpp b/utils/v4l2-compliance/v4l2-test-codecs.cpp
index 0acdc27d..9fb11e02 100644
--- a/utils/v4l2-compliance/v4l2-test-codecs.cpp
+++ b/utils/v4l2-compliance/v4l2-test-codecs.cpp
@@ -36,6 +36,7 @@ int testEncoder(struct node *node)
ret = doioctl(node, VIDIOC_ENCODER_CMD, &cmd);
if (ret == ENOTTY) {
fail_on_test(is_encoder);
+ fail_on_test(doioctl(node, VIDIOC_TRY_ENCODER_CMD, &cmd) != ENOTTY);
return ret;
}
fail_on_test(node->codec_mask & STATEFUL_DECODER);
@@ -102,6 +103,7 @@ int testDecoder(struct node *node)
ret = doioctl(node, VIDIOC_DECODER_CMD, &cmd);
if (ret == ENOTTY) {
fail_on_test(is_decoder);
+ fail_on_test(doioctl(node, VIDIOC_TRY_DECODER_CMD, &cmd) != ENOTTY);
return ret;
}
fail_on_test(node->codec_mask & STATEFUL_ENCODER);

Privacy Policy