From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07F6AC3A589 for ; Tue, 20 Aug 2019 23:23:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CAF752339E for ; Tue, 20 Aug 2019 23:23:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Rni4clsu" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726756AbfHTXXi (ORCPT ); Tue, 20 Aug 2019 19:23:38 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:36197 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726215AbfHTXXi (ORCPT ); Tue, 20 Aug 2019 19:23:38 -0400 Received: by mail-pl1-f193.google.com with SMTP id f19so248709plr.3 for ; Tue, 20 Aug 2019 16:23:37 -0700 (PDT) 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=BgeboBXYdH2mwUYNdA3OBv6wqHBTlo9IT3Q8RNantq8=; b=Rni4clsu++7h96C43S+JbBXXkW3gKlVOYt85WpUO9PVUNOQAyZoV9ZeqzedJ1OVMFx 8rIO1yErMiuPpLQ9sjtVMHG1jFX4fJklQ/PjHt12vwHBikcFbmL+JH4XebCtdX0yR6Ne /Ku/wtLkEaRcfVrBLNhoOWWl506znCj2wEM8/+jrC4flwkKt3STFQoP7x3bxbt5r7719 hdp/sy/7uU7ZgdFgwJ1AO9EAvZQT6mQ9FyOhMFksTEDFwGUKQRR3mFtVrfEUr8Q5ksgi nF8kmhxSBCnQuM25k/D9rldBfN5XmkaaeL1KNxMPXXyinqbNL7GUBH09SVaM/WlOuE59 VQIw== 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=BgeboBXYdH2mwUYNdA3OBv6wqHBTlo9IT3Q8RNantq8=; b=W+q0BpCZsAVWlRiRxmQ7HwK2/Zt30bCT/5g+1FBKzk5nQjdU9fOMzB/fzl7ieMqWLU ws+lTBjxLHb8jpaj1OLFbSeGkkbVFqiJBtF4AqAoh82LPB71m9YGSimMEbG/PAcXN7ck u+3U//y3eKR1XEXxUa9MDv0JqQFNrWZYHEuPGdx1UvMMqfLDpBjaTten9bue+V9x9fnB us4mGiasvGIQM1E1hHmtYa76Cqr5IpMVpHMGIV4ONBUeSN/wgj9xkDeKaZzoLrOY/O2i tsuDgSJ+ytmKXx6Vk6Hn24RD8wW4nhAj/NuV7g2EgEKcEOMnyTZ5NWfVODBuz+7Yt7LB PUpQ== X-Gm-Message-State: APjAAAUHV6tPhs2ssP9pa9m4LGZqc3MmREBaRx/AHpCX46XTWEDFvre9 N1xKk/8p/sh/kDjAr1JxAJ/vE+wrIQ5C3TfMpxtD0w== X-Google-Smtp-Source: APXvYqxXREKtyoSmqThzifpm0xupcZJncgCG4zF1cdnP+ZHsoxUg77sjBGnyRvdHt5/5lrCrktItt1lg4/mEcxF/N4g= X-Received: by 2002:a17:902:7049:: with SMTP id h9mr31488817plt.232.1566343416854; Tue, 20 Aug 2019 16:23:36 -0700 (PDT) MIME-Version: 1.0 References: <20190814055108.214253-1-brendanhiggins@google.com> <5b880f49-0213-1a6e-9c9f-153e6ab91eeb@kernel.org> <20190820182450.GA38078@google.com> In-Reply-To: From: Brendan Higgins Date: Tue, 20 Aug 2019 16:23:25 -0700 Message-ID: Subject: Re: [PATCH v13 00/18] kunit: introduce KUnit, the Linux kernel unit testing framework To: shuah Cc: Frank Rowand , Greg KH , Josh Poimboeuf , Kees Cook , Kieran Bingham , Luis Chamberlain , Peter Zijlstra , Rob Herring , Stephen Boyd , "Theodore Ts'o" , Masahiro Yamada , devicetree , dri-devel , kunit-dev@googlegroups.com, "open list:DOCUMENTATION" , linux-fsdevel@vger.kernel.org, linux-kbuild , Linux Kernel Mailing List , "open list:KERNEL SELFTEST FRAMEWORK" , linux-nvdimm , linux-um@lists.infradead.org, Sasha Levin , "Bird, Timothy" , Amir Goldstein , Dan Carpenter , Daniel Vetter , Jeff Dike , Joel Stanley , Julia Lawall , Kevin Hilman , Knut Omang , Logan Gunthorpe , Michael Ellerman , Petr Mladek , Randy Dunlap , Richard Weinberger , David Rientjes , Steven Rostedt , wfg@linux.intel.com, Bjorn Helgaas 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 Tue, Aug 20, 2019 at 2:26 PM Brendan Higgins wrote: > > On Tue, Aug 20, 2019 at 12:08 PM shuah wrote: > > > > On 8/20/19 12:24 PM, Brendan Higgins wrote: > > > On Tue, Aug 20, 2019 at 11:24:45AM -0600, shuah wrote: > > >> On 8/13/19 11:50 PM, Brendan Higgins wrote: > > >>> ## TL;DR > > >>> > > >>> This revision addresses comments from Stephen and Bjorn Helgaas. Most > > >>> changes are pretty minor stuff that doesn't affect the API in anyway. > > >>> One significant change, however, is that I added support for freeing > > >>> kunit_resource managed resources before the test case is finished via > > >>> kunit_resource_destroy(). Additionally, Bjorn pointed out that I broke > > >>> KUnit on certain configurations (like the default one for x86, whoops). > > >>> > > >>> Based on Stephen's feedback on the previous change, I think we are > > >>> pretty close. I am not expecting any significant changes from here on > > >>> out. > > >>> > > >> > > >> Hi Brendan, > > >> > > >> I found checkpatch errors in one or two patches. Can you fix those and > > >> send v14. > > > > > > Hi Shuah, > > > > > > Are you refering to the following errors? > > > > > > ERROR: Macros with complex values should be enclosed in parentheses > > > #144: FILE: include/kunit/test.h:456: > > > +#define KUNIT_BINARY_CLASS \ > > > + kunit_binary_assert, KUNIT_INIT_BINARY_ASSERT_STRUCT > > > > > > ERROR: Macros with complex values should be enclosed in parentheses > > > #146: FILE: include/kunit/test.h:458: > > > +#define KUNIT_BINARY_PTR_CLASS \ > > > + kunit_binary_ptr_assert, KUNIT_INIT_BINARY_PTR_ASSERT_STRUCT > > > > > > These values should *not* be in parentheses. I am guessing checkpatch is > > > getting confused and thinks that these are complex expressions, when > > > they are not. > > > > > > I ignored the errors since I figured checkpatch was complaining > > > erroneously. > > > > > > I could refactor the code to remove these macros entirely, but I think > > > the code is cleaner with them. > > > > > > > Please do. I am not veru sure what value these macros add. > > Alright, I will have something for you later today. I just sent a new revision with the fix. Cheers