Received: by 10.192.165.148 with SMTP id m20csp681134imm; Fri, 4 May 2018 18:15:04 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqYaNmqsBxG7QIOYctlAbFYE18wi/yv5v5j2d9yyGn3Y6ewT4H47Lvok0ceyIa/GvP+4o7D X-Received: by 10.98.214.5 with SMTP id r5mr29180302pfg.8.1525482903969; Fri, 04 May 2018 18:15:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525482903; cv=none; d=google.com; s=arc-20160816; b=UnSKSfY+kaGeqW3OYmrUPn9m619QZ3Qp6qrzQGkSSrBzGy9DFhkQ2smUP31zW7CZpi N50aUH+GAA+5snauyUfHVF5/Px8JautMqGchspics3EAK9SfA/UJocoSm1uesuZHvm04 zTRcQ7QgKHsjm4FaOWqyl+7yi5HczrwAl61grpQ+onJ3L4uXYuL+aiBpBCU2cQbOIBnf bifX+oOZjSD6SGwwb3smlS32r4UziGv5heI2pMGtZ4Jy82PCYwFUC51qTmgTsG4lJA9R oCM4zHUmcqvQ3TgmY7nxFSBGozYTGBhKu1AGA+2GzbUUZ+Ek8NsiR9+uTDsnMJXtdlql qLcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=osSDnVntcL25cmoDbfab+2/ePR17Vnrp6R6NTinl2Xs=; b=fQVwcRXjjVgDQB2eOJGLkTAlTLNz36sPUK5DwCPd0Oqey2J0uZ+LIRdtN1/2/tbqQo NvlHwovYyFvaR1f21cJ/C/HNe0wyKQX8VRgI6Sdt+ScqruN6PEZqc1DbHVqKWOKWnKO8 a6hAGdzvpAxlYFlwyfmg5Pl+kSkFAKA22s0p9V5KKMwqzqnfe2GhlR+QZdRh6Wt+z/gz JsG5LEwsitwsZOZV8g7+E04l0FI5Qcj5QQchYGoIkEkoVdokiWw9aPk9WjdZbrSeVfPp ZSfRlm6IW4UXnWj0dEZDFUkE1urLbiU5nTLxld96cw5VH4b6y4iWqEEUORxsw9Rgdkw0 nwnA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q23si17019034pfj.8.2018.05.04.18.14.49; Fri, 04 May 2018 18:15:03 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751959AbeEEBOY (ORCPT + 99 others); Fri, 4 May 2018 21:14:24 -0400 Received: from mailout.easymail.ca ([64.68.200.34]:50370 "EHLO mailout.easymail.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751771AbeEEBOW (ORCPT ); Fri, 4 May 2018 21:14:22 -0400 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 3633721235; Sat, 5 May 2018 01:14:22 +0000 (UTC) Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo02-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WlbGlUGK-K0U; Sat, 5 May 2018 01:14:22 +0000 (UTC) Received: from localhost.localdomain (c-24-9-64-241.hsd1.co.comcast.net [24.9.64.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 7D43621221; Sat, 5 May 2018 01:14:13 +0000 (UTC) From: "Shuah Khan (Samsung OSG)" To: shuah@kernel.org, rjw@rjwysocki.net, viresh.kumar@linaro.org Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 04/24] selftests: cpufreq: return Kselftest Skip code for skipped tests Date: Fri, 4 May 2018 19:13:08 -0600 Message-Id: <20180505011328.32078-4-shuah@kernel.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180505011328.32078-1-shuah@kernel.org> References: <20180505011328.32078-1-shuah@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 $$ -- 2.14.1