From patchwork Thu Aug 6 02:28:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 11702709 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B051314B7 for ; Thu, 6 Aug 2020 02:28:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9EB1422CAE for ; Thu, 6 Aug 2020 02:28:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="BXwpA7M2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726844AbgHFC2V (ORCPT ); Wed, 5 Aug 2020 22:28:21 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:38340 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726026AbgHFC2U (ORCPT ); Wed, 5 Aug 2020 22:28:20 -0400 Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B4E14560; Thu, 6 Aug 2020 04:28:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1596680898; bh=J4fg+VdtFW9zMB911f36dnK/m+Ky9S7k6+TsyT8lPH8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BXwpA7M2Ibl5PrDmRIoclvMDmj6u/R9nCtFELqqQV1iWzqHUx3ypdN+M/OQWW2ZKh HQJUGVFXr9wHj3F+W0b5P46Y/qYwmsUlyPxU74bvWsFCnYLq2GR9gnx+3EDGOXo/Zh Of9UKgrL8p2Tp9Dbj5rnUbm2O8K4C/y8T/GA55Oc= From: Laurent Pinchart To: linux-renesas-soc@vger.kernel.org Cc: Kieran Bingham Subject: [PATCH 1/3] tests: crc: Fix AtomicRequest usage Date: Thu, 6 Aug 2020 05:28:00 +0300 Message-Id: <20200806022802.22813-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200806022802.22813-1-laurent.pinchart@ideasonboard.com> References: <20200806022802.22813-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Commit 3cd7e6814cea ("kmstest.py: Fix CRTC disabling") modified the CRC test to use the kmstest.AtomicRequest class, but failed to pass the correct argument to the constructor. Fix it. Fixes: 3cd7e6814cea ("kmstest.py: Fix CRTC disabling") Signed-off-by: Laurent Pinchart --- tests/kms-test-crc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/kms-test-crc.py b/tests/kms-test-crc.py index d936d1d4fb90..dcdfcd4abb71 100755 --- a/tests/kms-test-crc.py +++ b/tests/kms-test-crc.py @@ -58,7 +58,7 @@ class CRCTest(kmstest.KMSTest): self.fail("atomic mode set failed with %d" % ret) continue - req = kmstest.AtomicRequest(self.card) + req = kmstest.AtomicRequest(self) offset = 100 for plane in planes: From patchwork Thu Aug 6 02:28:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 11702711 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B1FDD138C for ; Thu, 6 Aug 2020 02:28:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A05C322B40 for ; Thu, 6 Aug 2020 02:28:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="VcTIC9q+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726971AbgHFC21 (ORCPT ); Wed, 5 Aug 2020 22:28:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726026AbgHFC2Z (ORCPT ); Wed, 5 Aug 2020 22:28:25 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23E7BC061574 for ; Wed, 5 Aug 2020 19:28:25 -0700 (PDT) Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1C8DCAC8; Thu, 6 Aug 2020 04:28:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1596680899; bh=FCuLdrMAqAxF8sSwb9ni0c6CqMo6ju/I6GX1WAjdG4A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VcTIC9q+T971VHo3D1156anOjrnwokopyH29WmzwqHlZtlxGionYcegHG+Br5/heD ydTYqdxNAfXmDAgCURpK2HssOYlKJhh3vISCvEp3x+uJn19DwN237iMi0wCIGPvSBc 3WJQA06znOde6oQQlDdOHYPhSHtFDhSLx1Sg1C/c= From: Laurent Pinchart To: linux-renesas-soc@vger.kernel.org Cc: Kieran Bingham Subject: [PATCH 2/3] tests: formats: Add progress reporting Date: Thu, 6 Aug 2020 05:28:01 +0300 Message-Id: <20200806022802.22813-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200806022802.22813-1-laurent.pinchart@ideasonboard.com> References: <20200806022802.22813-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Improve the formats test by adding progress reporting, as the test is long. Signed-off-by: Laurent Pinchart --- tests/kms-test-formats.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/kms-test-formats.py b/tests/kms-test-formats.py index 77c9fe775a7c..93075561a843 100755 --- a/tests/kms-test-formats.py +++ b/tests/kms-test-formats.py @@ -40,8 +40,12 @@ class FormatsTest(kmstest.KMSTest): self.logger.log("Testing connector %s, CRTC %u, mode %s" % \ (connector.fullname, crtc.id, mode.name)) - for format in crtc.primary_plane.formats: + num_formats = len(crtc.primary_plane.formats) + for i in range(num_formats): + format = crtc.primary_plane.formats[i] + self.logger.log("Testing format %s" % format) + self.progress(i+1, num_formats) # Create a frame buffer try: From patchwork Thu Aug 6 02:28:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 11702713 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8FE7B138C for ; Thu, 6 Aug 2020 02:28:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7E19722B40 for ; Thu, 6 Aug 2020 02:28:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="G8vc2jR2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726899AbgHFC2f (ORCPT ); Wed, 5 Aug 2020 22:28:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726955AbgHFC2e (ORCPT ); Wed, 5 Aug 2020 22:28:34 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 051DCC061574 for ; Wed, 5 Aug 2020 19:28:33 -0700 (PDT) Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7665EBB3; Thu, 6 Aug 2020 04:28:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1596680899; bh=Bdg/t007yqaz4RQ0TEfC982pna3T4lvPIj6b3LA8fP8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G8vc2jR2j8WpZrKRvFbTeRnz5iuwlgSnz/oCYTCfTKmeinKQcHY4WPOH2qRmCWtAO ztSbd57s+gfPJiBjp5C61JQUyI5vbliIzYOMsqIAqKgVb/brRbyhoSzKwE7dUzVbLZ AeDFHiPLmrNUCgKYwzvMlMgZgHLKW4ecST0d2iqs= From: Laurent Pinchart To: linux-renesas-soc@vger.kernel.org Cc: Kieran Bingham Subject: [PATCH 3/3] tests: formats: Improve error reporting Date: Thu, 6 Aug 2020 05:28:02 +0300 Message-Id: <20200806022802.22813-4-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200806022802.22813-1-laurent.pinchart@ideasonboard.com> References: <20200806022802.22813-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Improve the formats test by counting the number of formats that failed and reporting failures appropriately. Signed-off-by: Laurent Pinchart --- tests/kms-test-formats.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/kms-test-formats.py b/tests/kms-test-formats.py index 93075561a843..86f16511f1ea 100755 --- a/tests/kms-test-formats.py +++ b/tests/kms-test-formats.py @@ -40,6 +40,8 @@ class FormatsTest(kmstest.KMSTest): self.logger.log("Testing connector %s, CRTC %u, mode %s" % \ (connector.fullname, crtc.id, mode.name)) + failed = 0 + num_formats = len(crtc.primary_plane.formats) for i in range(num_formats): format = crtc.primary_plane.formats[i] @@ -51,6 +53,8 @@ class FormatsTest(kmstest.KMSTest): try: fb = pykms.DumbFramebuffer(self.card, mode.hdisplay, mode.vdisplay, format) except ValueError: + self.logger.log("Failed to create frame buffer") + failed += 1 continue pykms.draw_test_pattern(fb) @@ -58,12 +62,17 @@ class FormatsTest(kmstest.KMSTest): # Set the mode with a primary plane ret = self.atomic_crtc_mode_set(crtc, connector, mode, fb) if ret < 0: - self.fail("atomic mode set failed with %d" % ret) + self.logger.log("atomic mode set failed with %d" % ret) + failed += 1 continue self.run(3) self.atomic_crtc_disable(crtc) - self.success() + + if failed: + self.fail("%s/%s formats failed" % (failed, num_formats)) + else: + self.success() FormatsTest().execute()