From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7D0AC433ED for ; Wed, 7 Apr 2021 09:59:02 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id 12BB761382 for ; Wed, 7 Apr 2021 09:59:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 12BB761382 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5EBE7407FF; Wed, 7 Apr 2021 11:59:01 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 451A94013F; Wed, 7 Apr 2021 11:58:59 +0200 (CEST) IronPort-SDR: s0asRTwZbeimHjg3iXQ2eDWeTqptVU47Ol3rJ5lDs/f4o4BpvxXW6n59EXb+LLhSDtwp3v7RO6 4Y3NUJa+n+3Q== X-IronPort-AV: E=McAfee;i="6000,8403,9946"; a="172747241" X-IronPort-AV: E=Sophos;i="5.82,203,1613462400"; d="scan'208";a="172747241" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2021 02:58:57 -0700 IronPort-SDR: 79ja79C6WORyzRlGPJZB2KkjgojQSabUrIbGp5ziqcZCB8uA9IoWjcXNb/be9eo9EpsrN1kY8W CbtzABMmyyPA== X-IronPort-AV: E=Sophos;i="5.82,203,1613462400"; d="scan'208";a="530146354" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.213.215.35]) ([10.213.215.35]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2021 02:58:55 -0700 To: Richael Zhuang , dev@dpdk.org Cc: lukaszx.krakowiak@intel.com, stable@dpdk.org, David Hunt References: <20210407023910.51052-1-richael.zhuang@arm.com> <20210407074636.26891-1-richael.zhuang@arm.com> <20210407074636.26891-3-richael.zhuang@arm.com> From: "Burakov, Anatoly" Message-ID: Date: Wed, 7 Apr 2021 10:58:51 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <20210407074636.26891-3-richael.zhuang@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 2/3] test/power: fix a bug in cpufreq autotest X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 07-Apr-21 8:46 AM, Richael Zhuang wrote: > For platforms that don't support turbo boost,rte_power_turbo_status() > returns "-ENOTSUP" (like power_kvm_vm_turbo_status()). So don't allow > check_power_turbo() to continue if rte_power_turbo_status(TEST_POWER_LCORE_ID)!=1 > > Fixes: aeaeaf5f2d62 ("test/power: add cases for turbo feature") > Cc: lukaszx.krakowiak@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Richael Zhuang > --- > app/test/test_power_cpufreq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c > index 1f4d8bb05..cda74bd8a 100644 > --- a/app/test/test_power_cpufreq.c > +++ b/app/test/test_power_cpufreq.c > @@ -386,7 +386,7 @@ check_power_turbo(void) > { > int ret; > > - if (rte_power_turbo_status(TEST_POWER_LCORE_ID) == 0) { > + if (rte_power_turbo_status(TEST_POWER_LCORE_ID) != 1) { > printf("Turbo not available on lcore %u, skipping test\n", > TEST_POWER_LCORE_ID); > return 0; > If what you're really checking is -ENOTSUP, maybe check for that? Because otherwise it seems like you're making unwarranted assumptions about why the call failed... -- Thanks, Anatoly