Received: by 10.192.165.148 with SMTP id m20csp682069imm; Fri, 4 May 2018 18:16:40 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpOjFTPJ98LHczozR/+EJMjVgOOKTR5IF6HHHGXXf3mPeWQxM5QNV50qQaO1iOdy3ovMTNt X-Received: by 2002:a63:9401:: with SMTP id m1-v6mr23969413pge.140.1525483000025; Fri, 04 May 2018 18:16:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525482999; cv=none; d=google.com; s=arc-20160816; b=n5/JHgiWGlwVcb5q+L2rBzm1vy/InoFtasP5e5bZZaUKQpZrNF8D/TygIrZmB6SnyQ pLWCvFf+iw+JrDMt0PfQDdeSLtLQDQpBwKB5BNbK7rhoBiJeQ8jzj6OabduX49T9i8On lMSwQgbCYSpiw+nK0ZFW1vB/7bnOeHq0Hv2dZeq0i5eYi10OCTOU+qcTM+zjdBK0CXbf OxXR661LXUGeelonMDQug7nRw/CLwOLR8ZlY3HEZTVLI+5EcsXvWXndqVN2PiX/2PILu sT3gvh2XlhQU92rDzJVXBoK1xdBjF966d/9CnDB5Gcm6dbuW0OlurPeOywRci+bIld/m Tz5Q== 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=S7pJrC1FRGS4XX82BY0wn4Fwb0HL3kjnAJv0iB8tpKM=; b=MsZ3QKKVzuyBccyhAMs2uTgxSIER2pYQuvWK/DzFribK1ZDtSmz7dWB4OW6aZOZoSF Fef04Y9J4vFdYLTC4Nv82KbxKEfzb3xd1upVPjb7K88q+M1T2Fuw1evvRqlLCa3O8mPf L7ltcA4Nvgr8OAxKuFtY84g5msy7XEgymcqMAKzgVbmDh/u3cRi0v8TqIOQoYBWeO3SO zJPVoUoE1mRC40BWEYAoPgZS1QYrhSMm6QIZak3gr4aWb0My+lwR8S2fxF4GoMpdQ3pI X7XuPQomgmszHBH99AHKDkAw374PKiHLY39fV+rNACIRlxaCb06RNXUEPG8KEKNQqit1 kpEg== 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 b35-v6si16838573plh.36.2018.05.04.18.16.25; Fri, 04 May 2018 18:16:39 -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 S1752095AbeEEBPt (ORCPT + 99 others); Fri, 4 May 2018 21:15:49 -0400 Received: from mailout.easymail.ca ([64.68.200.34]:50470 "EHLO mailout.easymail.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751808AbeEEBPs (ORCPT ); Fri, 4 May 2018 21:15:48 -0400 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 6DE4E21235; Sat, 5 May 2018 01:15:47 +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 sEi-Q9GwxFAG; Sat, 5 May 2018 01:15:47 +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 DBAA821020; Sat, 5 May 2018 01:15:39 +0000 (UTC) From: "Shuah Khan (Samsung OSG)" To: shuah@kernel.org, daniel.diaz@linaro.org, thomas@m3y3r.de Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/24] selftests: intel_pstate: return Kselftest Skip code for skipped tests Date: Fri, 4 May 2018 19:13:15 -0600 Message-Id: <20180505011328.32078-11-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 intel_pstate test is skipped because of unmet dependencies and/or unsupported configuration, it returns 0 which is treated as a pass by the Kselftest framework. This leads to false positive 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/intel_pstate/run.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/intel_pstate/run.sh b/tools/testing/selftests/intel_pstate/run.sh index c670359becc6..6ded61670f6d 100755 --- a/tools/testing/selftests/intel_pstate/run.sh +++ b/tools/testing/selftests/intel_pstate/run.sh @@ -30,9 +30,12 @@ EVALUATE_ONLY=0 +# Kselftest framework requirement - SKIP code is 4. +ksft_skip=4 + if ! uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ | grep -q x86; then echo "$0 # Skipped: Test can only run on x86 architectures." - exit 0 + exit $ksft_skip fi max_cpus=$(($(nproc)-1)) -- 2.14.1