From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2705DC433EF for ; Mon, 20 Sep 2021 15:42:09 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7760060EFF for ; Mon, 20 Sep 2021 15:42:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7760060EFF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7E86C807FE; Mon, 20 Sep 2021 17:42:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="XHafczGD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D817780C68; Mon, 20 Sep 2021 17:42:02 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2060f.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe5a::60f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id AEC248033E for ; Mon, 20 Sep 2021 17:41:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=michals@xilinx.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JHZBB8XiKfIMJRQ+yqZNBNbZqjqSLsOnAKE4MfGAECz6FxLdKjOYm6+guuBDPxqIK9M0xWLsIGFGeMX6FzLYjlvAlVEr+qxowm/jLfjDK04K611jz/MjvI6pYRAZKuBLGQ1qNfkvidLqbtX7lq51QumI8XG/OI1gPWLjns0ULGJn5znAtaX6W4o3/jCmrMJk2TGIBFH6PmL9yRQf3+ka/TxqvMvu6vak4tzgiz/FMRxQL0mZfcV3wbYnZw3hoP1x9GduyXi2oOasjRyDtMKQ/w/aytLefzXVJEna2qC3/o6cvZxEB764v2cvCSj9YsrliphMQwk7b3us1qWUJhlhUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=eF60AWJ3zFzbNA7vIuCr9EZQkfwJzkQ4YGnWH8XH7Ik=; b=NuZ73ZBLM+SRZbbc4b9cYl5MQ1OPrTviBRRfAZEmC6UB+2HiwbJjdcN4g1vw7NGFEFYTXyWenC1a1PLw4bPmdoAYvCMZuzirmvsPwf39n8N7zS1xmsJD0J9XH+wnVbVDuDLqA2Co1zmSIIoNQHZ3+hph4MBB8CxS0rCBhHEa3K0SOa3hzK1cF/Zm+gaQ+MuA6Eyz4lLHIW/oMBwjhcev68Ds4c84UkZWKH7zQgFv9+9dy2r8eYwR1WYwrYkoXOYSPk6yofReEXasgRyN2MiHtPEH2Cg0AlQpDszvTBovf/xCdLc3kvnBvPgf3gLBGnY6JTrq1z2TJE+mt87FxPbiiw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=bootlin.com smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eF60AWJ3zFzbNA7vIuCr9EZQkfwJzkQ4YGnWH8XH7Ik=; b=XHafczGDRjLxhzPMqThtQYnJGKRs6W9ELl2/RV4fN/jrUse0e0pCF2GmEsTDM2OCNMfhbcPwrw4F2n3PT647cFD2QtKNa26+rcGkYWPeAmt4yOqu0uQEi4v9+dT9gAvGJwa4oZ6DvpNwRA9J1rGas+giLZ6PGQ2Wur8WsiV4nRc= Received: from SN7P222CA0027.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:124::30) by MW2PR02MB3692.namprd02.prod.outlook.com (2603:10b6:907:e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14; Mon, 20 Sep 2021 15:41:54 +0000 Received: from SN1NAM02FT0007.eop-nam02.prod.protection.outlook.com (2603:10b6:806:124:cafe::d6) by SN7P222CA0027.outlook.office365.com (2603:10b6:806:124::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14 via Frontend Transport; Mon, 20 Sep 2021 15:41:54 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; bootlin.com; dkim=none (message not signed) header.d=none;bootlin.com; dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch01.xlnx.xilinx.com; Received: from xsj-pvapexch01.xlnx.xilinx.com (149.199.62.198) by SN1NAM02FT0007.mail.protection.outlook.com (10.97.5.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4523.14 via Frontend Transport; Mon, 20 Sep 2021 15:41:54 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Mon, 20 Sep 2021 08:41:52 -0700 Received: from smtp.xilinx.com (172.19.127.95) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Mon, 20 Sep 2021 08:41:52 -0700 Envelope-to: git@xilinx.com, miquel.raynal@bootlin.com, u-boot@lists.denx.de, trini@konsulko.com, ilias.apalodimas@linaro.org Received: from [10.254.241.49] (port=38308) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1mSLQV-0000FU-9x; Mon, 20 Sep 2021 08:41:51 -0700 Subject: Re: [PATCH] test/py: tpm2: Skip tpm pytest based on env variable To: Ilias Apalodimas , Tom Rini CC: T Karthik Reddy , Ashok Reddy Soma , "u-boot@lists.denx.de" , "miquel.raynal@bootlin.com" , git References: <20210723121826.23072-1-ashok.reddy.soma@xilinx.com> <20210804152149.GB9379@bill-the-cat> <20210805132246.GJ858@bill-the-cat> <20210917120832.GG3997@bill-the-cat> From: Michal Simek Message-ID: Date: Mon, 20 Sep 2021 17:41:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d26bd3c6-c8fb-466f-b98f-08d97c4d2c0b X-MS-TrafficTypeDiagnostic: MW2PR02MB3692: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iUvFRQ9O0fu/c5m5CVrrlC7ZWaoIds4bchpSg008anWV7bWx7uUrnTEDSucCTlyBZWa2mDt76wnxWHG5erhGNU/zZLHHmlEfA6AAqwfyH4FFU1r5iWuLCRzGGG/elLO3sB7mB6iCEy/LlnbVPybfN0zTjz0W+aJCPowGOXbgxGoImG4SryMC7WptE0RC+nXUM5YitcizxKDkRbKOKcwf0gkw/Vd6WPZL6rvmnRt/o1RjJxH+7tZFvPV0E8kLutZJ2n2mjR3FGPmssYTAwMKuWKQXWu+bOqmP28ei9dEwwe8WifzRELoJDBeP/Gq0a42O86zescVqjIO//Oa1d5LEPsXA9PX372aO/kVhWHvWBxkJZQ8W7XSVp0ob1syEEivK1AAShicVNyDUNxAxiASHothVvLTpB4cz6i426Tt6s2dCU34bCje/1kStokRTcEDOtI4LReJlgl4E2HwJPDq7HVKOTzKjAj0JrFcUDRz4hIIx/YYelc+mF4MaKMXJmTIkQWu5GRgG+6EfEcLXnxHtGTfO9v+HKmCjh1/2YB4/LSK0MS/vyPrkH8G0rsSBsuITXaRnaKbdnO27VNbitb76dNVJ4u4uSMB8jqdYiTC8mFvLD98x3H45oDqNLLWcQoLg8zTXciNZuZShvjFqfVUyFpBn5DTKVCgDM1jRFg99cp77t0qxzWNVh0L9PmF7IankD7kNxIK3lnmm5LV1jPmuoEeCRIysDPiyj5FicE0D08hFby8dRPJvopP2z88UxPb3dosH641Jhft/K4qhAAPQcdr07XMhicg2jfGUoFWrEgnWqZZxZUpKKTh/0e3t06QRX/g3g5c7He318e+w8Ow4pQ== X-Forefront-Antispam-Report: CIP:149.199.62.198; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:xsj-pvapexch01.xlnx.xilinx.com; PTR:unknown-62-198.xilinx.com; CAT:NONE; SFS:(4636009)(376002)(346002)(39860400002)(136003)(396003)(46966006)(36840700001)(7636003)(82740400003)(316002)(2906002)(336012)(82310400003)(356005)(31686004)(8936002)(36906005)(44832011)(4326008)(110136005)(8676002)(26005)(36756003)(36860700001)(426003)(83380400001)(70586007)(2616005)(70206006)(5660300002)(107886003)(966005)(9786002)(47076005)(54906003)(478600001)(31696002)(53546011)(186003)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Sep 2021 15:41:54.2128 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d26bd3c6-c8fb-466f-b98f-08d97c4d2c0b X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.62.198]; Helo=[xsj-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: SN1NAM02FT0007.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR02MB3692 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hi On 9/18/21 11:48 AM, Ilias Apalodimas wrote: > Hi Tom, > > On Fri, 17 Sept 2021 at 15:08, Tom Rini wrote: >> >> On Fri, Sep 17, 2021 at 11:49:51AM +0000, T Karthik Reddy wrote: >>> Hi Tom, >>> >>>> -----Original Message----- >>>> From: Tom Rini >>>> Sent: Thursday, August 5, 2021 6:53 PM >>>> To: T Karthik Reddy >>>> Cc: Ashok Reddy Soma ; u-boot@lists.denx.de; >>>> miquel.raynal@bootlin.com; git >>>> Subject: Re: [PATCH] test/py: tpm2: Skip tpm pytest based on env variable >>>> >>>> On Thu, Aug 05, 2021 at 05:56:50AM +0000, T Karthik Reddy wrote: >>>>> Hello Tom Rini, >>>>> >>>>>> -----Original Message----- >>>>>> From: Tom Rini >>>>>> Sent: Wednesday, August 4, 2021 8:52 PM >>>>>> To: Ashok Reddy Soma >>>>>> Cc: u-boot@lists.denx.de; miquel.raynal@bootlin.com; git >>>>>> ; T Karthik Reddy >>>>>> Subject: Re: [PATCH] test/py: tpm2: Skip tpm pytest based on env >>>>>> variable >>>>>> >>>>>> On Fri, Jul 23, 2021 at 06:18:26AM -0600, Ashok Reddy Soma wrote: >>>>>> >>>>>>> From: T Karthik Reddy >>>>>>> >>>>>>> Tpm test cases relies on tpm device setup. Provide an environment >>>>>>> variable "env__tpm_device_test_skip = True" to skip the test case >>>>>>> if tpm device is not present. >>>>>>> Only needed will have to add variable to the py-test framework. >>>>>>> Test runs successfully even this variable is absent. >>>>>>> >>>>>>> Signed-off-by: T Karthik Reddy >>>>>>> Signed-off-by: Ashok Reddy Soma >>>>>> >>>>>> Why is this not using boardenv_* like other tests do to disable running? >>>>> >>>>> What I meant here was this test doesn't depend on configuration value >>>>> from boardenv_*. But it uses env__tpm_device_test_skip variable from >>>> the configuration file. >>>>> I referred test/py/tests/test_sleep.py for writing this test case, hence >>>> copied comments as well. >>>>> Should I change this NOTE in comment section? >>>> >>>> Thanks for explaining. This got me to re-read the existing tests and while >>>> none of it is as clear as I would like, your example here is just as clear as the >>>> rest, so it's fine and I'll pick it up soon. >>> >>> I see this patch is not yet applied on the repo, could you please let me know when this will be applied? >> >> Ilias, since you've said you'd review TPM related patches, does this: >> https://patchwork.ozlabs.org/project/uboot/patch/1624340962-91190-1-git-send-email-t.karthik.reddy@xilinx.com/ >> work for you? Thanks. >> > > I am not too familiar with the pytest framework we have, but couldn't > we do this automatically? > IOW instead of explicitly adding a variable, do a 'tpm info' and if > that doesn't return a valid device, skip the tests. Unfortunately not. Because imagine how this will work if you have tpm on board but there is bug in the driver that it is not probed. Then tpm info will return no device and all tests will be silently skipped. It would be much better it the test itself was designed from the beginning that you need to state that board has TPM. But it wasn't that's why we designed this patch in a way that you declare that you want to skip these tests which is OK. It doesn't make any sense to go back and start to have multiple defconfigs for different configurations where all boards works quite well with one defconfig. That's why we enable TPM because it on SOM but we need to be able to disable these tests on others. Thanks, Michal