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: improve pad flags tests
Author:  Hans Verkuil <hans.verk...@cisco.com>
Date:    Mon Feb 5 08:33:05 2018 +0100

A pad must be source or sink, check this. Also add same checks
to the g_topology test.

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

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

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=ed953f63e55f7f38fb78c2400420aca3be90d354
diff --git a/utils/v4l2-compliance/v4l2-test-media.cpp 
b/utils/v4l2-compliance/v4l2-test-media.cpp
index 23e1ff04c4eb..09b5581222e1 100644
--- a/utils/v4l2-compliance/v4l2-test-media.cpp
+++ b/utils/v4l2-compliance/v4l2-test-media.cpp
@@ -154,6 +154,7 @@ int testMediaTopology(struct node *node)
        }
        for (unsigned i = 0; i < topology.num_pads; i++) {
                media_v2_pad &pad = v2_pads[i];
+               __u32 fl = pad.flags;
 
                fail_on_test(check_0(pad.reserved, sizeof(pad.reserved)));
                fail_on_test(!pad.id);
@@ -161,6 +162,9 @@ int testMediaTopology(struct node *node)
                fail_on_test(v2_pads_set.find(pad.id) != v2_pads_set.end());
                v2_pads_set.insert(pad.id);
                fail_on_test(v2_entities_set.find(pad.entity_id) == 
v2_entities_set.end());
+               fail_on_test(!(fl & (MEDIA_PAD_FL_SINK | MEDIA_PAD_FL_SOURCE)));
+               fail_on_test((fl & (MEDIA_PAD_FL_SINK | MEDIA_PAD_FL_SOURCE)) ==
+                            (MEDIA_PAD_FL_SINK | MEDIA_PAD_FL_SOURCE));
                entity_num_pads[pad.entity_id]++;
        }
        for (unsigned i = 0; i < topology.num_links; i++) {
@@ -274,6 +278,7 @@ int testMediaEnum(struct node *node)
                        fail_on_test(links.pads[i].index != i);
                        fail_on_test(check_0(links.pads[i].reserved, 
sizeof(links.pads[i].reserved)));
                        __u32 fl = links.pads[i].flags;
+                       fail_on_test(!(fl & (MEDIA_PAD_FL_SINK | 
MEDIA_PAD_FL_SOURCE)));
                        fail_on_test((fl & (MEDIA_PAD_FL_SINK | 
MEDIA_PAD_FL_SOURCE)) ==
                                     (MEDIA_PAD_FL_SINK | MEDIA_PAD_FL_SOURCE));
                        if (fl & MEDIA_PAD_FL_SOURCE)

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

Reply via email to