From patchwork Mon May 9 15:44:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helen Koike X-Patchwork-Id: 9047441 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0582A9F1C3 for ; Mon, 9 May 2016 15:45:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4333620148 for ; Mon, 9 May 2016 15:45:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6727B20142 for ; Mon, 9 May 2016 15:45:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751680AbcEIPpL (ORCPT ); Mon, 9 May 2016 11:45:11 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:51110 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751638AbcEIPpL (ORCPT ); Mon, 9 May 2016 11:45:11 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: koike) with ESMTPSA id CE5B1261058 From: Helen Koike To: linux-media@vger.kernel.org, hans.verkuil@cisco.com Cc: Helen Koike Subject: [PATCH] v4l2-compliance: Improve test readability when fail Date: Mon, 9 May 2016 12:44:31 -0300 Message-Id: <3986d5a5773ab05e01d63c54687ad6425df0f952.1462807597.git.helen.koike@collabora.co.uk> X-Mailer: git-send-email 1.9.1 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In case of failure, print "q.create_bufs(node, 1, &fmt) != EINVAL" instead of "ret != EINVAL" Signed-off-by: Helen Koike --- Hello, I was wondering, why the q.create_bufs is expected to should return EINVAL in this test? The height and size are set to half of the original values, and the type and memory doesn't seems to change. Thank you utils/v4l2-compliance/v4l2-test-buffers.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/utils/v4l2-compliance/v4l2-test-buffers.cpp b/utils/v4l2-compliance/v4l2-test-buffers.cpp index 6c5ed55..fb14170 100644 --- a/utils/v4l2-compliance/v4l2-test-buffers.cpp +++ b/utils/v4l2-compliance/v4l2-test-buffers.cpp @@ -955,8 +955,7 @@ int testMmap(struct node *node, unsigned frame_count) fmt.s_height(fmt.g_height() / 2); for (unsigned p = 0; p < fmt.g_num_planes(); p++) fmt.s_sizeimage(fmt.g_sizeimage(p) / 2, p); - ret = q.create_bufs(node, 1, &fmt); - fail_on_test(ret != EINVAL); + fail_on_test(q.create_bufs(node, 1, &fmt) != EINVAL); fail_on_test(testQueryBuf(node, cur_fmt.type, q.g_buffers())); fmt = cur_fmt; for (unsigned p = 0; p < fmt.g_num_planes(); p++)