Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2777777lqz; Wed, 3 Apr 2024 08:20:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU1o+nIkBQ+PijMWMieDUzofcTCuEQq5CaOu4u/F+t1QZtIT0LKETJ+65ngkfXTuRVhr6EZUChPujlzTHsW4Re8j7ncOdpl9h1/gHQXzA== X-Google-Smtp-Source: AGHT+IH/waTvkWkF936oKSod1ovC48BedJCI503fyX1pps7O7oU8Bn7nAz2zBba8V/P4sWGmggUu X-Received: by 2002:a05:6808:1a86:b0:3c4:f78b:f6c4 with SMTP id bm6-20020a0568081a8600b003c4f78bf6c4mr2504558oib.35.1712157638696; Wed, 03 Apr 2024 08:20:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712157638; cv=pass; d=google.com; s=arc-20160816; b=UQizDCXL2en4KOB2Q/x2RPeSr1K5wDRQUU64Yn6NdRFCqaP+omfQQhW8QYG7P9m2rU BpaQbk2wUs8XEzD2lcqqammiUAl90eedrJilZwNpiOgzErsuV7rUbDFgUx+A69Wtm7Qi myz7yPby1NhjibYBWOaHb0AmjyGWLCtlaMJ5LSESWkFMiUMp0Jq0Fa2Xx17SZPbcNisB 2u9ro0FVgJAAaXU8bunvU5dUn2p05KyqI/IjQkg1AtzBOl1AJRbaCr3mKGNi2w66KkGV 0zO2gjJeNrNYRUgeQlLAJBDF4NtMK4K4N6P+Lt8Qu3D+CuFhU7NMnXbc6VdFfVpfF2/E PzvQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:from:subject:cc:to:message-id:date :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=VEZkyRR+TgD1sWVzczM0fQIUGrrt9TMxuCcrpEPcuzU=; fh=mwf4Tk/2IWk6+X4xfBHQJSr7RHbLtyadFfbK4I0+aN0=; b=vRNpw0yEZgsuM5+BNmeewhIJ7GcedtRzoAh1aZYLM0A1RpIBKELcBHxnNFhtfiPJpt uwpYzrxjc3azFncMDrJCM2XrNQqcGFnkCNVIfBSbNU6YcId4BmxhbTbxqzMtXE03xJrG Jp+9EaMhnry8TY7iIkXibdR6AGWJZRiOtsBnunws279tHmpeYSKQQjXPl3bz8ro5SWLJ HIlyikQz8qMRxxmQOTjlq8bA7AjC7/WAXAyPITbZY1axCbtBILhqxSoaXBDIYXViZe3P m34QFvADPFsJWeXIDHLRHmYUuM+nxAwdLe/f2wPboXgcKj1VmpyyX/IxwNAjF+OwAQP7 +w3g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Nm0Ybv9G; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-130077-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130077-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id y2-20020a05620a25c200b00789fdd09e15si14476122qko.444.2024.04.03.08.20.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 08:20:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130077-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Nm0Ybv9G; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-130077-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130077-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 68E2E1C20AFB for ; Wed, 3 Apr 2024 15:20:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D0DDC14D426; Wed, 3 Apr 2024 15:16:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Nm0Ybv9G" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED59426292; Wed, 3 Apr 2024 15:16:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712157376; cv=none; b=LFdBtmH2Aasco3G8YtTRb1bNNKJ7ewBS8MuE9kVQDpGbJhwJUp0S78sRtxh/QaHVsfcbXN1SePd2Hoss4V5ur2hogNxqw4435MwJlh63Jbs5KfrwMnrjW8faY266B51vX62oYnDlqtiXk0szczfLnucQgryzQLU7hw1sIF+0Zt8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712157376; c=relaxed/simple; bh=z3lQD5lgMachfwYyNrVW8WJbO2hEjtLyQulbSy5ojU0=; h=Mime-Version:Content-Type:Date:Message-Id:To:Cc:Subject:From: References:In-Reply-To; b=DYlKycI1y45RrXS7BT6oeGRRJoVB6yMRWA9YObiPIPSZZgwcFXB4AdBLM/6DnN+2QsMvm3GHBtcpfk7wjp5wPyeDAKNzP7nDN9PT3wZ2Yg/UQgEIDnv435OHGfnOVT9LYJNknLM0HHecTwhLapArQX+YzQFcSnoXHX91BaQk+r4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Nm0Ybv9G; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBF34C433C7; Wed, 3 Apr 2024 15:16:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712157375; bh=z3lQD5lgMachfwYyNrVW8WJbO2hEjtLyQulbSy5ojU0=; h=Date:To:Cc:Subject:From:References:In-Reply-To:From; b=Nm0Ybv9GSWZkkgEyiuULaleJd2ST6xA9OgSewczf9SKZakwdUVS3HboknHyllu8MF kFWTjqejWXJP5RVnNMHDah5KRw5glDItlYj6dxIHJhrAPxzGUfV5hFZ2wROKzcXdco /6V6VTQqeYAtpQsjsbW8/rZd8ucVXgjwUEleGnhAVreBRcNBT9XjaB8W+JCwh1lC57 ndzmd97Xo/T2tZ3OwqWvn24On1MYKNGFXjQTzcu3PLTEk3fq2W7ZuZFSwGUuevTZQs RZLLShcGwPfNq+Cm1oXQSmPikS9CYW6NsME3Kl7vUXUlIMa2oB+D6Jq+hpAWgSt6T1 CYBrKO5DCVIjA== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 03 Apr 2024 18:16:09 +0300 Message-Id: To: "Dave Hansen" , "Haitao Huang" , , , , , , , , , , , , , Cc: , , , , , , , Subject: Re: [PATCH v9 15/15] selftests/sgx: Add scripts for EPC cgroup testing From: "Jarkko Sakkinen" X-Mailer: aerc 0.17.0 References: <20240205210638.157741-1-haitao.huang@linux.intel.com> <20240205210638.157741-16-haitao.huang@linux.intel.com> <4be7b291010973c203ed8c7bcd25b626c1290231.camel@kernel.org> <18e84d04-0b75-4188-a94d-6b033f4edbf0@intel.com> In-Reply-To: <18e84d04-0b75-4188-a94d-6b033f4edbf0@intel.com> On Tue Apr 2, 2024 at 6:42 PM EEST, Dave Hansen wrote: > On 3/30/24 04:23, Jarkko Sakkinen wrote: > >>> I also wonder is cgroup-tools dependency absolutely required or could > >>> you just have a function that would interact with sysfs? > >> I should have checked email before hit the send button for v10 =F0=9F= =99=82. > >> > >> It'd be more complicated and less readable to do all the stuff without= the =20 > >> cgroup-tools, esp cgexec. I checked dependency, cgroup-tools only depe= nds =20 > >> on libc so I hope this would not cause too much inconvenience. > > As per cgroup-tools, please prove this. It makes the job for more > > complicated *for you* and you are making the job more complicated > > to every possible person in the planet running any kernel QA. > > I don't see any other use of cgroup-tools in testing/selftests. > > I *DO* see a ton of /bin/bash use though. I wouldn't go to much trouble > to make the thing ash-compatible. > > That said, the most important thing is to get some selftests in place. > If using cgroup-tools means we get actual, runnable tests in place, > that's a heck of a lot more important than making them perfect. > Remember, almost nobody uses SGX. It's available on *VERY* few systems > from one CPU vendor and only in very specific hardware configurations. Ash-compatible is good enough for me, so let's draw the line there. Ash-compatibility does not cause any major hurdle as can we seen from Haitao's patch. Earlier version was not even POSIX-compatible, given that it used hard-coded path. Most of the added stuff come open coding the tools but in the test code that is not the big deal, and helps with debugging in the future. Even right now it helps reviewing kernel patches because it documents exactly how the feature is seen from user space. BR, Jarkko