Received: by 10.192.165.148 with SMTP id m20csp2944708imm; Mon, 7 May 2018 04:05:47 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr9baVnmqpZ0ttwlg0ZLViXbcDTAN9En1uxUEk1blRuc3ajBRK8Gj2SPbOeP7UAp75+vuI+ X-Received: by 10.167.131.5 with SMTP id t5mr7574607pfm.198.1525691147080; Mon, 07 May 2018 04:05:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525691147; cv=none; d=google.com; s=arc-20160816; b=qCOb93YwLtSdpVq/9/5SmaLJuC913/P8IdtGHE4m0q+DvmyXo85XJ5kYhT8spc0dMc RTLEwqzPwXvJOsLV8Q0wDJ8NkamIdRKnAEl1pMstgB19sroAK5CmkwX9s+jqutCkvU73 GOPS4uB7Pm+iI2CV+WNvfgBtQ6vKHlH5L3v6L1SbAK1rt4qJ2YN5crbt59SEjZUmKltN 8yztfu7WPvgk5y4ZUL61IAFAtjTXqDDVkL6H1vjnN+wV2ZMJhvaWWw8slbQpeMIT3WsK 0C2j6T0abpvQrTBvVRdo8yCbTQtOErLveusW88+Z+ANI54+CK8al6pyprGAoW3/g9fW+ SmKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=ITvYXqcqGTP8VzcuzUlEn2KBVpf1TOxTIL0q1sh+nXE=; b=QbxwBiAAshSnoSwb8QGwVuvXPGgIHoshjNjWnJ+FwnG6Af7fJyy2A42tV74EpnngXK vR/DTk3fnQ0QlU01AbY0HqOo1A0f6wtQZj1dzOoDhV1jMUiXYC8XFuK2cLTi1CDx7j3t HlmISygu85/9BmfLXb3SzR61337ow57WNEQf1NlYJaD3NEDt8Gm2apvtPgqa+ywGtXVM ZKGuhN1wqtusUzOfFvX8mAYecewMS6z7AmZgHEYRwhZrzuv/zMaMTKaEmQXno/5aB8SW yg2UmT+D8aVc14sG/YVgoz7AOQU7a9erIpLK+re50TVrltOOnl9jkpSFbj8wbb1SKR7K A0VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=k26z57So; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o5si22592467pfi.64.2018.05.07.04.05.32; Mon, 07 May 2018 04:05:47 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=k26z57So; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752013AbeEGLET (ORCPT + 99 others); Mon, 7 May 2018 07:04:19 -0400 Received: from mail-vk0-f66.google.com ([209.85.213.66]:42755 "EHLO mail-vk0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751848AbeEGLER (ORCPT ); Mon, 7 May 2018 07:04:17 -0400 Received: by mail-vk0-f66.google.com with SMTP id j7-v6so17000097vkc.9; Mon, 07 May 2018 04:04:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ITvYXqcqGTP8VzcuzUlEn2KBVpf1TOxTIL0q1sh+nXE=; b=k26z57SoHmMdkd0NoIzZtwvJ1pCc0aydt/uaOMmW3O2NT2HZWUL+rZa7WMekQjqvvG 5CWnzkaT+mFYxUXqs8qFk6QKwShIL9JXfhZl89k9OPvmw2RT5mnSkMj2XU9lp+9q+Ygc GZdzeyh+1kU3gA2tDpcQ6YIoc4tVDr6ywgAkdpAmFpw5pLCc+4PF+v0QqF99Ep01j9X/ zSHwBaIZgpFlDxaHwf4vlPPUVOwN0pdecgWuxmNoT3kQ/ol6jdFX+lvV+hHYEJvyf2FO rIFfBSzVVnw7BH1Xj/GID9RxzCRRVehx0Fn+hLvMZKs3YbX9nAPtsmkb9geQdq2G31n/ lHpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ITvYXqcqGTP8VzcuzUlEn2KBVpf1TOxTIL0q1sh+nXE=; b=dnrVtFC+WYnnVOQ3bDzijC4wU9CPxlVnjteXK9cH9XX1fbed+vTYzt0/Alr6GVU2HG AI1zSlYqznxLXibHYMIrJXMprqbBYJVnvV6HkU6Hx3sVl2Mh/7mSWC3FQOfCDRYk1gMs 5NMhroav+sh1KEMGwqThjyfv5YoR4rnBq/EcCEPY2HMutzKJFLpyZusi2HXH7kH+jh1v 94Rzs0BlYVs/bi+OSczADR/7SdBG3SSZrGOd+S3s936CJtOkcvbDMF74msvDe7Nmgxyn EzDEUEs+QOA/LnDGnliHKp0PyQXfGYVRDKHbRckn/L4ReXlzHTL+vBOZhkZd5mELArwo E8KA== X-Gm-Message-State: ALQs6tANeHn+pQgJ6pn8ULn9zg5J0YIdz8Sl2RZVTpuDRjNdRwYHVeEl MTiQLoS4qioa3lTV0bCTM62mk1zn3qpqx8rsV4EsYA== X-Received: by 2002:a1f:954:: with SMTP id 81-v6mr30994462vkj.46.1525691056915; Mon, 07 May 2018 04:04:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.144.74 with HTTP; Mon, 7 May 2018 04:04:16 -0700 (PDT) In-Reply-To: <20180505011328.32078-1-shuah@kernel.org> References: <20180505011328.32078-1-shuah@kernel.org> From: Pintu Kumar Date: Mon, 7 May 2018 16:34:16 +0530 Message-ID: Subject: Re: [PATCH 01/24] selftests: android: ion: return Kselftest Skip code for skipped tests To: "Shuah Khan (Samsung OSG)" Cc: linux-kselftest@vger.kernel.org, open list 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 On Sat, May 5, 2018 at 6:43 AM, Shuah Khan (Samsung OSG) wrote: > 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 > } > Ok changes looks good to me. Acked-by: Pintu Agarwal > -- > 2.14.1 >