From patchwork Wed Feb 15 13:05:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 653847 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43FE9C636D4 for ; Wed, 15 Feb 2023 13:06:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233950AbjBONG3 (ORCPT ); Wed, 15 Feb 2023 08:06:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234037AbjBONG1 (ORCPT ); Wed, 15 Feb 2023 08:06:27 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6AD538B4D; Wed, 15 Feb 2023 05:06:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676466386; x=1708002386; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Qn//9IBm5Kac9zEBQzEQS4jENOC77V8ts13HcmG10h0=; b=FJYLqX7L1ASRhBvDcgzvrIHms/65ar9D4R5WvRizu2+wAhNTR8Sv1f3V 5mgYHb+4X+3koKI3cib9DKmTZpqKRqjrU3Z64SmXdgF4QTbrpUcqfsre9 Lk0pjQf20NWHRqFMMmJVD7iCy8UrGHqiK/VEAKnFEx2keN/ofuKG/KGdz 51yM1QCSS1tBvONq+dTlh7Lyr+2V2scI31KSnZs2cGm3PlGFE9Llmr7++ wWCiA/Z0KvKfnAAfIE3FlBb8riEUR1iqk0P/HhsOE/DHXc20VAGTQJVcI PJTEepshmIxKmfnQbzI9bw3Ws941KMPAnVVY0xd90Q8G+1opGT29YF/5j A==; X-IronPort-AV: E=McAfee;i="6500,9779,10621"; a="319456252" X-IronPort-AV: E=Sophos;i="5.97,299,1669104000"; d="scan'208";a="319456252" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2023 05:06:26 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10621"; a="812436033" X-IronPort-AV: E=Sophos;i="5.97,299,1669104000"; d="scan'208";a="812436033" Received: from hshannan-mobl1.ger.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.252.49.120]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2023 05:06:24 -0800 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Reinette Chatre , Fenghua Yu , Shuah Khan Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH v2 2/9] selftests/resctrl: Move ->setup() call outside of test specific branches Date: Wed, 15 Feb 2023 15:05:58 +0200 Message-Id: <20230215130605.31583-3-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230215130605.31583-1-ilpo.jarvinen@linux.intel.com> References: <20230215130605.31583-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org resctrl_val() function is called only by MBM, MBA, and CMT tests which means the else branch is never used. Both test branches call param->setup(). Remove the unused else branch and place the ->setup() call outside of the test specific branches reducing code duplication. Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Signed-off-by: Ilpo Järvinen Reviewed-by: Reinette Chatre --- tools/testing/selftests/resctrl/resctrl_val.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/tools/testing/selftests/resctrl/resctrl_val.c b/tools/testing/selftests/resctrl/resctrl_val.c index b32b96356ec7..787546a52849 100644 --- a/tools/testing/selftests/resctrl/resctrl_val.c +++ b/tools/testing/selftests/resctrl/resctrl_val.c @@ -734,29 +734,22 @@ int resctrl_val(char **benchmark_cmd, struct resctrl_val_param *param) /* Test runs until the callback setup() tells the test to stop. */ while (1) { + ret = param->setup(1, param); + if (ret) { + ret = 0; + break; + } + if (!strncmp(resctrl_val, MBM_STR, sizeof(MBM_STR)) || !strncmp(resctrl_val, MBA_STR, sizeof(MBA_STR))) { - ret = param->setup(1, param); - if (ret) { - ret = 0; - break; - } - ret = measure_vals(param, &bw_resc_start); if (ret) break; } else if (!strncmp(resctrl_val, CMT_STR, sizeof(CMT_STR))) { - ret = param->setup(1, param); - if (ret) { - ret = 0; - break; - } sleep(1); ret = measure_cache_vals(param, bm_pid); if (ret) break; - } else { - break; } } From patchwork Wed Feb 15 13:06:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 653846 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0EDC4C6379F for ; Wed, 15 Feb 2023 13:06:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234051AbjBONGl (ORCPT ); Wed, 15 Feb 2023 08:06:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234106AbjBONGh (ORCPT ); Wed, 15 Feb 2023 08:06:37 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54F2738B56; Wed, 15 Feb 2023 05:06:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676466393; x=1708002393; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4x8SNti8bzuAAFLkH7pvwnNAsALE/29/ahp/VHLzAMg=; b=LSZNhPqQ7oRTtDVKW6sPfLMOcuC3amyGCJ8Ptm0L3H82yum/AJf15icI LMP/XiPXDNRw/WubMxsZ0ww983vz8bb/uaq+ZsazVZMJnYSmkrHZlUsjf U1hbrZbKawOQO3yGleMjSMED7RAd5q/cM2fITb3EICt7t/7BQrTWMIbgg NYvqPVQCbsgLhjIrYS+jOEjqDte6MCaMSY+dFoajqxtQlyGX93joqfWTg ffYIU+tTKNe15EiiWbTZiIt0b8aaUZnerXo1EWoln31pjTaHHch3YA5ES HMyNwVWGhgerCK2wVYRVKvXgFSj22rs/Ns7uiNd5+ZPfaUaxc+AQ4FQMb g==; X-IronPort-AV: E=McAfee;i="6500,9779,10621"; a="319456268" X-IronPort-AV: E=Sophos;i="5.97,299,1669104000"; d="scan'208";a="319456268" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2023 05:06:33 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10621"; a="812436060" X-IronPort-AV: E=Sophos;i="5.97,299,1669104000"; d="scan'208";a="812436060" Received: from hshannan-mobl1.ger.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.252.49.120]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2023 05:06:30 -0800 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Reinette Chatre , Fenghua Yu , Shuah Khan , Babu Moger , Sai Praneeth Prakhya Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH v2 4/9] selftests/resctrl: Check for return value after write_schemata() Date: Wed, 15 Feb 2023 15:06:00 +0200 Message-Id: <20230215130605.31583-5-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230215130605.31583-1-ilpo.jarvinen@linux.intel.com> References: <20230215130605.31583-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org MBA test case writes schemata but it does not check if the write is successful or not. Add the error check and return error properly. Fixes: 01fee6b4d1f9 ("selftests/resctrl: Add MBA test") Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Signed-off-by: Ilpo Järvinen Reviewed-by: Reinette Chatre --- tools/testing/selftests/resctrl/mba_test.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/resctrl/mba_test.c b/tools/testing/selftests/resctrl/mba_test.c index f32289ae17ae..97dc98c0c949 100644 --- a/tools/testing/selftests/resctrl/mba_test.c +++ b/tools/testing/selftests/resctrl/mba_test.c @@ -28,6 +28,7 @@ static int mba_setup(int num, ...) struct resctrl_val_param *p; char allocation_str[64]; va_list param; + int ret; va_start(param, num); p = va_arg(param, struct resctrl_val_param *); @@ -45,7 +46,11 @@ static int mba_setup(int num, ...) sprintf(allocation_str, "%d", allocation); - write_schemata(p->ctrlgrp, allocation_str, p->cpu_no, p->resctrl_val); + ret = write_schemata(p->ctrlgrp, allocation_str, p->cpu_no, + p->resctrl_val); + if (ret < 0) + return ret; + allocation -= ALLOCATION_STEP; return 0; From patchwork Wed Feb 15 13:06:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 653845 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD4DAC636CC for ; Wed, 15 Feb 2023 13:07:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234117AbjBONG6 (ORCPT ); Wed, 15 Feb 2023 08:06:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234103AbjBONGw (ORCPT ); Wed, 15 Feb 2023 08:06:52 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EBA438B66; Wed, 15 Feb 2023 05:06:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676466399; x=1708002399; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TiJbClLs47EPNPKSTZyf82H5dlzHWOIydhuXM2If5tk=; b=erLBOpL4ZmQYfwjDYmetqH4ESwiyoA93pkjFsYPAOQ5x8n8dxhZAP4ll O8C8V1JbfnImw3YYTn699P6PoC99JV8CBCCdDfueFAEi0/U0JWnMFWBun hzEQ84sRlDKsrYV6u8hREL3hJathIyKYdhkJEncCswBQkStPCKs+0eCPE JC226xhxeH6DYWY9r6VjjCKHvBqCiw9OJci5fpb+87ouvJv4Y5BQlFG0K YLmz24YvFWU8QlQqChlBeLry+F/3HpKhepi1Nptlv5w8hjcbcMooEEvBx o/qhAoldJxQ1lYO2P4uB2bpJUSLk/3uwAhYupyRNvh7VlpEsiHUZP6wPd w==; X-IronPort-AV: E=McAfee;i="6500,9779,10621"; a="319456292" X-IronPort-AV: E=Sophos;i="5.97,299,1669104000"; d="scan'208";a="319456292" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2023 05:06:39 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10621"; a="812436083" X-IronPort-AV: E=Sophos;i="5.97,299,1669104000"; d="scan'208";a="812436083" Received: from hshannan-mobl1.ger.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.252.49.120]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2023 05:06:37 -0800 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Reinette Chatre , Fenghua Yu , Shuah Khan Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH v2 6/9] selftests/resctrl: Change initialize_llc_perf() return type to void Date: Wed, 15 Feb 2023 15:06:02 +0200 Message-Id: <20230215130605.31583-7-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230215130605.31583-1-ilpo.jarvinen@linux.intel.com> References: <20230215130605.31583-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org initialize_llc_perf() unconditionally returns 0. initialize_llc_perf() performs only memory initialization, none of which can fail. Change the return type from int to void to accurately reflect that its return value doesn't need to be checked. Remove the error checking from the only callsite. Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Signed-off-by: Ilpo Järvinen Reviewed-by: Reinette Chatre --- tools/testing/selftests/resctrl/cache.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/tools/testing/selftests/resctrl/cache.c b/tools/testing/selftests/resctrl/cache.c index 0485863a169f..585186c874dc 100644 --- a/tools/testing/selftests/resctrl/cache.c +++ b/tools/testing/selftests/resctrl/cache.c @@ -48,7 +48,7 @@ static int perf_event_open_llc_miss(pid_t pid, int cpu_no) return 0; } -static int initialize_llc_perf(void) +static void initialize_llc_perf(void) { memset(&pea_llc_miss, 0, sizeof(struct perf_event_attr)); memset(&rf_cqm, 0, sizeof(struct read_format)); @@ -59,8 +59,6 @@ static int initialize_llc_perf(void) pea_llc_miss.config = PERF_COUNT_HW_CACHE_MISSES; rf_cqm.nr = 1; - - return 0; } static int reset_enable_llc_perf(pid_t pid, int cpu_no) @@ -234,11 +232,8 @@ int cat_val(struct resctrl_val_param *param) if (ret) return ret; - if (!strncmp(resctrl_val, CAT_STR, sizeof(CAT_STR))) { - ret = initialize_llc_perf(); - if (ret) - return ret; - } + if (!strncmp(resctrl_val, CAT_STR, sizeof(CAT_STR))) + initialize_llc_perf(); /* Test runs until the callback setup() tells the test to stop. */ while (1) { From patchwork Wed Feb 15 13:06:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 653844 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99124C636CC for ; Wed, 15 Feb 2023 13:07:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234098AbjBONHN (ORCPT ); Wed, 15 Feb 2023 08:07:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234133AbjBONHD (ORCPT ); Wed, 15 Feb 2023 08:07:03 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71D2B392A0; Wed, 15 Feb 2023 05:06:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676466406; x=1708002406; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Rbo6pbyWbXZwebkS7BOf6e5/MHJ+u2ASUXfLqvQcmlA=; b=kEjPQe4iPiSiRMDjdgTjNDOG6OZZqPXGYSc1bl14ISwicuSd+2f8/Ck1 KtH8/QNL0p6OqIB4AUayWoIK92kWEHgrTiVoU6qefOwox622hOVbD7V9s eyJ3AEN6BQVc/3mJz6Sw4zTP+4JNjdsrPM+/nZPb0CoFYMzp1tpL9lgOt urVI3av/oY3pqvWQSH20wiDNIl1/St/AywNYba6bTXA6CpDcmIYLBBcHu pz9SL21v+SRH34NgOT8hSCZhy/eha19oohtBfPH6dCL84zkMNcCraICx6 EfZxT8BC6M3UMoHs74gHj8tDmUc+MyIOoBEwGrF8t1TrqKeaQf1Bk6s5q A==; X-IronPort-AV: E=McAfee;i="6500,9779,10621"; a="319456342" X-IronPort-AV: E=Sophos;i="5.97,299,1669104000"; d="scan'208";a="319456342" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2023 05:06:45 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10621"; a="812436105" X-IronPort-AV: E=Sophos;i="5.97,299,1669104000"; d="scan'208";a="812436105" Received: from hshannan-mobl1.ger.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.252.49.120]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2023 05:06:43 -0800 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Reinette Chatre , Fenghua Yu , Shuah Khan Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH v2 8/9] selftests/resctrl: Use remount_resctrlfs() consistently with boolean Date: Wed, 15 Feb 2023 15:06:04 +0200 Message-Id: <20230215130605.31583-9-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230215130605.31583-1-ilpo.jarvinen@linux.intel.com> References: <20230215130605.31583-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org remount_resctrlfs() accepts a boolean value as an argument. Some tests pass 0/1 and some tests pass true/false. Make all the callers of remount_resctrlfs() use true/false so that the parameter usage is consistent across tests. Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Signed-off-by: Ilpo Järvinen Reviewed-by: Reinette Chatre --- tools/testing/selftests/resctrl/cat_test.c | 2 +- tools/testing/selftests/resctrl/cmt_test.c | 7 +++---- tools/testing/selftests/resctrl/mba_test.c | 2 +- tools/testing/selftests/resctrl/mbm_test.c | 2 +- tools/testing/selftests/resctrl/resctrl.h | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/tools/testing/selftests/resctrl/cat_test.c b/tools/testing/selftests/resctrl/cat_test.c index 2d3c7c77ab6c..08070d4fa735 100644 --- a/tools/testing/selftests/resctrl/cat_test.c +++ b/tools/testing/selftests/resctrl/cat_test.c @@ -145,7 +145,7 @@ int cat_perf_miss_val(int cpu_no, int n, char *cache_type) struct resctrl_val_param param = { .resctrl_val = CAT_STR, .cpu_no = cpu_no, - .mum_resctrlfs = 0, + .mum_resctrlfs = false, .setup = cat_setup, }; diff --git a/tools/testing/selftests/resctrl/cmt_test.c b/tools/testing/selftests/resctrl/cmt_test.c index 3b0454e7fc82..47cde5c02b7f 100644 --- a/tools/testing/selftests/resctrl/cmt_test.c +++ b/tools/testing/selftests/resctrl/cmt_test.c @@ -82,12 +82,11 @@ void cmt_test_cleanup(void) int cmt_resctrl_val(int cpu_no, int n, char **benchmark_cmd) { - int ret, mum_resctrlfs; + int ret; cache_size = 0; - mum_resctrlfs = 1; - ret = remount_resctrlfs(mum_resctrlfs); + ret = remount_resctrlfs(true); if (ret) return ret; @@ -118,7 +117,7 @@ int cmt_resctrl_val(int cpu_no, int n, char **benchmark_cmd) .ctrlgrp = "c1", .mongrp = "m1", .cpu_no = cpu_no, - .mum_resctrlfs = 0, + .mum_resctrlfs = false, .filename = RESULT_FILE_NAME, .mask = ~(long_mask << n) & long_mask, .span = cache_size * n / count_of_bits, diff --git a/tools/testing/selftests/resctrl/mba_test.c b/tools/testing/selftests/resctrl/mba_test.c index 97dc98c0c949..7defb32ad0de 100644 --- a/tools/testing/selftests/resctrl/mba_test.c +++ b/tools/testing/selftests/resctrl/mba_test.c @@ -154,7 +154,7 @@ int mba_schemata_change(int cpu_no, char *bw_report, char **benchmark_cmd) .ctrlgrp = "c1", .mongrp = "m1", .cpu_no = cpu_no, - .mum_resctrlfs = 1, + .mum_resctrlfs = true, .filename = RESULT_FILE_NAME, .bw_report = bw_report, .setup = mba_setup diff --git a/tools/testing/selftests/resctrl/mbm_test.c b/tools/testing/selftests/resctrl/mbm_test.c index 280187628054..c9dfa54af42f 100644 --- a/tools/testing/selftests/resctrl/mbm_test.c +++ b/tools/testing/selftests/resctrl/mbm_test.c @@ -122,7 +122,7 @@ int mbm_bw_change(int span, int cpu_no, char *bw_report, char **benchmark_cmd) .mongrp = "m1", .span = span, .cpu_no = cpu_no, - .mum_resctrlfs = 1, + .mum_resctrlfs = true, .filename = RESULT_FILE_NAME, .bw_report = bw_report, .setup = mbm_setup diff --git a/tools/testing/selftests/resctrl/resctrl.h b/tools/testing/selftests/resctrl/resctrl.h index 20aaa7c0e784..9555a6f683f7 100644 --- a/tools/testing/selftests/resctrl/resctrl.h +++ b/tools/testing/selftests/resctrl/resctrl.h @@ -64,7 +64,7 @@ struct resctrl_val_param { char mongrp[64]; int cpu_no; unsigned long span; - int mum_resctrlfs; + bool mum_resctrlfs; char filename[64]; char *bw_report; unsigned long mask;