Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1108352imm; Wed, 1 Aug 2018 10:18:46 -0700 (PDT) X-Google-Smtp-Source: AAOMgpckG6bzhTbGGBVSmxC9E1eTAyg0YUii+XGdtxglLui7K6QKTLiEZAtRILSe26scbA+hridK X-Received: by 2002:a63:f414:: with SMTP id g20-v6mr25325771pgi.407.1533143926903; Wed, 01 Aug 2018 10:18:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533143926; cv=none; d=google.com; s=arc-20160816; b=GZr+OrQxclORTuvoRCiJ5fPrwzM2bJ6ZIbEarv4Phm2uPhv+J3ll7gpv3jjSaRUZBS 47v0W5N2K71Wfl5LMiM6Suta7BAcnAT9xfL4nIijToSJyyU50L2UEvlXjOrAjr3TedAa vl+l43lxEr9s8I8qsUp0fYkBgOogZY2k16H6YwRVV8WUhB0XLm5QQwCyKAjz0Yf4nT0A 1rsC7My9+qLrECHvr1xQS67sdRa512tWFIJSOCHsxvruLoG1jTYnvL7W2WyjbHMh3wDZ rmU2nNvDg7CsFdlULPvZKg8UxUR2JRkFTIrUkhoVCFl8kKZAHempUz/bbo+67SNWSJ2E zxWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=BMq255LJFgXDXfCAceNfxcB89r4p25PFYdOGoPPydkU=; b=LFrXvXR/0upvWpeqvPyHERdamHp+C+V5QlP6LunKcuLdunX5Z8yNsWDGRJvxenVyt1 dVKTqhRlSJ9DRcSaoyQORwsfZwM5x0kPtWDm9i+l53auH615KoQTm/Cgz+8/KiG4cK/3 hWZExVAWINmlvYwtacexMnvhgReK3HoLDFZXFXMCv6LN6HavBHgkjjjhUL44a4Hkhv7A wxc8q5NT9KJ1FQl518HnSOVavvT9nB/PjKCA/eeB8WlRWeAACE0bmvFvYlE7RPtHD1bw PkYQC3MHmN1Ac9m9L6dcJWHCONaJh/GpbvVy28wpqOzFHsSq0GCney/g6Xuqmr17Qzug /6ZA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a18-v6si16387337plm.122.2018.08.01.10.18.32; Wed, 01 Aug 2018 10:18:46 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404636AbeHATDz (ORCPT + 99 others); Wed, 1 Aug 2018 15:03:55 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46294 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403980AbeHATDz (ORCPT ); Wed, 1 Aug 2018 15:03:55 -0400 Received: from localhost (D57E6652.static.ziggozakelijk.nl [213.126.102.82]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 669E6C9D; Wed, 1 Aug 2018 17:17:15 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Shuah Khan (Samsung OSG)" , Sasha Levin Subject: [PATCH 4.14 069/246] selftests: intel_pstate: return Kselftest Skip code for skipped tests Date: Wed, 1 Aug 2018 18:49:39 +0200 Message-Id: <20180801165015.021522509@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180801165011.700991984@linuxfoundation.org> References: <20180801165011.700991984@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: "Shuah Khan (Samsung OSG)" [ Upstream commit 5c30a038fb8ec8cdff011e6b5d5d51eb415381d4 ] 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) Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- tools/testing/selftests/intel_pstate/run.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- 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))