aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2018-12-10 10:48:17 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2018-12-10 10:51:10 +0100
commit00228fe5b596bef81870765c4e27258aeec2d72f (patch)
tree0fb6260d78f044b8bb5cdeccf2ddd30e7ed38c79
parent516595495957cbc18b578e6c1598bec21858b4e5 (diff)
v4l2-compliance: reopen if buffers might have been allocated
Some of the tests allocate buffers, but if there was a failure in that test, then the buffers wouldn't be freed. Do that one level up in v4l2-compliance.cpp. Otherwise this would cause confusing knock-on failures later in the test. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--utils/v4l2-compliance/v4l2-compliance.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/utils/v4l2-compliance/v4l2-compliance.cpp b/utils/v4l2-compliance/v4l2-compliance.cpp
index 4f09f3a5..a53fcc50 100644
--- a/utils/v4l2-compliance/v4l2-compliance.cpp
+++ b/utils/v4l2-compliance/v4l2-compliance.cpp
@@ -1003,8 +1003,14 @@ void testNode(struct node &node, struct node &expbuf_node, media_type type,
printf("Buffer ioctls%s:\n", suffix);
printf("\ttest VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: %s\n", ok(testReqBufs(&node)));
+ // Reopen after each streaming test to reset the streaming state
+ // in case of any errors in the preceeding test.
+ node.reopen();
printf("\ttest VIDIOC_EXPBUF: %s\n", ok(testExpBuf(&node)));
printf("\ttest Requests: %s\n", ok(testRequests(&node, options[OptStreaming])));
+ // Reopen after each streaming test to reset the streaming state
+ // in case of any errors in the preceeding test.
+ node.reopen();
printf("\n");
}

Privacy Policy