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

Subject: v4l2-compliance: fix VIDIOC_G_SLICED_VBI_CAP tests.
Author:  Hans Verkuil <[email protected]>
Date:    Wed Sep 5 15:33:38 2012 +0200

The return value checks were incorrect.

Signed-off-by: Hans Verkuil <[email protected]>
(cherry picked from commit 64f354858903e9c728ccb1372f82bff372c42db6)

Signed-off-by: Gregor Jasny <[email protected]>

 utils/v4l2-compliance/v4l2-test-formats.cpp |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

---

http://git.linuxtv.org/v4l-utils.git?a=commitdiff;h=45400f8a4a49f350e617f3dc32c93027db24f4b4

diff --git a/utils/v4l2-compliance/v4l2-test-formats.cpp 
b/utils/v4l2-compliance/v4l2-test-formats.cpp
index 0935fb3..404a47b 100644
--- a/utils/v4l2-compliance/v4l2-test-formats.cpp
+++ b/utils/v4l2-compliance/v4l2-test-formats.cpp
@@ -551,7 +551,8 @@ int testTryFormats(struct node *node)
                if (ret)
                        return ret;
                if (memcmp(&fmt, &fmt_try, sizeof(fmt)))
-                       return fail("TRY_FMT(G_FMT) != G_FMT\n");
+                       return fail("%s: TRY_FMT(G_FMT) != G_FMT\n",
+                                       buftype2s(type).c_str());
        }
 
        for (type = 0; type <= V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; type++) {
@@ -605,7 +606,8 @@ int testSetFormats(struct node *node)
                if (ret)
                        return ret;
                if (memcmp(&fmt, &fmt_set, sizeof(fmt)))
-                       return fail("S_FMT(G_FMT) != G_FMT\n");
+                       return fail("%s: S_FMT(G_FMT) != G_FMT\n",
+                                       buftype2s(type).c_str());
        }
        memset(&fmt, 0xff, sizeof(fmt));
        fmt.type = V4L2_BUF_TYPE_PRIVATE;
@@ -627,17 +629,14 @@ static int testSlicedVBICapType(struct node *node, 
unsigned type)
        memset(&cap.reserved, 0, sizeof(cap.reserved));
        cap.type = type;
        ret = doioctl(node, VIDIOC_G_SLICED_VBI_CAP, &cap);
-       if (ret == ENOTTY) {
+       if (ret == ENOTTY || ret == EINVAL) {
                fail_on_test(sliced_type && (node->caps & buftype2cap[type]));
-               return ret;
+               return ret == ENOTTY ? ret : 0;
        }
+       fail_on_test(ret);
        fail_on_test(check_0(cap.reserved, sizeof(cap.reserved)));
        fail_on_test(cap.type != type);
-       fail_on_test(ret && ret != EINVAL);
-       fail_on_test(ret && sliced_type && (node->caps & buftype2cap[type]));
-       fail_on_test(!ret && (!sliced_type || !(node->caps & 
buftype2cap[type])));
-       if (ret)
-               return 0;
+       fail_on_test(!sliced_type || !(node->caps & buftype2cap[type]));
 
        for (int f = 0; f < 2; f++)
                for (int i = 0; i < 24; i++)

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to