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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 0935EC433EF for ; Sat, 18 Sep 2021 09:49:24 +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 6FE5360F8F for ; Sat, 18 Sep 2021 09:49:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6FE5360F8F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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 8D6B683245; Sat, 18 Sep 2021 11:49:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="c5IdoaUJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 78F968322E; Sat, 18 Sep 2021 11:49:19 +0200 (CEST) Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9BF4F82E48 for ; Sat, 18 Sep 2021 11:49:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-qk1-x72c.google.com with SMTP id ay33so25359965qkb.10 for ; Sat, 18 Sep 2021 02:49:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=D9MrRhpNrGwG5HIRACdRt5G5HLtISTuGz4Z3108dpOA=; b=c5IdoaUJ2WTojy/1obqCb/Dx73aJPSyizDwOhgLf7hx8ADHe4SwyLLH1XQDIUzJruf F2ozXN4kroK45WuurUBMoU3iSpHeyeagrByDqr1L16zepzbuXIktZslRbCTkVGOvRCgK W54ggRcDNsMh/GFkBEMc3tG6q3mL8sfUe42yJ9/xW0PPwWYPnZ9oso2Hg39y3s7Y7uxD RzpdFLax6jkbFPb0AUbIKUmZu82AzHJaVsbfJhoeMO2kTdGu7TT1lSLGlJe5V6rcq29n Qjn65TLkzFZaXKQxbm1+J1n+kodpmJYULtkyG5CqGEOOjOi7BphkafEq7UevAfIA1Lb4 3l7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=D9MrRhpNrGwG5HIRACdRt5G5HLtISTuGz4Z3108dpOA=; b=3RS75IPO0urHHvuXoiVtdEyriRHxgyC3UgK27DnKt7dpg+LAcHI7hPlvB3obAga74W /Hxm0XlOqlRsGqam1DisbEhvVLX6PJRbnN6jAnh1Sha/05cCWk3g+nc+XsEWYCZY3uqb OwR8+Kr5bkVHXZUcjDOYg1pBpV4DfbTl0RCOhlY3ZXS8cVkp8Rsnlx8xsG+RH5ZXBgz/ O4G33gtQIGFTUubRYJFTTizJyH/eFwF5LVTRZk/pcVUKoBcS/x8XyCgnarn1B0xLjBMU sSMtAxqVuvF2wrGl31Sp4R7UdsQhVjixsVKYCrxnqJZmxLJdU71L/+PVz1jPC31BmkS+ dEWA== X-Gm-Message-State: AOAM532vxxFXnI2n0rPYFpudb+AlcnTrdG+eFeOzJFCkajIOi46rf82x +nCgXeOn43j7m6UOCG05zwZDRmlpYy0tEhnXC7w59w== X-Google-Smtp-Source: ABdhPJzQcUdMPCUoWoZ+XMwH3bf435CcgNbHCJLLJ3O2KlVRQ4vDhkopkmFz2bgKrM+/aUxRNZV0ZycrMTYFzyViy9M= X-Received: by 2002:a25:2f48:: with SMTP id v69mr18303224ybv.339.1631958553307; Sat, 18 Sep 2021 02:49:13 -0700 (PDT) MIME-Version: 1.0 References: <20210723121826.23072-1-ashok.reddy.soma@xilinx.com> <20210804152149.GB9379@bill-the-cat> <20210805132246.GJ858@bill-the-cat> <20210917120832.GG3997@bill-the-cat> In-Reply-To: <20210917120832.GG3997@bill-the-cat> From: Ilias Apalodimas Date: Sat, 18 Sep 2021 12:48:36 +0300 Message-ID: Subject: Re: [PATCH] test/py: tpm2: Skip tpm pytest based on env variable To: Tom Rini Cc: T Karthik Reddy , Ashok Reddy Soma , "u-boot@lists.denx.de" , "miquel.raynal@bootlin.com" , git Content-Type: text/plain; charset="UTF-8" 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 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. Regards /Ilias > -- > Tom