From patchwork Mon Dec 24 11:42:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 1908521 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id D9DF640061 for ; Mon, 24 Dec 2012 11:41:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752198Ab2LXLlF (ORCPT ); Mon, 24 Dec 2012 06:41:05 -0500 Received: from perceval.ideasonboard.com ([95.142.166.194]:34455 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752076Ab2LXLlE (ORCPT ); Mon, 24 Dec 2012 06:41:04 -0500 Received: from avalon.ideasonboard.com (unknown [91.178.87.251]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C68AA359DC; Mon, 24 Dec 2012 12:41:02 +0100 (CET) From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: hans.verkuil@cisco.com Subject: [PATCH] v4l2-compliance: Print invalid return codes in control tests Date: Mon, 24 Dec 2012 12:42:22 +0100 Message-Id: <1356349342-7501-1-git-send-email-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 1.7.8.6 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Signed-off-by: Laurent Pinchart --- utils/v4l2-compliance/v4l2-test-controls.cpp | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/v4l2-compliance/v4l2-test-controls.cpp b/utils/v4l2-compliance/v4l2-test-controls.cpp index 1a1dc96..e16d71d 100644 --- a/utils/v4l2-compliance/v4l2-test-controls.cpp +++ b/utils/v4l2-compliance/v4l2-test-controls.cpp @@ -153,7 +153,7 @@ static int checkQCtrl(struct node *node, struct test_queryctrl &qctrl) qmenu.index = i; ret = doioctl(node, VIDIOC_QUERYMENU, &qmenu); if (ret && ret != EINVAL) - return fail("invalid QUERYMENU return code\n"); + return fail("invalid QUERYMENU return code (%d)\n", ret); if (ret) continue; if (i < qctrl.minimum || i > qctrl.maximum) @@ -194,7 +194,7 @@ int testQueryControls(struct node *node) if (ret == ENOTTY) return ret; if (ret && ret != EINVAL) - return fail("invalid queryctrl return code\n"); + return fail("invalid queryctrl return code (%d)\n", ret); if (ret) break; if (checkQCtrl(node, qctrl)) @@ -244,7 +244,7 @@ int testQueryControls(struct node *node) qctrl.id = id; ret = doioctl(node, VIDIOC_QUERYCTRL, &qctrl); if (ret && ret != EINVAL) - return fail("invalid queryctrl return code\n"); + return fail("invalid queryctrl return code (%d)\n", ret); if (ret) continue; if (qctrl.id != id) @@ -260,7 +260,7 @@ int testQueryControls(struct node *node) qctrl.id = id; ret = doioctl(node, VIDIOC_QUERYCTRL, &qctrl); if (ret && ret != EINVAL) - return fail("invalid queryctrl return code\n"); + return fail("invalid queryctrl return code (%d)\n", ret); if (ret) break; if (qctrl.id != id)