Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2792105imb; Mon, 4 Mar 2019 14:29:19 -0800 (PST) X-Google-Smtp-Source: APXvYqxVYx1EjpM6lL9CFKVoylAGdPTLHnxtaT6sOPpznKpj6Y7uk+x6upynR8W4dbmsFgOXmw3T X-Received: by 2002:a63:3548:: with SMTP id c69mr20935158pga.256.1551738558981; Mon, 04 Mar 2019 14:29:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551738558; cv=none; d=google.com; s=arc-20160816; b=hZAKcoWx2AqGo1UCw+UN6rAo5sOWZe7MsfVUT71wAujmqMdb9kWEk3fwrEGVTi/Z9G /hbo8Jc4eGRiWaHsObvEt/FhwMaOZI0JBFL1ips3pbv2s5fNEuZF3xCFG4rU5hX6DsWE IR16fJbfnhvIaoJz7JLyxJqDK2UCTUZ0krCgegkvkt4yZ/EWkg/bguHQMDKkdMC+jZl0 M50j4WWCGJvJM7ICRv6l6bQ/YZiB3j3uDDOs4yK0jVwvZwVW7Oz3J7N+Bh73bANAa9AT VeIuZX0Fz4pKM0Ilx8gF3jszM8V1HzUXh4vZ7wAgq7Wt9LE0LfUJVh7zLEw9E3USsuDc DXJA== 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 :in-reply-to:references:mime-version:dkim-signature; bh=Luf7+ev9jaFNEQGCAqiotJcyfrpRzjnbA9SqVIIqKkI=; b=XzLSxZaDKWmh5ohJXYfWS6V+mBOsmDdMjjCRm22ORhEl/84G3cSUubb0oOUgDcOJsf FfaxlgB34TyXGWhDrF5FDe+8KE7etZXZQejfE75HYuJtuFIxxwmsl6bePPOuyln7GOD1 FgKWirq9aZ0CJTItViR8Tqw2834lNzwnPfxHQOycswl0OWXeHpAWworfO8H4edVSaHGT meKHrzk9qI4r7L9W1PRCj2yRrt1pTNGS8icyWW0mzSubABNy8f0V2BPfmONWm8/9kV+k 1MKH8JldACp6/5CP+WR52yaYBBazW7usU4NnrEKech12zQLVoicAAjC0Zik9b2SAzW6Y HcrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=HQzDnWK8; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gn23si6520926plb.19.2019.03.04.14.29.03; Mon, 04 Mar 2019 14:29:18 -0800 (PST) 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=@google.com header.s=20161025 header.b=HQzDnWK8; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726432AbfCDW2S (ORCPT + 99 others); Mon, 4 Mar 2019 17:28:18 -0500 Received: from mail-oi1-f196.google.com ([209.85.167.196]:43743 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726101AbfCDW2R (ORCPT ); Mon, 4 Mar 2019 17:28:17 -0500 Received: by mail-oi1-f196.google.com with SMTP id i8so5215419oib.10 for ; Mon, 04 Mar 2019 14:28:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Luf7+ev9jaFNEQGCAqiotJcyfrpRzjnbA9SqVIIqKkI=; b=HQzDnWK8fklexGL2gVGlxDPhGv1VmtP/AUDExHtR94xJDgPSMXLvkgpH8hNGPPv9lT KrnryKfrszLiUuY3IB1WfEfdoKxmUBofuVn99G4eZrO8SGJUsEfnNBlyra9ozLlwDyyH e15oIjPe22ETVjMTvYcQOYoHUW7ehPSlFt9GWQwBSG5RLjtxYVNyvUVDS+4MCDPMIGCr 1UdVD7ZKeJ7EiK5JoPDejwaE4GbLqSl8Jmt9cOpHXIqlp4gwEDQ9Z5xbUY5gm0siEegU kLruoyEpOm11heSeO6HuhR+Gy+y0oaaHcbf8uH/WPzYnJ2PfE/xPD/le3+fXWwHVUs4m 85Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Luf7+ev9jaFNEQGCAqiotJcyfrpRzjnbA9SqVIIqKkI=; b=D/05FLip3/AcdaJLQNr0c1LiLh4DEsEWjQTjeerpDHOsmUcK9ZKro88mNxkO8wdNKl kGvg+qeLNd2rTyZ28jWYO6CViy03VoVLycDj95XRIVYDO9mvvwQTwn8jLgAIkbnR7BeT turBwr/4Lnuo792db7Qg9zfcfUxekk0Cbsmv9qqeZXfGmFs1YulwZDxf1JAdYvtdXpLU V+1PNLVXuAU6LzC0Kk6t63EB8A+HVC5GfjPWRznH7okCnpJRaLLMYLmwNixabh/R34n3 DmOhU1Uhk0OsjWmWr3P5ZEfyUwW8bkr5dx5GZp5wrjM6uSyX4kMLo3t0TT43qWNnxrPd zb0g== X-Gm-Message-State: AHQUAubZCnKRUunQw13/9uRfksp0/1e/5HyYlwFSA+X/avde3Srw+GJ/ +WoDGD4NEIdcLAGQNvXfxwjjhskgOvT4Gh9bIDXAEA== X-Received: by 2002:aca:56ca:: with SMTP id k193mr13737402oib.59.1551738496317; Mon, 04 Mar 2019 14:28:16 -0800 (PST) MIME-Version: 1.0 References: <20190214213729.21702-1-brendanhiggins@google.com> <20190214213729.21702-9-brendanhiggins@google.com> <155121334527.260864.5324117081460979741@swboyd.mtv.corp.google.com> <20190228135403.GD9806@kadam> In-Reply-To: <20190228135403.GD9806@kadam> From: Brendan Higgins Date: Mon, 4 Mar 2019 14:28:05 -0800 Message-ID: Subject: Re: [RFC v4 08/17] kunit: test: add support for test abort To: Dan Carpenter Cc: Stephen Boyd , Frank Rowand , Kees Cook , Kieran Bingham , Luis Chamberlain , Rob Herring , shuah@kernel.org, Greg KH , Joel Stanley , Michael Ellerman , Joe Perches , brakmo@fb.com, Steven Rostedt , "Bird, Timothy" , Kevin Hilman , Julia Lawall , linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, Linux Kernel Mailing List , Jeff Dike , Richard Weinberger , linux-um@lists.infradead.org, Daniel Vetter , dri-devel , Dan Williams , linux-nvdimm , Knut Omang , devicetree , Petr Mladek , Sasha Levin , Amir Goldstein , wfg@linux.intel.com 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 Thu, Feb 28, 2019 at 5:55 AM Dan Carpenter wrote: > > On Thu, Feb 28, 2019 at 01:03:24AM -0800, Brendan Higgins wrote: > > you could do: > > > > if (IS_ERR_OR_NULL(ptr)) { > > KUNIT_FAIL(test, "ptr is an errno or null: %ld", ptr); > > return; > > } > > It's best to not mix error pointers and NULL but when we do mix them, > it means that NULL is a special kind of success. Like we try to load > a feature and we get back: > > valid pointer <-- success > null <-- feature is disabled. not an error. > error pointer <-- feature is broken. fail. Thanks for pointing that out! Will fix.