Received: by 10.192.165.148 with SMTP id m20csp2676273imm; Sun, 6 May 2018 22:03:02 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqLfLYhhKGPilSlH8uNodiC4Ss3li4rLT4A42SKtJ1RuO5UjYy0XsKGDHH5aBRMc5yteT5E X-Received: by 10.167.134.20 with SMTP id p20mr35480617pfn.159.1525669382530; Sun, 06 May 2018 22:03:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525669382; cv=none; d=google.com; s=arc-20160816; b=TI6NvKBTQEdvXnuglbHrXPpowP0j/wTs4NX043a1FCrZSpS0WvOXgbs8Hn/H4xFUIz WVq4OG1xlDWTXsUKzZM4JDnKqiupuhtZrKv5jGyAHiM1p5H2DP00p1R3oVfTPy8V4lOq SYGSp7Ka9V9GZeAPvursWgSxHwOTufndZfxLgbGqDRfDbVM4emYDqhAmxJfgDB6nsYUC NxBKRQBTIWL9Wj+eLVygKsu56Lpu74tq3qhtoj/x2xO3UQurWzJdexiiWVI+rdy9kb2K l2fZEmousZ1qeYHSNQ+k/jc4thWJRdupjf5TjpINd0Xs1ywMObsL8lF5PdCSqWiQn29z a2DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=yEnAHvd7dHqpSjHv4Rh5YirvmzZ6S6jyTgZwdmsg+Kg=; b=UaRJdtolhDufIAZszV1fCEfW/4Lgwp9WWbk3vjsLXGB9m2gtCD0SCH6BpIVRglw53B 4IHmX9MiYhjL0URNtQerBZUXllrwObK2J7IVhFZSD4oCuSr0xUXOXyyJCwWZHt+H2zk7 l2T2JjEPI/0/iHykqKoYD/6GNUSWBaTFX+aKof0J3T+lOTGpQ3mW61EOFuFp9GO0caF7 GrBN92YcL7fvC1PMOeajJrBK33utlPaWfwddKit7ZQ4xRJFFnvubt5/PCsargYpmv0Nf vNmXa9SSY1CCX5n2IzrwyL7UKw+y3mlVt8ymOQkSwNRi+l6tTCN58A5x5P5+2FtZphnF HQrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f2NsrhKo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 34-v6si21187974plm.495.2018.05.06.22.02.45; Sun, 06 May 2018 22:03:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f2NsrhKo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751764AbeEGFB1 (ORCPT + 99 others); Mon, 7 May 2018 01:01:27 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:37458 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750964AbeEGFBZ (ORCPT ); Mon, 7 May 2018 01:01:25 -0400 Received: by mail-pf0-f196.google.com with SMTP id e9so17887662pfi.4 for ; Sun, 06 May 2018 22:01:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=yEnAHvd7dHqpSjHv4Rh5YirvmzZ6S6jyTgZwdmsg+Kg=; b=f2NsrhKoE37p0SCSKMsWgtAAJr8dElCoXMnEbnU7N8cv0IyIrbiUM4wDENKExe6/uo RzdFWXpdVb277ytBKUWHbbmxWJKpSToPp5P0KoiBj286CtioG1N8St+h5O69jaEc6k8x CvXLiU7ij0u0m21pHPO1J7mwHcwZETjJfLQm4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=yEnAHvd7dHqpSjHv4Rh5YirvmzZ6S6jyTgZwdmsg+Kg=; b=aynSjpUlgBnetmlhewwqK8nTYsIzrmmBHQftrfI++jyLFbk3oXHsHvndn4Dgzi9nj4 Qr0CfEwkEPAoP/Wx78dynStVbkhQIadz9seo+TVChz0OmI4TzVh7hGlYy50SULWAhlyl yZhwxQ4fYTBDqRJR1ESTZSy2cA10fTvk3N/zIFT62R5KyGrvIzminpFc4CLkCiImi2J4 uUcRfuuzZtio3qVO8PyaqXDKRSK4ujp6lf+/Ry0KIQ5UlaOmkTvUvqU4IUHN/VBCZEKU VGXeJlk3tHL+QYGuaVSqqD/eHYAPG7XmT4NO1lxuYtjsJVRU4yoS7AHhJtEscCLZXoEa t4VQ== X-Gm-Message-State: ALQs6tBRwhrsL9NbxSTBm7eP4+YatLvNrPkaE8YetBUUcZQVI9lZk7Rf fx3K/gTKmaBXroVNFmSqQVOMBw== X-Received: by 2002:a17:902:6941:: with SMTP id k1-v6mr30335160plt.161.1525669284700; Sun, 06 May 2018 22:01:24 -0700 (PDT) Received: from localhost ([122.167.163.112]) by smtp.gmail.com with ESMTPSA id x23-v6sm39268781pge.66.2018.05.06.22.01.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 May 2018 22:01:23 -0700 (PDT) Date: Mon, 7 May 2018 10:31:21 +0530 From: Viresh Kumar To: "Shuah Khan (Samsung OSG)" Cc: rjw@rjwysocki.net, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH 04/24] selftests: cpufreq: return Kselftest Skip code for skipped tests Message-ID: <20180507050121.lzgjzbgsigisvgqj@vireshk-i7> References: <20180505011328.32078-1-shuah@kernel.org> <20180505011328.32078-4-shuah@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180505011328.32078-4-shuah@kernel.org> User-Agent: NeoMutt/20180323-120-3dd1ac Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04-05-18, 19:13, Shuah Khan (Samsung OSG) wrote: > When cpufreq test is skipped because of unmet dependencies and/or > unsupported configuration, it exits with error which is treated as > a fail by the Kselftest framework. This leads to false negative > result even when the test could not be run. > > Change it to return kselftest skip code when a test gets skipped to > clearly report that the test could not be run. > > Kselftest framework SKIP code is 4 and the framework prints appropriate > messages to indicate that the test is skipped. > > Signed-off-by: Shuah Khan (Samsung OSG) > --- > tools/testing/selftests/cpufreq/main.sh | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/cpufreq/main.sh b/tools/testing/selftests/cpufreq/main.sh > index d83922de9d89..31f8c9a76c5f 100755 > --- a/tools/testing/selftests/cpufreq/main.sh > +++ b/tools/testing/selftests/cpufreq/main.sh > @@ -13,6 +13,9 @@ SYSFS= > CPUROOT= > CPUFREQROOT= > > +# Kselftest framework requirement - SKIP code is 4. > +ksft_skip=4 > + > helpme() > { > printf "Usage: $0 [-h] [-todg args] > @@ -38,7 +41,7 @@ prerequisite() > > if [ $UID != 0 ]; then > echo $msg must be run as root >&2 > - exit 2 > + exit $ksft_skip > fi > > taskset -p 01 $$ Acked-by: Viresh Kumar -- viresh