Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3672606pxj; Tue, 15 Jun 2021 06:16:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyOjj2EswUeX/oEY8Fu6v/9MRKZtjvBaEqL0YAw10qaGguECUeokrcipQvf3IxWqJEWJB3 X-Received: by 2002:a05:6638:3492:: with SMTP id t18mr3037109jal.3.1623763015865; Tue, 15 Jun 2021 06:16:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623763015; cv=none; d=google.com; s=arc-20160816; b=DlN3wPHrBGsC5eWgNJWN8X28GxI9/z6KEvdmZA8xbsGen/x7Im+gP/9ntViEQlaH4w TlRizg4zyYbDzvqm2DRQN8pbVngYXhjGgJq5KONjGt88ph3U0r9S6ueGGfnLLSDBfTLw 9XaUA4aB/2eQQvExkgi869YO7TDra2m/387FlY+Dkf4AIeJNCuFPywNqQlEUPDY15kxj qkWV750UW1JhP+xMdPzXdXjsCyLAtpVpClP2iLPpiWBGXAGZfm55/wLPXJRQXL1BXeaV iffNBrNHvp7jH5asmSzF0YkpE7SwwnJx4TzaFgQ3Qi9Erm+OKkDiLvIXHA53Xt+vakkI oZEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=zh5efXroVjWHLtZdduBotis9Imo7lPyGF/KhEwpI8Bo=; b=HsdrkB6oJyFF45a1KFmrowoe4ez0cD2FYSFvPeJ4Sfno5AcxEj8qsDLcA9gKfvpFFK tNrKCdzoejHGExAKoQSy/jZctBQoDVPR3ND9A4ROJUAp+LPSX2/BG8+tLNSI/CY7FJSu ROD/pPLk8jtSXiESWvZ05uBgXAoQ4LBJzopFmXyf17Y9qlfziUR6oJ97kRcu8zXYqFAS S0eEOS/pkQl4hOsmtygrZ9iIOVansbsgx/t0syaJcpUCCHeiRDoJV6SJSXwXFbhXndCc wzLRbSKCwgloKgudWzOx3IDjZUAClnBfFM1Pyetf7tC+wsDTPyxBVyAU+reqKgAfUXaJ 8EXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=f1xpTMPS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c4si1066327ilk.86.2021.06.15.06.16.43; Tue, 15 Jun 2021 06:16:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=f1xpTMPS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230352AbhFONSB (ORCPT + 99 others); Tue, 15 Jun 2021 09:18:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:57464 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230283AbhFONSA (ORCPT ); Tue, 15 Jun 2021 09:18:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C568B6145C; Tue, 15 Jun 2021 13:15:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623762956; bh=dchN3E2UTlpS+DwezOC1PTVnurTZSQKkAeFRPW+8iiA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=f1xpTMPSlPEw0DwElXJZkyFAxzSwG9KiNZlM/T5LHSENUOC8h30UsEui3KxzRSNvM eOvh0izsLlEki2UJ5EXWho1nQPt86a9+5eJOlSig4F0uDaIbu1QSX7W+gYx7ZLNSz2 VIs1JsedUoF/xbVsDQut6rf/r/DMXxTSsps+KlRjTgtVYZZp8J1xJjXeGurSaWM/nl nhXGrYC7mZpAEg6mxOIv5a+jnnL3oAjG/NuvnVZ5UypMOXEhA3rGglsgC4QLmNZM9C UtBEKhtT9M2iE2FrufniT+yaxUdJfvTE4I0IedrxNTqv7dTmKmx9q2fACq/qeULNsg iDXZ9CCnavC+A== Date: Tue, 15 Jun 2021 16:15:53 +0300 From: Jarkko Sakkinen To: Shuah Khan Cc: shuah@kernel.org, linux-kselftest@vger.kernel.org, linux-sgx@vger.kernel.org, Reinette Chatre , Dave Hansen , linux-kernel@vger.kernel.org Subject: Re: [PATCH v8 5/5] selftests/sgx: Refine the test enclave to have storage Message-ID: <20210615131553.5y3jssldqc3sv2ge@kernel.org> References: <20210610083021.392269-1-jarkko@kernel.org> <20210610083021.392269-5-jarkko@kernel.org> <20210615131359.zrfvi36sjdpxghzl@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210615131359.zrfvi36sjdpxghzl@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 15, 2021 at 04:14:02PM +0300, Jarkko Sakkinen wrote: > On Mon, Jun 14, 2021 at 02:16:15PM -0600, Shuah Khan wrote: > > On 6/10/21 2:30 AM, Jarkko Sakkinen wrote: > > > Extend the enclave to have two operations: ENCL_OP_PUT and ENCL_OP_GET. > > > ENCL_OP_PUT stores value inside the enclave address space and > > > ENCL_OP_GET reads it. The internal buffer can be later extended to be > > > variable size, and allow reclaimer tests. > > > > > > Signed-off-by: Jarkko Sakkinen > > > --- > > > tools/testing/selftests/sgx/defines.h | 10 ++++ > > > tools/testing/selftests/sgx/main.c | 57 ++++++++++++++++++----- > > > tools/testing/selftests/sgx/test_encl.c | 19 +++++++- > > > tools/testing/selftests/sgx/test_encl.lds | 3 +- > > > 4 files changed, 74 insertions(+), 15 deletions(-) > > > > > > > Test output before applying the series: > > > > TAP version 13 > > 1..1 > > # selftests: sgx: test_sgx > > # Unable to open /dev/sgx_enclave: No such file or directory > > # 1..0 # SKIP cannot load enclaves > > ok 1 selftests: sgx: test_sgx # SKIP > > > > Test output after applying second patch > > > > selftests/sgx: Migrate to kselftest harness > > > > Output changes to the following. It doesn't look like the second > > patch adds any new tests. What is the point in running the tests > > that fail if /dev/sgx_enclave is missing. > > > > Unfortunately this series doesn't have a cover letter that explains > > what this series is doing. I don't like the fact that the test > > output and behavior changes when migrating the test to kselftest > > harness. Shouldn't the output stay the same as in skip the tests > > if /dev/sgx_enclave fails. > > I get what you are saying but actually I do not know how with > fixtures I can skip "the rest" when FIXTURE_SETUP() fails. > > The reason for the output below is that with fixtures for all > tests enclave is initialized for each test case. And it kind of > makes sense because all tests start from the clean expected > state. > > I don't how to do that with zero change in the output. > > The reason to do this change is to make it easy to add more tests, > and return correct status codes to the framework. To add: everything I did I based purely to the existing kernel documentation, following the examples on how to use fixture. /Jarkko