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 17A3CC433F5 for ; Mon, 20 Sep 2021 16:07:36 +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 6D1E5611AE for ; Mon, 20 Sep 2021 16:07:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6D1E5611AE 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 8CABF8033E; Mon, 20 Sep 2021 18:07:32 +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="Y7K2U+XA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9D84980EEA; Mon, 20 Sep 2021 18:07:30 +0200 (CEST) Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) (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 8EE5D8032E for ; Mon, 20 Sep 2021 18:07:26 +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-x730.google.com with SMTP id ay33so44184133qkb.10 for ; Mon, 20 Sep 2021 09:07:26 -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=p+eaP6oVVd1B6dVZ4lqdMREREmUe2JEVyzlh1sQIlq4=; b=Y7K2U+XAfmCBwZNVKJlxAa7zoupIJ+GYmh+/8Tl18RkBMuZWgXf6fk4Fi9bdW2p0d2 UKDOEzk/k70+wk7iTv4alEClGrAOuSVWGjfC5Gr8ZKpymfwD+pTa8LqNARYIcszygdOr dxaiXDnqkzZ1n0mm538Iaz3IQyqMoQMHuKZNUubsvAyHSDSR5ipLp2d0HS1d9pIwLhll /g0tyJh2xhIVdWcPnr5qMXPIHTpp3jwyJlq07rqlt/v7pAseJhFHxcO8MkJapAvJ+Pj5 Jcd167AqPUCochQQxtEBFZyQjDaa0/3kuayw9c7Gbt0u36/eqjl+w+96NUbm4jNCakda FYjw== 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=p+eaP6oVVd1B6dVZ4lqdMREREmUe2JEVyzlh1sQIlq4=; b=t4z1/0ud5zkU4jMMFs53C8Xg0W2doqwBM1hTXhxCvyc102S2NfgkhItykPuMQshSfj BMJCIILzCcpHA2MvVbYr2JfPZMRIbE8yMsRTqrPB7IpNY6We2htlKFE0mncODEKioNmI KzA30dvhWutsRpNA7yDxx/T5liqGQb0NFK4kzajtAsIpU87yAdeKpi6QsAKIfKi23YGp dkiXrjvbw8Gt4H2Afnz6DBhOlCTdMLWoD0MVcBgj0CFmFWew8os4VwAWw9CpsRQILZe5 x4zRLoOQkkxrX24htDcT8LWM19nDpMe8ZF3rJ4Q/mXroCIVDdlDwqyADep9ru1xrJgyO e8kA== X-Gm-Message-State: AOAM532jfrcZo5U7UKP80KqRxMYVsMnOKS2a0tGvBS4OtdFugIONdO1b 8em5TNTceytYbgT2a1fgV5XjG3oHfYGY2MnvpexANg== X-Google-Smtp-Source: ABdhPJypjtoY7T7PxNQti4udnjfvUTvuwnebTNdaSJ5Rdi1M216+utS2sjr/bDebfaK+TQ3O0DIDPfRvlVFXzIYJgZA= X-Received: by 2002:a05:6902:102e:: with SMTP id x14mr32913754ybt.410.1632154045141; Mon, 20 Sep 2021 09:07:25 -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: From: Ilias Apalodimas Date: Mon, 20 Sep 2021 19:06:48 +0300 Message-ID: Subject: Re: [PATCH] test/py: tpm2: Skip tpm pytest based on env variable To: Michal Simek Cc: Tom Rini , 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 Michal, [...] > >>>> 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. Looking at tpm_info I think it's the other way around, isn't it ? tpm_info will call get_tpm(), which in theory will fail if there's no TPM probed or not present. So even in that case the self-tests will fail. OTOH the 'tpm info' command just returns a CMD Success/Failure, so it's not easy to figure out if a TPM is indeed present or not without refactoring the cmdline interface. So I think this is reasonable for now Acked-by: Ilias Apalodimas > > 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 > > >