This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: v4l2-compliance: test struct media_links_enum reserved field
Author:  Hans Verkuil <hans.verk...@cisco.com>
Date:    Fri Feb 9 14:23:17 2018 +0100

Test that the struct media_links_enum reserved field is zeroed by
the driver.

Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>

 utils/v4l2-compliance/v4l2-test-media.cpp | 4 ++++
 1 file changed, 4 insertions(+)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=1bd58c1ad8dd76edcf5b526ebc4bc4764b66108f
diff --git a/utils/v4l2-compliance/v4l2-test-media.cpp 
b/utils/v4l2-compliance/v4l2-test-media.cpp
index 60307d3d2ed8..b59b8107168c 100644
--- a/utils/v4l2-compliance/v4l2-test-media.cpp
+++ b/utils/v4l2-compliance/v4l2-test-media.cpp
@@ -297,8 +297,10 @@ int testMediaEnum(struct node *node)
                        printf("\t\tEntity Links: 0x%08x (Name: '%s')\n",
                               ent.id, ent.name);
                memset(&links, 0, sizeof(links));
+               memset(&links.reserved, 0xff, sizeof(links.reserved));
                links.entity = ent.id;
                fail_on_test(doioctl(node, MEDIA_IOC_ENUM_LINKS, &links));
+               fail_on_test(check_0(links.reserved, sizeof(links.reserved)));
                fail_on_test(links.entity != ent.id);
                fail_on_test(links.pads);
                fail_on_test(links.links);
@@ -312,7 +314,9 @@ int testMediaEnum(struct node *node)
                memset(links.pads, 0xff, ent.pads * sizeof(*links.pads));
                links.links = new media_link_desc[ent.links];
                memset(links.links, 0xff, ent.links * sizeof(*links.links));
+               memset(&links.reserved, 0xff, sizeof(links.reserved));
                fail_on_test(doioctl(node, MEDIA_IOC_ENUM_LINKS, &links));
+               fail_on_test(check_0(links.reserved, sizeof(links.reserved)));
 
                bool found_source = false;
                for (unsigned i = 0; i < ent.pads; i++) {

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to