Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1332238imm; Thu, 23 Aug 2018 00:58:43 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbH3rsm+Uf8L2umAFxUhie2OBxSWPrWPXRIcI15+LC4AXnsn4+sIe2Xb93oSDKRkhgaDq1v X-Received: by 2002:a63:e355:: with SMTP id o21-v6mr2868495pgj.251.1535011123466; Thu, 23 Aug 2018 00:58:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535011123; cv=none; d=google.com; s=arc-20160816; b=ILKxXW3FqQJZDrMa70XhLRBH1oZdUUuwhWpcoxMyzUshaQBnZLX9npGtwFnSBSaceJ hXWdaPZutdm+S65V+NcfsViFZXcEs6rwf1yYUaGofo8U4vTGfHp3o9VUE/hTY2uDRJ9q aw0WI1GOjYcLumQqkJSxZF2mVHY0ryq2gKDoojVKQKCktHmX1Hg5Ekt8eLJkxTpfI0RZ 93wzJH+zSiBpCdtE/Mra9SsQU6xRgoCRsyC3BioUYDjl5pTJ7eHviB2AVspFI+LA79hg Ip2GFi2yjGc4VU4WuqJdNKlAhZDNVhCGAUgNBbreXucYAF3d8QQ2txOdGEvIHyMs0ujx ckuw== 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=Kt6lZPxHgFJPWlE3jkB3xDBRJCzdZZin8wWBwnRfPFM=; b=Hsdrtyw6QAWLR2eoU0BSF/X6GgmzSJBgKPS8n2V5tPCWh/F0BQwcXKM6K5GiRlBWpG +SWl2WMh13Y2OLxBNcG+CG1FeZkQ1Ala8WsO3Pvdy/MM0Z6ox+aEAWhorZ+mrNAKH4Mb kXutiiFZVTuq+fhEKb8XjyStLCLYXkew00KZqso+k6bA+RBm+P6f3nGYD1AGjugx45bK IyIzQjY3k5Ad1N9ENSxqTaTn+416q2Lm9TPd2YJeFVC44yjHHPAAjvBrwVIb3wj8IHi5 +UNLwf8dxk9xeYcFJekIwxU7SYNLClmMACLhQzExtnady857MAv+DG6fLSEPzStUmZYX BVOA== 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 s68-v6si3687768pgc.16.2018.08.23.00.58.27; Thu, 23 Aug 2018 00:58:43 -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 S1727298AbeHWLZi (ORCPT + 99 others); Thu, 23 Aug 2018 07:25:38 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:41554 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726451AbeHWLZi (ORCPT ); Thu, 23 Aug 2018 07:25:38 -0400 Received: from localhost (5355525A.cm-6-6b.dynamic.ziggo.nl [83.85.82.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 85BFEACC; Thu, 23 Aug 2018 07:57: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)" , Kees Cook , Sasha Levin Subject: [PATCH 4.4 03/79] selftests: pstore: return Kselftest Skip code for skipped tests Date: Thu, 23 Aug 2018 09:52:39 +0200 Message-Id: <20180823074918.860653683@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180823074918.641878835@linuxfoundation.org> References: <20180823074918.641878835@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.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: "Shuah Khan (Samsung OSG)" [ Upstream commit 856e7c4b619af622d56b3b454f7bec32a170ac99 ] When pstore_post_reboot test gets 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) Reviewed-by: Kees Cook Signed-off-by: Shuah Khan (Samsung OSG) Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- tools/testing/selftests/pstore/pstore_post_reboot_tests | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/tools/testing/selftests/pstore/pstore_post_reboot_tests +++ b/tools/testing/selftests/pstore/pstore_post_reboot_tests @@ -7,13 +7,16 @@ # # Released under the terms of the GPL v2. +# Kselftest framework requirement - SKIP code is 4. +ksft_skip=4 + . ./common_tests if [ -e $REBOOT_FLAG ]; then rm $REBOOT_FLAG else prlog "pstore_crash_test has not been executed yet. we skip further tests." - exit 0 + exit $ksft_skip fi prlog -n "Mounting pstore filesystem ... "