From patchwork Tue Nov 1 09:43:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaopeng Tan X-Patchwork-Id: 13601 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2857455wru; Tue, 1 Nov 2022 03:03:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5glb2KV7x6Tp8RbHLHciqIXLbKat830owPvVUIza57ITWP0p++IK+mpyknSflUbUdb7fJk X-Received: by 2002:a63:1612:0:b0:461:4180:d88b with SMTP id w18-20020a631612000000b004614180d88bmr16934971pgl.434.1667296991274; Tue, 01 Nov 2022 03:03:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667296991; cv=none; d=google.com; s=arc-20160816; b=Kugc94NN0Ll0zRUT90PyNcEtLKKWwpms8bvlbBFvUEUV/EuVRDSYoHtjGxBzzq8x09 G4+Gs2lK7mcwaStTxmQtcqZmEL3tj60CYfoZb64J/nlKm7NyRFLKYIdtrZkhB6/wj18O na3U6a2tGCqeDgVZmz5yRfwT6ilFPOByT/Fz1pYsYr0Asc4/uh60KpDrBWWSSwGqv0ti /Rz4AhUJlvi4BDjdXe7Q3b8JcZ9Waxk20rOb1AoTx6xdd3x4guYaKZEhgOXl1JCb/2wI Iijs2yObZnPlLA5gVjjdyrtDTFJ413Nu28mCengwWAZtD6vEA9VeZVE3M9GfaMt6Pdqp 6LLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=XR0la8Maw0mpuL+rwmSxqIZtl2xv4GJkKNyP6gp2N8g=; b=zr4AafJZ8ofAKeSJbPB+Cf1zERxsTlVC8QjQnYC2CZVYUjzuHjrAVwqRNhwDZbLXkG TdsQ+SEz6Ra/B9g55zD4yKiCXKcjY9amXAwm8WK5PmclTB4+I2apdm8XG/lWqcrqsxDS JT+TMN2t2q+LkpmWbYTWmh7zwKfvf1HFgz01DqyMZ6bXY6u+f490URlZC0v+OxoTOZhp 2BXwbX++RO4CqoA1DGI0sE1WkfdAoWCgvvwfswgDgtKrLubPknE0DS5C0o/2Q0VA54lK Rd+Vi5SR1m1S8nRczjn3nR/p3ZvsfoonyYWu569RzzxmaLh35+KZ5jiwAlut62eLhJmF v4Hw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oo4-20020a17090b1c8400b00205f5f70bcdsi12523916pjb.98.2022.11.01.03.02.57; Tue, 01 Nov 2022 03:03:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230387AbiKAJsv (ORCPT + 99 others); Tue, 1 Nov 2022 05:48:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229907AbiKAJss (ORCPT ); Tue, 1 Nov 2022 05:48:48 -0400 Received: from esa12.hc1455-7.c3s2.iphmx.com (esa12.hc1455-7.c3s2.iphmx.com [139.138.37.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91E6011A39; Tue, 1 Nov 2022 02:48:47 -0700 (PDT) X-IronPort-AV: E=McAfee;i="6500,9779,10517"; a="73993957" X-IronPort-AV: E=Sophos;i="5.95,230,1661785200"; d="scan'208";a="73993957" Received: from unknown (HELO yto-r4.gw.nic.fujitsu.com) ([218.44.52.220]) by esa12.hc1455-7.c3s2.iphmx.com with ESMTP; 01 Nov 2022 18:48:45 +0900 Received: from yto-m4.gw.nic.fujitsu.com (yto-nat-yto-m4.gw.nic.fujitsu.com [192.168.83.67]) by yto-r4.gw.nic.fujitsu.com (Postfix) with ESMTP id 339AFD4F62; Tue, 1 Nov 2022 18:48:45 +0900 (JST) Received: from oym-om4.fujitsu.com (oym-om4.o.css.fujitsu.com [10.85.58.164]) by yto-m4.gw.nic.fujitsu.com (Postfix) with ESMTP id 75482E679E; Tue, 1 Nov 2022 18:48:44 +0900 (JST) Received: from cn-r05-10.example.com (n3235113.np.ts.nmh.cs.fujitsu.co.jp [10.123.235.113]) by oym-om4.fujitsu.com (Postfix) with ESMTP id 4D00040164011; Tue, 1 Nov 2022 18:48:44 +0900 (JST) From: Shaopeng Tan To: Fenghua Yu , Reinette Chatre , Shuah Khan Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, tan.shaopeng@jp.fujitsu.com Subject: [PATCH v3 1/5] selftests/resctrl: Fix set up schemata with 100% allocation on first run in MBM test Date: Tue, 1 Nov 2022 18:43:37 +0900 Message-Id: <20221101094341.3383073-2-tan.shaopeng@jp.fujitsu.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221101094341.3383073-1-tan.shaopeng@jp.fujitsu.com> References: <20221101094341.3383073-1-tan.shaopeng@jp.fujitsu.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748287610252897362?= X-GMAIL-MSGID: =?utf-8?q?1748287610252897362?= There is a comment "Set up shemata with 100% allocation on the first run" in function mbm_setup(), but there is an increment bug and the condition "num_of_runs == 0" will never be met and write_schemata() will never be called to set schemata to 100%. Even if write_schemata() is called in MBM test, since it is not supported for MBM test it does not set the schemata. This is currently fine because resctrl_val_parm->mum_resctrlfs is always 1 and umount/mount will be run in each test to set the schemata to 100%. To support the usage when MBM test does not unmount/remount resctrl filesystem before the test starts, fix to call write_schemata() and set schemata properly when the function is called for the first time. Also, remove static local variable 'num_of_runs' because this is not needed as there is resctrl_val_param->num_of_runs which should be used instead like in cat_setup(). Signed-off-by: Shaopeng Tan Reviewed-by: Reinette Chatre --- tools/testing/selftests/resctrl/mbm_test.c | 13 +++++++------ tools/testing/selftests/resctrl/resctrlfs.c | 4 +++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/tools/testing/selftests/resctrl/mbm_test.c b/tools/testing/selftests/resctrl/mbm_test.c index 8392e5c55ed0..6d550f012829 100644 --- a/tools/testing/selftests/resctrl/mbm_test.c +++ b/tools/testing/selftests/resctrl/mbm_test.c @@ -89,23 +89,24 @@ static int check_results(int span) static int mbm_setup(int num, ...) { struct resctrl_val_param *p; - static int num_of_runs; va_list param; int ret = 0; - /* Run NUM_OF_RUNS times */ - if (num_of_runs++ >= NUM_OF_RUNS) - return -1; - va_start(param, num); p = va_arg(param, struct resctrl_val_param *); va_end(param); + /* Run NUM_OF_RUNS times */ + if (p->num_of_runs >= NUM_OF_RUNS) + return -1; + /* Set up shemata with 100% allocation on the first run. */ - if (num_of_runs == 0) + if (p->num_of_runs == 0) ret = write_schemata(p->ctrlgrp, "100", p->cpu_no, p->resctrl_val); + p->num_of_runs++; + return ret; } diff --git a/tools/testing/selftests/resctrl/resctrlfs.c b/tools/testing/selftests/resctrl/resctrlfs.c index 6f543e470ad4..8546bc9f1786 100644 --- a/tools/testing/selftests/resctrl/resctrlfs.c +++ b/tools/testing/selftests/resctrl/resctrlfs.c @@ -498,6 +498,7 @@ int write_schemata(char *ctrlgrp, char *schemata, int cpu_no, char *resctrl_val) FILE *fp; if (strncmp(resctrl_val, MBA_STR, sizeof(MBA_STR)) && + strncmp(resctrl_val, MBM_STR, sizeof(MBM_STR)) && strncmp(resctrl_val, CAT_STR, sizeof(CAT_STR)) && strncmp(resctrl_val, CMT_STR, sizeof(CMT_STR))) return -ENOENT; @@ -523,7 +524,8 @@ int write_schemata(char *ctrlgrp, char *schemata, int cpu_no, char *resctrl_val) if (!strncmp(resctrl_val, CAT_STR, sizeof(CAT_STR)) || !strncmp(resctrl_val, CMT_STR, sizeof(CMT_STR))) sprintf(schema, "%s%d%c%s", "L3:", resource_id, '=', schemata); - if (!strncmp(resctrl_val, MBA_STR, sizeof(MBA_STR))) + if (!strncmp(resctrl_val, MBA_STR, sizeof(MBA_STR)) || + !strncmp(resctrl_val, MBM_STR, sizeof(MBM_STR))) sprintf(schema, "%s%d%c%s", "MB:", resource_id, '=', schemata); fp = fopen(controlgroup, "w"); From patchwork Tue Nov 1 09:43:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaopeng Tan X-Patchwork-Id: 13602 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2857479wru; Tue, 1 Nov 2022 03:03:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5qcdHga2gEJjHMvCmAMdByHM90xNzaszrLWW9ux5t88g6pN/IpYPqV1Uus0TmWmejxm5EQ X-Received: by 2002:a65:4c8e:0:b0:46f:75bb:905a with SMTP id m14-20020a654c8e000000b0046f75bb905amr16154997pgt.495.1667296994731; Tue, 01 Nov 2022 03:03:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667296994; cv=none; d=google.com; s=arc-20160816; b=MI2BSBAS/PCfpdXAbzLyxiWf5ozjGT1QbRfomHoFB+tNAeoas6PlSUd9a+UjJ1E30z wm8qkI20pmTnrWSMne3e0MwOzqBLwZGyGc9XmFu3y+rj4s6JZgYUiyh7wHZvMo2KtEt1 0BLmBL/ThZNhq4LY64+7BodusbgDkL8X7IoDpQitU21MJZfa6cs76tPpLCAza3CcjsdB gdzO9wXfgzZkvYpluFLAopcfqXy7SZJO7IIOUwCKaNs01TH6m7P6s9W/0peHcRc4Phhf zgkeo+QVcDjKiF/IIu8S1J0uj8yFUBb3d7ZmvQOy4Exjkl333nY6jGacETqWgClet8z4 ne8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=4/leZs/yTV2UyGmUZNp1m/SrXznL7PQwsrbEqUOsxD0=; b=0FD+EGIwzhQ6zpKHq75Izbv02cFXfOUCaY2+6c+vKUc9iIjn4b1zlRPXR0q6GZGdZC B0aJC1OHMnKLnGvt5fWEknkfBRiRyOxMrrKZg36U5u5EXsiNQkmdY4pW1TZoOZXSya4j NmmQLY/vyGY5Apqxr6IVNK910YHr5P5HXgCNPQTSItFDjYeR/rPqfvrMTdaQ1qgbt9u3 4+vn/inT4LbhslwlVeOn+EqCO+p1n9o6ggnhnmR6TWxFBkGX0LnpiZ8RJ8aRHfq8AhDh sxX+3jFctbj2Dx6OHBBIImlndEi+hDNwDxc1PmI83LZK5VO1MpI4DMFP+tnqoBLytaOo 8ZaQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e68-20020a636947000000b0046ebcc1c65bsi11634268pgc.739.2022.11.01.03.02.59; Tue, 01 Nov 2022 03:03:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230410AbiKAJsy (ORCPT + 99 others); Tue, 1 Nov 2022 05:48:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230201AbiKAJsu (ORCPT ); Tue, 1 Nov 2022 05:48:50 -0400 Received: from esa1.hc1455-7.c3s2.iphmx.com (esa1.hc1455-7.c3s2.iphmx.com [207.54.90.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8BA6C29; Tue, 1 Nov 2022 02:48:49 -0700 (PDT) X-IronPort-AV: E=McAfee;i="6500,9779,10517"; a="94441000" X-IronPort-AV: E=Sophos;i="5.95,230,1661785200"; d="scan'208";a="94441000" Received: from unknown (HELO oym-r1.gw.nic.fujitsu.com) ([210.162.30.89]) by esa1.hc1455-7.c3s2.iphmx.com with ESMTP; 01 Nov 2022 18:48:47 +0900 Received: from oym-m3.gw.nic.fujitsu.com (oym-nat-oym-m3.gw.nic.fujitsu.com [192.168.87.60]) by oym-r1.gw.nic.fujitsu.com (Postfix) with ESMTP id CBBC4C1388; Tue, 1 Nov 2022 18:48:46 +0900 (JST) Received: from oym-om4.fujitsu.com (oym-om4.o.css.fujitsu.com [10.85.58.164]) by oym-m3.gw.nic.fujitsu.com (Postfix) with ESMTP id 1E858D9490; Tue, 1 Nov 2022 18:48:46 +0900 (JST) Received: from cn-r05-10.example.com (n3235113.np.ts.nmh.cs.fujitsu.co.jp [10.123.235.113]) by oym-om4.fujitsu.com (Postfix) with ESMTP id 02B3F40164011; Tue, 1 Nov 2022 18:48:46 +0900 (JST) From: Shaopeng Tan To: Fenghua Yu , Reinette Chatre , Shuah Khan Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, tan.shaopeng@jp.fujitsu.com Subject: [PATCH v3 2/5] selftests/resctrl: Return MBA check result and make it to output message Date: Tue, 1 Nov 2022 18:43:38 +0900 Message-Id: <20221101094341.3383073-3-tan.shaopeng@jp.fujitsu.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221101094341.3383073-1-tan.shaopeng@jp.fujitsu.com> References: <20221101094341.3383073-1-tan.shaopeng@jp.fujitsu.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748287613348341896?= X-GMAIL-MSGID: =?utf-8?q?1748287613348341896?= Since MBA check result is not returned, the MBA test result message is always output as "ok" regardless of whether the MBA check result is true or false. Make output message to be "not ok" if MBA check result is failed. Reviewed-by: Reinette Chatre Signed-off-by: Shaopeng Tan Reviewed-by: Shuah Khan --- tools/testing/selftests/resctrl/mba_test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/resctrl/mba_test.c b/tools/testing/selftests/resctrl/mba_test.c index 1a1bdb6180cf..5d14802add4d 100644 --- a/tools/testing/selftests/resctrl/mba_test.c +++ b/tools/testing/selftests/resctrl/mba_test.c @@ -51,7 +51,7 @@ static int mba_setup(int num, ...) return 0; } -static void show_mba_info(unsigned long *bw_imc, unsigned long *bw_resc) +static bool show_mba_info(unsigned long *bw_imc, unsigned long *bw_resc) { int allocation, runs; bool failed = false; @@ -97,6 +97,8 @@ static void show_mba_info(unsigned long *bw_imc, unsigned long *bw_resc) failed ? "Fail:" : "Pass:"); if (failed) ksft_print_msg("At least one test failed\n"); + + return failed; } static int check_results(void) @@ -132,9 +134,7 @@ static int check_results(void) fclose(fp); - show_mba_info(bw_imc, bw_resc); - - return 0; + return show_mba_info(bw_imc, bw_resc); } void mba_test_cleanup(void) From patchwork Tue Nov 1 09:43:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaopeng Tan X-Patchwork-Id: 13604 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2857566wru; Tue, 1 Nov 2022 03:03:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4wiPMpLMUQ7FfmKwHn+AMUmM2K6+VZwQwRPj/dJwN9A7kcU5d4lygeLl8WiASI95XxpPXv X-Received: by 2002:a17:902:d4c1:b0:186:e426:ff12 with SMTP id o1-20020a170902d4c100b00186e426ff12mr18551303plg.132.1667297005896; Tue, 01 Nov 2022 03:03:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667297005; cv=none; d=google.com; s=arc-20160816; b=uv+/LL3er8mY+pxgx5xVQfr4e1HlDhWaRSi2e45Pyck0JaZ1gzXQtumEogcMIIF22t 8hle0ezQvJtJ7CHSHXkoF+y6oR+Fe66ePSHKLrpWCI/cR/cxHutnQhvgEQjAGXRRY0aD fnWZrfJSBgSl+kVkRbd5flWB4KjL3Dy5bVEI1ofrQGTCqHb7poYEq22CWe3jWS2vMOaC xHKFg9sCg/wdHggLdlYDj3egn6neuMSGAoIXkoGHjcZa1llBwiU4w1X9J8M699eD6+xY Xu5Pk759EjG+RlBJTWyJRyLB1+ubiSon6u6Fbn9/yg57giJ/yZYMJojhmS8ldn0non9z oGRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=RyWPmAojykGQt+IzVEqpYO7N4CPZzUsUeEYXIHcNqHA=; b=RrskBaZg1xif/k03RtOP4xTWvkuKpr7WS6XfU3sLMfrUY+UPkVtPdNFSEKa7fa4bl3 8yA32Wf9YHXDAqi6qdZDXxxpJa8pxx9lRPplQ2WbjjMr+NodTIGZw9LjPFqpulZC1i6A 9u065gc7fTHBW+WCv5n1mWCRAaqfyRWbO47vhzv7OPZo9DqRCXaL8yY1gdT827AJ9amn fKf6O6+X+2/WX3ZLUl652vqm7NvdQThFBWFQePR0p9+V3LY8Wwjd/Ne58DfhQ7PRMnQX ORMjh29+rT6EdIW8pbsDbwE0EtauRaU70ISidJKizvgQPn8jXP4WqnrCRKeo1bBjcjQR 307g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h6-20020a056a00170600b0056c8da80bfcsi13798344pfc.351.2022.11.01.03.03.12; Tue, 01 Nov 2022 03:03:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230457AbiKAJt0 (ORCPT + 99 others); Tue, 1 Nov 2022 05:49:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229872AbiKAJsx (ORCPT ); Tue, 1 Nov 2022 05:48:53 -0400 Received: from esa2.hc1455-7.c3s2.iphmx.com (esa2.hc1455-7.c3s2.iphmx.com [207.54.90.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 073EF2EA; Tue, 1 Nov 2022 02:48:51 -0700 (PDT) X-IronPort-AV: E=McAfee;i="6500,9779,10517"; a="94348495" X-IronPort-AV: E=Sophos;i="5.95,230,1661785200"; d="scan'208";a="94348495" Received: from unknown (HELO oym-r4.gw.nic.fujitsu.com) ([210.162.30.92]) by esa2.hc1455-7.c3s2.iphmx.com with ESMTP; 01 Nov 2022 18:48:50 +0900 Received: from oym-m4.gw.nic.fujitsu.com (oym-nat-oym-m4.gw.nic.fujitsu.com [192.168.87.61]) by oym-r4.gw.nic.fujitsu.com (Postfix) with ESMTP id 689A810E8C; Tue, 1 Nov 2022 18:48:48 +0900 (JST) Received: from oym-om4.fujitsu.com (oym-om4.o.css.fujitsu.com [10.85.58.164]) by oym-m4.gw.nic.fujitsu.com (Postfix) with ESMTP id 7F1C3D55EB; Tue, 1 Nov 2022 18:48:47 +0900 (JST) Received: from cn-r05-10.example.com (n3235113.np.ts.nmh.cs.fujitsu.co.jp [10.123.235.113]) by oym-om4.fujitsu.com (Postfix) with ESMTP id 6B43940164011; Tue, 1 Nov 2022 18:48:47 +0900 (JST) From: Shaopeng Tan To: Fenghua Yu , Reinette Chatre , Shuah Khan Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, tan.shaopeng@jp.fujitsu.com Subject: [PATCH v3 3/5] selftests/resctrl: Flush stdout file buffer before executing fork() Date: Tue, 1 Nov 2022 18:43:39 +0900 Message-Id: <20221101094341.3383073-4-tan.shaopeng@jp.fujitsu.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221101094341.3383073-1-tan.shaopeng@jp.fujitsu.com> References: <20221101094341.3383073-1-tan.shaopeng@jp.fujitsu.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748287624989902875?= X-GMAIL-MSGID: =?utf-8?q?1748287624989902875?= When a process has buffered output, a child process created by fork() will also copy buffered output. When using kselftest framework, the output (resctrl test result message) will be printed multiple times. Add fflush() to flush out the buffered output before executing fork(). Reviewed-by: Reinette Chatre Signed-off-by: Shaopeng Tan Reviewed-by: Shuah Khan --- tools/testing/selftests/resctrl/cat_test.c | 1 + tools/testing/selftests/resctrl/resctrl_val.c | 1 + tools/testing/selftests/resctrl/resctrlfs.c | 1 + 3 files changed, 3 insertions(+) diff --git a/tools/testing/selftests/resctrl/cat_test.c b/tools/testing/selftests/resctrl/cat_test.c index 1c5e90c63254..6a8306b0a109 100644 --- a/tools/testing/selftests/resctrl/cat_test.c +++ b/tools/testing/selftests/resctrl/cat_test.c @@ -167,6 +167,7 @@ int cat_perf_miss_val(int cpu_no, int n, char *cache_type) return errno; } + fflush(stdout); bm_pid = fork(); /* Set param values for child thread which will be allocated bitmask diff --git a/tools/testing/selftests/resctrl/resctrl_val.c b/tools/testing/selftests/resctrl/resctrl_val.c index b32b96356ec7..6948843bf995 100644 --- a/tools/testing/selftests/resctrl/resctrl_val.c +++ b/tools/testing/selftests/resctrl/resctrl_val.c @@ -629,6 +629,7 @@ int resctrl_val(char **benchmark_cmd, struct resctrl_val_param *param) * Fork to start benchmark, save child's pid so that it can be killed * when needed */ + fflush(stdout); bm_pid = fork(); if (bm_pid == -1) { perror("# Unable to fork"); diff --git a/tools/testing/selftests/resctrl/resctrlfs.c b/tools/testing/selftests/resctrl/resctrlfs.c index 8546bc9f1786..d95688298469 100644 --- a/tools/testing/selftests/resctrl/resctrlfs.c +++ b/tools/testing/selftests/resctrl/resctrlfs.c @@ -678,6 +678,7 @@ int filter_dmesg(void) perror("pipe"); return ret; } + fflush(stdout); pid = fork(); if (pid == 0) { close(pipefds[0]); From patchwork Tue Nov 1 09:43:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaopeng Tan X-Patchwork-Id: 13603 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2857555wru; Tue, 1 Nov 2022 03:03:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4ZPnQ5XI2NMVHZ0BAOWei9Uyb0LsXAO7PReX7ZhoZtkLAazGKMQSO0Mhx0Rljgcdu4EUrx X-Received: by 2002:a17:90a:6286:b0:213:b01e:4290 with SMTP id d6-20020a17090a628600b00213b01e4290mr16859853pjj.42.1667297003399; Tue, 01 Nov 2022 03:03:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667297003; cv=none; d=google.com; s=arc-20160816; b=QpeIU9GkVIBFgrHAuRVQosN1vUWuRCBKt9kF3N8r1U6CYuB42ewnkCYkWjMxLcEmnI X+pNH93UNk787h1qS9WuiB8jAy6kXwVDvBm0VZiWpZfvX1+tLvaRJMxTa0s2oeKZbf/q qTjdneGjYAfQ7a9tUFk4hPVWd9ZVY+kgR0kcIIRdsJ/UAFPWGHo68o3xPRUOOTcAF9bg /ZozTUvDM5+6AhKo10p3iqfkCLcl1ufC/GQmBwau6mfDe76FdYlNRwjDoXPF939+lS2j 51UgsFirEYaVJ3tAbg1vqy8USnH5oetiJCy0TppPZmFM0PnpcjGDCti4uz09H9ESmbX2 gdmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=AshivuVckA6AgOgYrgkyipawQVAgb2gxnFxpsZDs6dw=; b=JMKdN3mbifNQj/smYGfM4SWpXBrRcwCU+3BT7wVqDLbyRdoCzMLuwNDuhWtsfKenNR jZG4fk6HaFGF5yrVB3ysd16WfAH9c2J37n6nlnVKP38QEZyaIGJqOtqar1dt6gs5muF1 9ecoFVIJWrUApJbpHHpEJdi0m9CT7ErVEDq6i2qXfFPhEn7Mclm88cymPZUANfADpdVp hfpJGYXm9HM3ceG725cqwgcx1uOqNUDBr3MwoilJM1T7TPhgivf5IPgQJrJc9UgagPwR 7Uvfxx1hNjHvJavBCGxvuXogMYhMgDdyRSK7lBH17LQoc1LQidWVSbf9qk6sEZ0pQbDI 2LNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v3-20020a622f03000000b0056d8f42a69csi5110166pfv.145.2022.11.01.03.03.10; Tue, 01 Nov 2022 03:03:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230434AbiKAJtY (ORCPT + 99 others); Tue, 1 Nov 2022 05:49:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229907AbiKAJsx (ORCPT ); Tue, 1 Nov 2022 05:48:53 -0400 Received: from esa3.hc1455-7.c3s2.iphmx.com (esa3.hc1455-7.c3s2.iphmx.com [207.54.90.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66F1A19026; Tue, 1 Nov 2022 02:48:52 -0700 (PDT) X-IronPort-AV: E=McAfee;i="6500,9779,10517"; a="94494670" X-IronPort-AV: E=Sophos;i="5.95,230,1661785200"; d="scan'208";a="94494670" Received: from unknown (HELO oym-r3.gw.nic.fujitsu.com) ([210.162.30.91]) by esa3.hc1455-7.c3s2.iphmx.com with ESMTP; 01 Nov 2022 18:48:50 +0900 Received: from oym-m4.gw.nic.fujitsu.com (oym-nat-oym-m4.gw.nic.fujitsu.com [192.168.87.61]) by oym-r3.gw.nic.fujitsu.com (Postfix) with ESMTP id 329E9CA1E2; Tue, 1 Nov 2022 18:48:49 +0900 (JST) Received: from oym-om4.fujitsu.com (oym-om4.o.css.fujitsu.com [10.85.58.164]) by oym-m4.gw.nic.fujitsu.com (Postfix) with ESMTP id 7CF99D55E3; Tue, 1 Nov 2022 18:48:48 +0900 (JST) Received: from cn-r05-10.example.com (n3235113.np.ts.nmh.cs.fujitsu.co.jp [10.123.235.113]) by oym-om4.fujitsu.com (Postfix) with ESMTP id 6491340164A60; Tue, 1 Nov 2022 18:48:48 +0900 (JST) From: Shaopeng Tan To: Fenghua Yu , Reinette Chatre , Shuah Khan Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, tan.shaopeng@jp.fujitsu.com Subject: [PATCH v3 4/5] selftests/resctrl: Cleanup properly when an error occurs in CAT test Date: Tue, 1 Nov 2022 18:43:40 +0900 Message-Id: <20221101094341.3383073-5-tan.shaopeng@jp.fujitsu.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221101094341.3383073-1-tan.shaopeng@jp.fujitsu.com> References: <20221101094341.3383073-1-tan.shaopeng@jp.fujitsu.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748287622713036654?= X-GMAIL-MSGID: =?utf-8?q?1748287622713036654?= After creating a child process with fork() in CAT test, if there is an error occurs or such as a SIGINT signal is received, the parent process will be terminated immediately, but the child process will not be killed and also umount_resctrlfs() will not be called. Add a signal handler like other tests to kill child process, umount resctrlfs, cleanup result files, etc. when an error occurs. Signed-off-by: Shaopeng Tan Reviewed-by: Shuah Khan --- tools/testing/selftests/resctrl/cat_test.c | 28 +++++++++++++++------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/tools/testing/selftests/resctrl/cat_test.c b/tools/testing/selftests/resctrl/cat_test.c index 6a8306b0a109..5f81817f4366 100644 --- a/tools/testing/selftests/resctrl/cat_test.c +++ b/tools/testing/selftests/resctrl/cat_test.c @@ -98,12 +98,21 @@ void cat_test_cleanup(void) remove(RESULT_FILE_NAME2); } +static void ctrl_handler(int signo) +{ + kill(bm_pid, SIGKILL); + umount_resctrlfs(); + tests_cleanup(); + ksft_print_msg("Ending\n\n"); + + exit(EXIT_SUCCESS); +} + int cat_perf_miss_val(int cpu_no, int n, char *cache_type) { unsigned long l_mask, l_mask_1; int ret, pipefd[2], sibling_cpu_no; char pipe_message; - pid_t bm_pid; cache_size = 0; @@ -181,17 +190,19 @@ int cat_perf_miss_val(int cpu_no, int n, char *cache_type) strcpy(param.filename, RESULT_FILE_NAME1); param.num_of_runs = 0; param.cpu_no = sibling_cpu_no; + } else { + /* set up ctrl-c handler */ + if (signal(SIGINT, ctrl_handler) == SIG_ERR || + signal(SIGHUP, ctrl_handler) == SIG_ERR || + signal(SIGTERM, ctrl_handler) == SIG_ERR) + printf("Failed to catch SIGNAL!\n"); } remove(param.filename); ret = cat_val(¶m); - if (ret) - return ret; - - ret = check_results(¶m); - if (ret) - return ret; + if (ret == 0) + ret = check_results(¶m); if (bm_pid == 0) { /* Tell parent that child is ready */ @@ -201,7 +212,6 @@ int cat_perf_miss_val(int cpu_no, int n, char *cache_type) sizeof(pipe_message)) { close(pipefd[1]); perror("# failed signaling parent process"); - return errno; } close(pipefd[1]); @@ -226,5 +236,5 @@ int cat_perf_miss_val(int cpu_no, int n, char *cache_type) if (bm_pid) umount_resctrlfs(); - return 0; + return ret; } From patchwork Tue Nov 1 09:43:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaopeng Tan X-Patchwork-Id: 13605 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2857600wru; Tue, 1 Nov 2022 03:03:31 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5p+jxpvgl+p7q47XE33+x/imEqaZpAlNsNlIH3zlwS8/kdmD8+7tJdYCbxoR4TYaqCSRJ9 X-Received: by 2002:a63:5b48:0:b0:458:1e98:c862 with SMTP id l8-20020a635b48000000b004581e98c862mr2094727pgm.568.1667297010720; Tue, 01 Nov 2022 03:03:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667297010; cv=none; d=google.com; s=arc-20160816; b=vzKhf5u/IbjyZkX8oe+Y7/nxLVjL/a6Lmh7y5TLwgpR00uVXprqGD7+6wIwChSCRWV 2b8zo9U9CB88wM9ex8PJ1fIiPWIGSOgcgHDca2nVtHSyHERprxJcch7oBYK37VmmGHXf CrU/0sFjJ0Vu2wKyr2WNBkNfOGYrWw1kLJY5DFA0FKhd4sYT5qOLhFjLGDL2N3ue95Hk EFy5pni6k3Mpy5hm7QU7zqmqWx1e3bwx5OiDXcFKTzkaqfrE+vZc1sBplbcSVnGzCxvj Isy2xuF4HuGecD+NBYTJzJWLy+Y0aPCjDQTDMjmfGv4tMrCauE1NvXz65KAul19kZ1iE JQsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=3C1gK/22v5YDqZWSd0IDSg9WTdwIcYRZJRjzwsj70z8=; b=q8hb0XhETYKC26hBzdbS5mrtRL7ijNIxIBT2JKR0xhC9ko3/ElYZRp/UsHeo2VDvG5 2hd6dbdv6HB+xFy+ImVv9TsGbHqRZPgWJ7Kv6OWLWMvhtaRo/xP1paAn8yC9UEKDxkLJ nhmIhqig8XygSSlDwzAMq8P01dThZ3cpbSPqGpo8Yk1miE4v3sBBndgGsmG/UiEpuEra 4xaPEFwEHvatSohEWxoCKSjINp4NeJVM2Ryo/t9sRh0iqTt0RjeQPx+tQCvQCJwyUK4H dhdJiRCf7dZJooq5YrE/BZV/ZSIII02bCFdRMoCNxDZFd6YqiEuMVrQRCS8hEuUA0Z05 V2hQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s11-20020a63d04b000000b0046b322237c3si12465232pgi.804.2022.11.01.03.03.16; Tue, 01 Nov 2022 03:03:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230468AbiKAJta (ORCPT + 99 others); Tue, 1 Nov 2022 05:49:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229511AbiKAJsy (ORCPT ); Tue, 1 Nov 2022 05:48:54 -0400 Received: from esa2.hc1455-7.c3s2.iphmx.com (esa2.hc1455-7.c3s2.iphmx.com [207.54.90.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E72E1902A; Tue, 1 Nov 2022 02:48:53 -0700 (PDT) X-IronPort-AV: E=McAfee;i="6500,9779,10517"; a="94348500" X-IronPort-AV: E=Sophos;i="5.95,230,1661785200"; d="scan'208";a="94348500" Received: from unknown (HELO yto-r2.gw.nic.fujitsu.com) ([218.44.52.218]) by esa2.hc1455-7.c3s2.iphmx.com with ESMTP; 01 Nov 2022 18:48:51 +0900 Received: from yto-m2.gw.nic.fujitsu.com (yto-nat-yto-m2.gw.nic.fujitsu.com [192.168.83.65]) by yto-r2.gw.nic.fujitsu.com (Postfix) with ESMTP id F2A59D63B6; Tue, 1 Nov 2022 18:48:49 +0900 (JST) Received: from oym-om4.fujitsu.com (oym-om4.o.css.fujitsu.com [10.85.58.164]) by yto-m2.gw.nic.fujitsu.com (Postfix) with ESMTP id 587B1D35F3; Tue, 1 Nov 2022 18:48:49 +0900 (JST) Received: from cn-r05-10.example.com (n3235113.np.ts.nmh.cs.fujitsu.co.jp [10.123.235.113]) by oym-om4.fujitsu.com (Postfix) with ESMTP id 376CF40164011; Tue, 1 Nov 2022 18:48:49 +0900 (JST) From: Shaopeng Tan To: Fenghua Yu , Reinette Chatre , Shuah Khan Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, tan.shaopeng@jp.fujitsu.com Subject: [PATCH v3 5/5] selftests/resctrl: Remove duplicate codes that clear each test result file Date: Tue, 1 Nov 2022 18:43:41 +0900 Message-Id: <20221101094341.3383073-6-tan.shaopeng@jp.fujitsu.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221101094341.3383073-1-tan.shaopeng@jp.fujitsu.com> References: <20221101094341.3383073-1-tan.shaopeng@jp.fujitsu.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748287630651719317?= X-GMAIL-MSGID: =?utf-8?q?1748287630651719317?= Before exiting each test function(run_cmt/cat/mbm/mba_test()), test results("ok","not ok") are printed by ksft_test_result() and then temporary result files are cleaned by function cmt/cat/mbm/mba_test_cleanup(). However, before running ksft_test_result(), function cmt/cat/mbm/mba_test_cleanup() has been run in each test function as follows: cmt_resctrl_val() cat_perf_miss_val() mba_schemata_change() mbm_bw_change() Remove duplicate codes that clear each test result file. Signed-off-by: Shaopeng Tan --- tools/testing/selftests/resctrl/resctrl_tests.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tools/testing/selftests/resctrl/resctrl_tests.c b/tools/testing/selftests/resctrl/resctrl_tests.c index df0d8d8526fc..8732cf736528 100644 --- a/tools/testing/selftests/resctrl/resctrl_tests.c +++ b/tools/testing/selftests/resctrl/resctrl_tests.c @@ -88,7 +88,6 @@ static void run_mbm_test(bool has_ben, char **benchmark_cmd, int span, ksft_test_result(!res, "MBM: bw change\n"); if ((get_vendor() == ARCH_INTEL) && res) ksft_print_msg("Intel MBM may be inaccurate when Sub-NUMA Clustering is enabled. Check BIOS configuration.\n"); - mbm_test_cleanup(); } static void run_mba_test(bool has_ben, char **benchmark_cmd, int span, @@ -107,7 +106,6 @@ static void run_mba_test(bool has_ben, char **benchmark_cmd, int span, sprintf(benchmark_cmd[1], "%d", span); res = mba_schemata_change(cpu_no, bw_report, benchmark_cmd); ksft_test_result(!res, "MBA: schemata change\n"); - mba_test_cleanup(); } static void run_cmt_test(bool has_ben, char **benchmark_cmd, int cpu_no) @@ -126,7 +124,6 @@ static void run_cmt_test(bool has_ben, char **benchmark_cmd, int cpu_no) ksft_test_result(!res, "CMT: test\n"); if ((get_vendor() == ARCH_INTEL) && res) ksft_print_msg("Intel CMT may be inaccurate when Sub-NUMA Clustering is enabled. Check BIOS configuration.\n"); - cmt_test_cleanup(); } static void run_cat_test(int cpu_no, int no_of_bits) @@ -142,7 +139,6 @@ static void run_cat_test(int cpu_no, int no_of_bits) res = cat_perf_miss_val(cpu_no, no_of_bits, "L3"); ksft_test_result(!res, "CAT: test\n"); - cat_test_cleanup(); } int main(int argc, char **argv)