Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp200230img; Wed, 27 Feb 2019 20:17:04 -0800 (PST) X-Google-Smtp-Source: AHgI3IZorsS/jru19puBT7HGtZpiPhSnfl+p5CsbGTsAKI6RyODKT69kIvhR3wQutQHmayq6HeJh X-Received: by 2002:aa7:924e:: with SMTP id 14mr5418340pfp.30.1551327424451; Wed, 27 Feb 2019 20:17:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551327424; cv=none; d=google.com; s=arc-20160816; b=pgfLkoCnKg9O+ke/INgSdfY2muYy+YxkKq28CdY5Bqwnb+uKubrhPtUWj5cAghOda6 JtC1OjHJmDR8p2NQS3wl/Z9dD6TaNn2gBPu7d3t6Zx1GCJaSH+qxEfIg4IqZFYSmrOs7 lJ4Y8nGPYwQ6hVddLo5YZJryC9FbvqLjATNM2ECUxCHFRHUpsbKbIM2mSlUd/jsS00SS vVacsHCnLzLiwWghF5Eo0Qgnp3MwbUK2wEJ2c6lGKrLygZxWSweLQQC18V5NdJu8g3iu D6bUxBPcAM1NRK3BUkgUxqVPpJizKNCaZDhEPr/GTgxQG7hTtHh/MNJZRiZ0l3uRWnGB 4sIg== 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=s8smFLNpcnmFXFu5vDuT2M6WyocpA2OuXfU4g5q5Ewc=; b=hv6dXZjfMmLh8Q436rECQJ/Jb86EfNgObY/1de2MRFldR0Nw5z+GRfb8u5zmw3hwNN LTQPfvwOqi01UQg4OLr3yD7v1TWRGFpet57NMxI7jUctP7Z1W6k0+YYjqdvsHXOSvJPe vJKgzKZtmKnbXwozuX0AulVBYdKW7VzNKwlzJqvhV5ZAXtPAu18oDbS/X9D+bkNZLjHC kKKkAZjp6PbEsLBB+zOMvi7AcXhMOWVaFAcaWni/CJP7bqvpfTPifS3JMLRmnDO5Kb7Q 1vOqVJxqoK1kpl7mImP7+Cyo/Ea04JqnR6XfMBZN3pFynLOkxQS4OGqlUNLSbsx+Nq11 o+Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="ljgbET/Z"; 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 j63si15919418pgd.391.2019.02.27.20.16.48; Wed, 27 Feb 2019 20:17:04 -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="ljgbET/Z"; 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 S1730663AbfB1EQB (ORCPT + 99 others); Wed, 27 Feb 2019 23:16:01 -0500 Received: from mail-oi1-f194.google.com ([209.85.167.194]:46102 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730131AbfB1EQA (ORCPT ); Wed, 27 Feb 2019 23:16:00 -0500 Received: by mail-oi1-f194.google.com with SMTP id j135so15444028oib.13 for ; Wed, 27 Feb 2019 20:16:00 -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=s8smFLNpcnmFXFu5vDuT2M6WyocpA2OuXfU4g5q5Ewc=; b=ljgbET/ZSia03zmgk1BDXZ1TSlWjTPCR/FbLhHSohot6+iIPXCC4PRRmzfiCYCPoJi VojG3mK85yVDd2Z+N8LZIzjGDeYjLBNl0DzpilGWh3IHJu4mnM51J2A6NhUqyUSBuzH9 aKc5y8VnEv7SIrTLu1Ed2R1fYrUCpgwyq2QlIi+SvViz9+TlYUKKOpc2dfCXerqTnCIb vW/35f4M8ks04pOTt9dVZSAXGl2z3HkWq0Ft5yrxJ/pWeY01uQ86EDXHM4OA3/ooQ/xJ m2IlK1vy8bYIG+KxJ69ZDXBickv+a2QDRrUFsnCrua0T8IHW1BGJE0XX0v0iJXywpv2l zzHw== 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=s8smFLNpcnmFXFu5vDuT2M6WyocpA2OuXfU4g5q5Ewc=; b=QGvWWKmb2HqcQEUgSQB0ZHBOS57Dd+jHNlHACxs5g6aDiOoTKmY1nJ11OyiiLnhLFG OhC9u9UmpAPcS0Jj/rUL4UVnWdYgoFkdxgeQc7gwCJZ/DndlSyheHdi7QsQUlWKLYazV fcq9+B0KvKOe1Aaq/9McV6gsfCGSlaIVZJaCiTFtfbrM+NCEn2u9stUGDqTaN+YeYe0s K2PrzYRTRBF7VuYYP8ec9yO4OsaQ/16YaOv94ZINN1EAVkH5EQh/mtQ0MsB4BibhvTgV EGIdvYIOcZfSU/j8JW4G5vQ3rf/LDo/WYvAXJ5eGL8JDsSAXoDkFmtg6m8W4mNdOlCFN nRHw== X-Gm-Message-State: AHQUAubyFOHFnaYg0wMo2EuuHO4Qwa/Ryrq5uhOWkQQGf6HSUe/dN/eY W/uetW/ixFPoP8PNN3Q57e7wTWygN/m3+pQVUA1iYQ== X-Received: by 2002:aca:56ca:: with SMTP id k193mr1779712oib.59.1551327359659; Wed, 27 Feb 2019 20:15:59 -0800 (PST) MIME-Version: 1.0 References: <20190214213729.21702-1-brendanhiggins@google.com> <4dff3b1a-7ded-7218-5325-3c397cc3c73e@gmail.com> In-Reply-To: <4dff3b1a-7ded-7218-5325-3c397cc3c73e@gmail.com> From: Brendan Higgins Date: Wed, 27 Feb 2019 20:15:48 -0800 Message-ID: Subject: Re: [RFC v4 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework To: Frank Rowand Cc: Kees Cook , Luis Chamberlain , shuah@kernel.org, Rob Herring , Kieran Bingham , 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 , dan.carpenter@oracle.com, 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 Tue, Feb 19, 2019 at 10:46 PM Frank Rowand wrote: > > On 2/19/19 10:34 PM, Brendan Higgins wrote: > > On Mon, Feb 18, 2019 at 12:02 PM Frank Rowand wrote: > > > >> I have not read through the patches in any detail. I have read some of > >> the code to try to understand the patches to the devicetree unit tests. > >> So that may limit how valid my comments below are. > > > > No problem. > > > >> > >> I found the code difficult to read in places where it should have been > >> much simpler to read. Structuring the code in a pseudo object oriented > >> style meant that everywhere in a code path that I encountered a dynamic > >> function call, I had to go find where that dynamic function call was > >> initialized (and being the cautious person that I am, verify that > >> no where else was the value of that dynamic function call). With > >> primitive vi and tags, that search would have instead just been a > >> simple key press (or at worst a few keys) if hard coded function > >> calls were done instead of dynamic function calls. In the code paths > >> that I looked at, I did not see any case of a dynamic function being > >> anything other than the value it was originally initialized as. > >> There may be such cases, I did not read the entire patch set. There > >> may also be cases envisioned in the architects mind of how this > >> flexibility may be of future value. Dunno. > > > > Yeah, a lot of it is intended to make architecture specific > > implementations and some other future work easier. Some of it is also > > for testing purposes. Admittedly some is for neither reason, but given > > the heavy usage elsewhere, I figured there was no harm since it was > > all private internal usage anyway. > > > > Increasing the cost for me (and all the other potential code readers) > to read the code is harm. You are right. I like the object oriented C style; I didn't think it hurt readability. In any case, I will go through and replace instances where I am not using it for one of the above reasons.