Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1829078lqz; Mon, 1 Apr 2024 20:44:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVNaw3d65yld3fKwV63Qhn9FSr6yWIOUcE2h7kIt5D/iC/ut6hZIR95JEWdQF7rkH3HgatGajyRrN3NeByzcHBLw1DFelRQduzOzzuvuw== X-Google-Smtp-Source: AGHT+IGdncQuX/KCj2xRDcWeOf31CEmtBdSS6qmVQdLhNqCvZ2qh49Q5yNewJ3k0Q9jMl0NRML0y X-Received: by 2002:a05:6a00:3d12:b0:6ea:ed70:46b4 with SMTP id lo18-20020a056a003d1200b006eaed7046b4mr11704085pfb.29.1712029465958; Mon, 01 Apr 2024 20:44:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712029465; cv=pass; d=google.com; s=arc-20160816; b=tTC4wdRtPceMGkfb5eZdu8X9epqiyP2kAb85xOljHFu5gDXG3PG4atF0btAzlka2Xz cfMNC0vg3Uvv+/JX5y/GLu6qat8vCT0DwXDu94l1mIOLV445HdWayinFlI2eAq/CIjkw Db26Tu6DCv6ljGy4SjwzqaYG2F/6SidgMPm3eTFBvB4OZdczqkNRUZzliXsPyGHgYDIy lf9BZYw7Ob/SZEcE0rHli5+tSfVsspothAhj9w85Bzz8aA7rGwVJViroJhXa0hbi2yO6 4XDzmGpMj468v40u9E9dntTWqPVvTbTcC+geP8Sz4A6nVn4ezEzMUXSUwISYl/KrIEj2 joXw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:message-id:organization:from :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:references:subject:cc:to :dkim-signature; bh=oBDw9oPLX0NMZ4cqVZqOCaNwCXcTjQ4ERiWFST5/5As=; fh=WUU5hqD/rTrK0E8O/N1MxHdsWAsTsHbrbPMMiUSj/NU=; b=tBxvx8BmpRdDNGW2SNKFD6WcU0k8krUEmQsZekCZ6UOmrBYim8PmxlJfZAZNUgXY7j qlNAqYiFMkVCMTXRjQ3jbXgonVyAiKA+n7xhRHkLTLVibbQvylqbGAZ9KFz/jFZ69+7k mTz7TJQLyhWY8z8Aax9vGoR89wLtatgieQB45UxhOwka91OKcgsrSJK08s6cZDs2Hhc6 Kx5K/3nJzOEkqmCMnBFr344wO8a35DicnIV2JPuudA3ghiP6QRtr89V+gFmCPkpVWJy+ QgJGyqzEKBT3Ysm9yEnGwoMRFYOpZELUSZalmNU2W2zKkKi9QQdQvCPP7GvAS93IlcDr FwTA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=A34oIFey; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-127151-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127151-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id h16-20020a631210000000b005ee3cfc0a24si10413318pgl.43.2024.04.01.20.44.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 20:44:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-127151-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=A34oIFey; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-127151-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127151-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E86C3283360 for ; Mon, 1 Apr 2024 22:55:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 554BE56B64; Mon, 1 Apr 2024 22:55:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="A34oIFey" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 93BDA33982; Mon, 1 Apr 2024 22:55:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712012110; cv=none; b=leP6AQYPq/TPbDgmGaiJL1Aaiya+hK0xDTGsoMUJ62SYlFT/gEvEv4w/2pDAANQAcbFk2Xgmf8CEz5kyMgCmORMH2CRjbaGxrk4Tr79nFFnAJ4er81iVz7k/E/v7c9WQf25BmnJA79dWz8LhHcXT9W0eHlQ/viFoESDCaq5PCvw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712012110; c=relaxed/simple; bh=30gWJyaHRF80+3efAwmOoPWr9DWWUI7WAK4YaLcCZOc=; h=Content-Type:To:Cc:Subject:References:Date:MIME-Version:From: Message-ID:In-Reply-To; b=X1uhAzzBpZXNqFMZ9oCTJFNFJF6dujSNMWCEc1fuC4uwvXZMKCxQy0+xgAGKaJKsH4a2pjt+wUKSEgzoRQ5M9+6GgN6GoruYF/k0Y+QCHAKDcr8MleYVPTGl5O1m8WJIxFyg/4QLapbSHWOt+B/mXYqw3dv1Z0JpJJpt7j99OOk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=A34oIFey; arc=none smtp.client-ip=198.175.65.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712012109; x=1743548109; h=to:cc:subject:references:date:mime-version: content-transfer-encoding:from:message-id:in-reply-to; bh=30gWJyaHRF80+3efAwmOoPWr9DWWUI7WAK4YaLcCZOc=; b=A34oIFeyZyz1OurneqWBAsyCjROWBzwO+9F7mhd+8F1U0Gu5wuQwLixV uxbcdxUZ1+vN3oiLIXBz8si5gK0fKhpu/NUPGzZnUogTl7ub0Tns6liEw hZCx5Dw7HvEY75f77VZ9sKynBwYJrGXjdVABCVlfC6Zako6JBCs/bRD/F Jaf+GI65ofsf0CGLY/+TeZgBUq/xl0CtA0Xt06KX8+hBRBreFMVwwAEvz Bp28JuUGiZpX5+7equuiID4LcxRpK6fhP0VKB2tOlo/AtD33KHccZeXHd Gv+CXIqHiWm6VCXrFfDRx+aMjW6WEhgH7IUMB8V/n3XtavyGBxJ9TJZDn w==; X-CSE-ConnectionGUID: JEayBrwWQjavic3XzCdT8g== X-CSE-MsgGUID: letfgcqiT0aLQUntDZf+QQ== X-IronPort-AV: E=McAfee;i="6600,9927,11031"; a="7058405" X-IronPort-AV: E=Sophos;i="6.07,173,1708416000"; d="scan'208";a="7058405" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2024 15:55:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,173,1708416000"; d="scan'208";a="18321991" Received: from hhuan26-mobl.amr.corp.intel.com ([10.92.17.168]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 01 Apr 2024 15:55:06 -0700 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes To: "Jarkko Sakkinen" Cc: anakrish@microsoft.com, bp@alien8.de, cgroups@vger.kernel.org, chrisyan@microsoft.com, dave.hansen@linux.intel.com, hpa@zytor.com, kai.huang@intel.com, kristen@linux.intel.com, linux-kernel@vger.kernel.org, linux-sgx@vger.kernel.org, mikko.ylinen@linux.intel.com, mingo@redhat.com, mkoutny@suse.com, seanjc@google.com, sohil.mehta@intel.com, tglx@linutronix.de, tim.c.chen@linux.intel.com, tj@kernel.org, x86@kernel.org, yangjie@microsoft.com, zhanb@microsoft.com, zhiquan1.li@intel.com Subject: Re: [PATCH] selftests/sgx: Improve cgroup test scripts References: <20240331174442.51019-1-haitao.huang@linux.intel.com> Date: Mon, 01 Apr 2024 17:55:02 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Haitao Huang" Organization: Intel Message-ID: In-Reply-To: User-Agent: Opera Mail/1.0 (Win32) On Mon, 01 Apr 2024 09:22:21 -0500, Jarkko Sakkinen wrote: > On Sun Mar 31, 2024 at 8:44 PM EEST, Haitao Huang wrote: >> Make cgroup test scripts ash compatible. >> Remove cg-tools dependency. >> Add documentation for functions. >> >> Tested with busybox on Ubuntu. >> >> Signed-off-by: Haitao Huang > > I'll run this next week on good old NUC7. Thank you. > > I really wish that either (hopefully both) Intel or AMD would bring up > for developers home use meant platform to develop on TDX and SNP. It is > a shame that the latest and greatest is from 2018. > > BR, Jarkko > Argh, missed a few changes for v2 cgroup: --- a/tools/testing/selftests/sgx/run_epc_cg_selftests.sh +++ b/tools/testing/selftests/sgx/run_epc_cg_selftests.sh @@ -15,6 +15,8 @@ CG_MEM_ROOT=/sys/fs/cgroup CG_V1=0 if [ ! -d "/sys/fs/cgroup/misc" ]; then echo "# cgroup V2 is in use." + echo "+misc" > $CG_MISC_ROOT/cgroup.subtree_control + echo "+memory" > $CG_MEM_ROOT/cgroup.subtree_control else echo "# cgroup V1 is in use." CG_MISC_ROOT=/sys/fs/cgroup/misc @@ -26,6 +28,11 @@ mkdir -p $CG_MISC_ROOT/$TEST_CG_SUB2 mkdir -p $CG_MISC_ROOT/$TEST_CG_SUB3 mkdir -p $CG_MISC_ROOT/$TEST_CG_SUB4 +if [ $CG_V1 -eq 0 ]; then +echo "+misc" > $CG_MISC_ROOT/$TEST_ROOT_CG/cgroup.subtree_control +echo "+misc" > $CG_MISC_ROOT/$TEST_CG_SUB1/cgroup.subtree_control +fi