Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp3743149rwi; Wed, 2 Nov 2022 02:33:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7FtHsQJD6eZCTx4mByk/IxvGFLjZ70C/DSbDE9zy/KF4yDwOs8vWD9u4EUBJTtjrsLh7kG X-Received: by 2002:a17:906:eec9:b0:783:e662:2513 with SMTP id wu9-20020a170906eec900b00783e6622513mr22308432ejb.656.1667381607345; Wed, 02 Nov 2022 02:33:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667381607; cv=none; d=google.com; s=arc-20160816; b=eWx+HlkDmC1++boEoLu7rVPT4S9e8x80ovvvD+Bube4oVs/7ZtaRoAiRClAL+JrQG/ BuGkzHbnTv9PpY/LDgFGGHmNo9f88YEG8KFT3oifrJ3332W4kNUiEz18E/wwQbik4V36 eZrAkkZtf81kraZVgPk11uaK0+v67auqQ+yBcP4U0WDlDvymqlN1GzpcltH+/uGhflB5 uxP+SsQWzSu6tSh3Q1eYiNKzDFsDdF7MwxTu+HukWQM3Y4nkRK3yGsOiv1zvZFzUAHW4 ouEt1t1VhjWcCsDsutlw727W4Tic7LOJSEGqLfxJVa8hUiwmFWy+cdD2EKE45jzFSGO7 0Z/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=tig2lIwdCA6JHTxsTU+TQaIXl+F0LsrnT5B9kKYjmGM=; b=pliheYz6kzpdY7gIBeAbw/ctiAlv3jPevmhSMStR5t18IU8VCD6X1Zcswc0z8cJOI1 EeEcErt9tVwXe6LvNbSsOZhnalI13/USlSYadV/R4AZg9joAFldENmiurPmwDAoccDrN 9YQttY4NWy2yq/Px3uF0IkFMZDNX/6ozQWTmHPqBSTzpfH1g0OCZv4gEVf9Ayjpo1jn7 zNgKEos38OoYXaiaAaOFQ6qUAKTxHWVfen0Vl75cemCEzUTkphXQnf7Uqn1KKv1HXVBo Hz/dBZZjFsS0tTpD6n7J65B9LFsYUbZIDQT9qkc7ShLNFkuucBGVuyMPKJrwNmFzsqwc Tf5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=UfmqGin2; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v8-20020a170906b00800b0078dec48d442si9375688ejy.680.2022.11.02.02.33.02; Wed, 02 Nov 2022 02:33:27 -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; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=UfmqGin2; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230087AbiKBJ2P (ORCPT + 97 others); Wed, 2 Nov 2022 05:28:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230348AbiKBJ1i (ORCPT ); Wed, 2 Nov 2022 05:27:38 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 209812704 for ; Wed, 2 Nov 2022 02:27:34 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id p21so12150135plr.7 for ; Wed, 02 Nov 2022 02:27:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=tig2lIwdCA6JHTxsTU+TQaIXl+F0LsrnT5B9kKYjmGM=; b=UfmqGin2l/Z2euAUtGeMyjYjWDvj+JP3yxy184yGkC4BcGbQ00r38NO326fvy+4D4Q xExoTKA00rCLYzZ43hdcvBBAX6t5DiqdrJIVXrdpoXC8KuXHUBKpLfXnHRQVaQqK1keb dzDOghZmgHKeYwJGW7GjqjOsBPkXV38qFgE1I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tig2lIwdCA6JHTxsTU+TQaIXl+F0LsrnT5B9kKYjmGM=; b=Okrjx2GTWTaQnrH83kGrX4xtqrjEPHyQozTtzjnfh5V5ixgZUj5juB4prbKt887JHt aQiBTIJaFQm4Uu38JTqiSJXUJDygTWYusUoYfTWFnmR+u/YiZEGkRWog0Tfy1CPz5Qc8 OU+hDMFMwnu8pe3AbQ8zoMBFcc7q0r2vq3pWo3+lCwLXgmJgN2lN99sGTA1cp5lxQqqD +qmojIeVjdJ++z1FrNm6gbMbdEmiH//H700j3XjugOVJfiVCT5wlgkbb+FEb9V3Qycf5 kY25CO9ZxD2WLWjUaPJlVWSHJX0dy7BzcWN/cj6bLzAo1IcZ/VaAYyXM5smBDVU2g3bl cItg== X-Gm-Message-State: ACrzQf0gdo1FILBBBRj2HAnkxYamgs7y4k15q7otOnEq8/7NtwqUFJqH 2g9pqEK6bUyXPUvL/xOLKYytKw== X-Received: by 2002:a17:902:cccd:b0:187:733:35d1 with SMTP id z13-20020a170902cccd00b00187073335d1mr22002052ple.26.1667381253581; Wed, 02 Nov 2022 02:27:33 -0700 (PDT) Received: from [192.168.0.168] ([103.99.10.63]) by smtp.gmail.com with ESMTPSA id o68-20020a62cd47000000b0056283e2bdbdsm7964981pfg.138.2022.11.02.02.27.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Nov 2022 02:27:32 -0700 (PDT) Message-ID: <71707e1f-8805-d6c7-6a35-c74a5655d6cd@linuxfoundation.org> Date: Wed, 2 Nov 2022 03:27:28 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH v3 2/5] selftests/resctrl: Return MBA check result and make it to output message Content-Language: en-US To: Shaopeng Tan , Fenghua Yu , Reinette Chatre , Shuah Khan Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Shuah Khan References: <20221101094341.3383073-1-tan.shaopeng@jp.fujitsu.com> <20221101094341.3383073-3-tan.shaopeng@jp.fujitsu.com> From: Shuah Khan In-Reply-To: <20221101094341.3383073-3-tan.shaopeng@jp.fujitsu.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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 On 11/1/22 03:43, Shaopeng Tan wrote: > 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 > --- > 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; Rename "failed" to "ret" - naming the variable "failed" is confusing. > } > > 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) With that change, Reviewed-by: Shuah Khan thanks, -- Shuah