aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2021-12-04 12:26:34 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2021-12-04 12:26:34 +0100
commit85ed37cf472bb4f67702fb8d42992f164c36a007 (patch)
tree3f439c0683f76b91b43880aae613ee8adc8e9ffe
parentd95200f6b2e12ddac8f9b94ef9fd5ad197897923 (diff)
downloadv4l-utils-85ed37cf472bb4f67702fb8d42992f164c36a007.tar.gz
v4l2-compliance: improve two vivid_ro_ctrl warnings
These warnings check the vivid_ro_ctrl value against the expected value. Improve them to show the actual values. Hopefully this helps debugging to make this test more reliable since it regularly warns in the daily tests. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--utils/v4l2-compliance/v4l2-test-buffers.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/utils/v4l2-compliance/v4l2-test-buffers.cpp b/utils/v4l2-compliance/v4l2-test-buffers.cpp
index 3122f150..fa8c37c4 100644
--- a/utils/v4l2-compliance/v4l2-test-buffers.cpp
+++ b/utils/v4l2-compliance/v4l2-test-buffers.cpp
@@ -2431,8 +2431,10 @@ int testRequests(struct node *node, bool test_streaming)
// (sequence number & 0xff).
vivid_ro_ctrls.request_fd = buf_req_fds[i];
fail_on_test(doioctl(node, VIDIOC_G_EXT_CTRLS, &vivid_ro_ctrls));
- if (node->is_video && !node->can_output)
- warn_once_on_test(vivid_ro_ctrl.value != (int)i);
+ if (node->is_video && !node->can_output &&
+ vivid_ro_ctrl.value != (int)i)
+ warn_once("vivid_ro_ctrl.value (%d) != i (%u)\n",
+ vivid_ro_ctrl.value, i);
}
fail_on_test(buf.querybuf(node, i));
// Check that all the buffers of the stopped stream are
@@ -2479,8 +2481,10 @@ int testRequests(struct node *node, bool test_streaming)
// For vivid check the final read-only value
vivid_ro_ctrls.which = 0;
fail_on_test(doioctl(node, VIDIOC_G_EXT_CTRLS, &vivid_ro_ctrls));
- if (node->is_video && !node->can_output)
- warn_on_test(vivid_ro_ctrl.value != (int)(num_bufs - 1));
+ if (node->is_video && !node->can_output &&
+ vivid_ro_ctrl.value != (int)(num_bufs - 1))
+ warn("vivid_ro_ctrl.value (%d) != num_bufs - 1 (%d)\n",
+ vivid_ro_ctrl.value, num_bufs - 1);
}
}