Received: by 10.192.165.148 with SMTP id m20csp680786imm; Fri, 4 May 2018 18:14:33 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrPZLIjjPNgTnOtc22QMRhBcM5DRuswUEYAOIMu3Gf5X38TcZ/fmg8T+3rfuNt5sZN4NOb7 X-Received: by 2002:a65:6585:: with SMTP id u5-v6mr23632600pgv.396.1525482873831; Fri, 04 May 2018 18:14:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525482873; cv=none; d=google.com; s=arc-20160816; b=TYO2py2uwG6LFQn5eNvOf+uEiUDgmPFjKdenYOxnMoYiNhRc1h5arButWElHwsWxfg 0mwesbsr58KeSOc12HPZonkDIpBAl+shKChxMsTyF6npluQCDPpKm6Allo6q9DjgU9wv zb1iSsnH56H97dxZJmur8Dv7nkLlUPwcXVNnNolsezEZK+9Rzee8ZVBP2vocW0C0hEER VWGwNyocQaNm1yLgS1sUvO0KRuAce8jGoYazyOOaSJgGve0JG50NLyCWT5aHXvDSOHfN Xv/3RNqBinPDTapJ8/WxOvMFDKFj+nk9ZaJTmacEacadwYtiMOup7tJhxDDOsE1opFiw Q/JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=3oBQPWM3HOUH5QbzJh3aQG63vMkk7PJo/FhudwG8hrs=; b=HhrhoocUx+33Tu1oAphWIIRNE/6/jmd0xPWtK9uV4caS1izhrn62eekbbA3rTkZeyl abBDuN321NTa7KfVm1ayOhCcNUi/LtYE/dFHjL7JLj4Yc0TyyX7rCL1sFYn7DAheQFXo rqZe0k//kPXK77gyk5j+p9GoEzbWq3OVfJZUjkLqUE2SCneElWg8hgly68CNN9MiHjjy PG1hncbzsUMzDK1cv9MK1JTIo+T+sw7tmUd6goXervqGQ9KzKLjFmzhlG/m1Fg2LsjE6 wOb3nCZt+igzVmNhOZJ9O7Az2A7TiJm88NsfNG5UvgVZYa0zXL/i9nhMbsYVMqfsW9Wz 71Qw== 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 e125si16939281pfg.112.2018.05.04.18.14.19; Fri, 04 May 2018 18:14:33 -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 S1751881AbeEEBN7 (ORCPT + 99 others); Fri, 4 May 2018 21:13:59 -0400 Received: from mailout.easymail.ca ([64.68.200.34]:50323 "EHLO mailout.easymail.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751771AbeEEBN5 (ORCPT ); Fri, 4 May 2018 21:13:57 -0400 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 093EA21235; Sat, 5 May 2018 01:13:57 +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 5Ebi_w4xO7aG; Sat, 5 May 2018 01:13:57 +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 2B61421221; Sat, 5 May 2018 01:13:51 +0000 (UTC) From: "Shuah Khan (Samsung OSG)" To: shuah@kernel.org, pintu.ping@gmail.com Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 01/24] selftests: android: ion: return Kselftest Skip code for skipped tests Date: Fri, 4 May 2018 19:13:05 -0600 Message-Id: <20180505011328.32078-1-shuah@kernel.org> X-Mailer: git-send-email 2.14.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When ion 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/android/ion/ion_test.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/android/ion/ion_test.sh b/tools/testing/selftests/android/ion/ion_test.sh index a1aff506f5e6..69e676cfc94e 100755 --- a/tools/testing/selftests/android/ion/ion_test.sh +++ b/tools/testing/selftests/android/ion/ion_test.sh @@ -4,6 +4,9 @@ heapsize=4096 TCID="ion_test.sh" errcode=0 +# Kselftest framework requirement - SKIP code is 4. +ksft_skip=4 + run_test() { heaptype=$1 @@ -25,7 +28,7 @@ check_root() uid=$(id -u) if [ $uid -ne 0 ]; then echo $TCID: must be run as root >&2 - exit 0 + exit $ksft_skip fi } @@ -35,7 +38,7 @@ check_device() if [ ! -e $DEVICE ]; then echo $TCID: No $DEVICE device found >&2 echo $TCID: May be CONFIG_ION is not set >&2 - exit 0 + exit $ksft_skip fi } -- 2.14.1