selftests: media_tests: Add new subtest to video_device_test
authorIvan Orlov <ivan.orlov0322@gmail.com>
Wed, 5 Apr 2023 20:04:50 +0000 (00:04 +0400)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 12 Jun 2023 22:39:10 +0000 (16:39 -0600)
commite42bf3cfedec2bd759976ad202f8383ef8f17473
tree5f02768c3f403714b3a9b71bc7019113d56a204b
parent858fd168a95c5b9669aac8db6c14a9aeab446375
selftests: media_tests: Add new subtest to video_device_test

Add new subtest to video_device_test to cover the VIDIOC_G_PRIORITY
and VIDIOC_S_PRIORITY ioctl calls. This test tries to set the priority
associated with the file descriptior via ioctl VIDIOC_S_PRIORITY
command from V4L2 API. After that, the test tries to get the new
priority via VIDIOC_G_PRIORITY ioctl command and compares the result
with the v4l2_priority it set before. At the end, the test restores the
old priority.

This test will increase the code coverage for video_device_test, so
I think it might be useful. Additionally, this patch will refactor the
video_device_test a little bit, according to the new functionality.

Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/media_tests/video_device_test.c