Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp236653imp; Tue, 19 Feb 2019 22:36:04 -0800 (PST) X-Google-Smtp-Source: AHgI3IbJGoR6z3e/xvamtOC9NcKZpT9P9+DmJyzcIY9ogCqQiVuBja3T+kt/dbu8789+DobMY8RU X-Received: by 2002:a65:5c46:: with SMTP id v6mr6046079pgr.309.1550644564407; Tue, 19 Feb 2019 22:36:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550644564; cv=none; d=google.com; s=arc-20160816; b=DjZj2C7lOy2xFfkr3zpugREhErP3Yvoqds1RTMOXI0xFGALFHGYqFaD8P5YT7khpd4 HH+uSwO9rQKGwl1zKqnT/iz3QmcMWLT+bdMrYDZzl8rXplIVj3B4/sF/gnn527bUl819 OEuw7P3yITX+rDd1JoNdqwMTtlexKq2KzrND5Qht7ICof9XgQPN0U0iVQv6IfBXKvATv gX6JjZ4J/c8WlCFlr5DXo062C05dLhDksyrGpVweHS39D+7ouzjLzakrPDlFdA//vEAy UXev0t8673FWfrNraWXMvzHCkrLVmqw2g2jdLriCK1GZIcPLmE0nL1fT5izbNRV2Qf3u F38A== 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=iuvTqO3NSV6u7uQL7TsRgoXE3JzoZTVXEQCQK0o//4w=; b=0qfVN9XFtuBKFfULZda91tODmYZtgApQjPmTYtYlS//6wLb0s9YaFjfY0nEz2gKUg4 NLXEn8+mU7y7KvCpAdaIUaHptOz0jWT4MBlYdv/GzrJTkbtZsUJxT7ek58+1DLew78ES 5ZbJZhh/JiKzud8KvlxgoYrDi2iyecBUIE+UcDnfnrW0kRUVWMHJdT/geMyG4X2nzcTO HHgsBp/bMtlRCB5vCvQMLBjbnyycjbLNBQIqf80adkHQlRtSsj51MFxTM9QOkPyA038Y TPgoMkeSwpbM4WozGSpHzwDHWYNUizKUzZphvNQW2X1DTJn6JNXBMh+mgauvG09+CXc8 RRxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="tL/u/Og9"; 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 f75si18044545pff.131.2019.02.19.22.35.49; Tue, 19 Feb 2019 22:36: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="tL/u/Og9"; 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 S1726808AbfBTGfH (ORCPT + 99 others); Wed, 20 Feb 2019 01:35:07 -0500 Received: from mail-ot1-f65.google.com ([209.85.210.65]:43974 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726660AbfBTGfG (ORCPT ); Wed, 20 Feb 2019 01:35:06 -0500 Received: by mail-ot1-f65.google.com with SMTP id n71so38390679ota.10 for ; Tue, 19 Feb 2019 22:35:05 -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=iuvTqO3NSV6u7uQL7TsRgoXE3JzoZTVXEQCQK0o//4w=; b=tL/u/Og9OqVtnm6rpSZtuFs/AjEYUv9jwfGmilBoM06jfLI91a5QdEKmPbd7oUseyU MV1XJN+2N1bhn366V8/JmSm1ZfvO43s3MJwTfGZhKhqY0jzeel6Q5I5go/pWQdn9cMoz 022NwXLfLKEGz3F8i+xoBRHp3qvxx0INoMYrixabTnPZR9EXXkYnwRtyy1sgBZnM7V4d N9gL9tlJA045KJK7lqmp9+tIt4/f2lx0p+i3v4lxIzDCaC8aaNg8Uwux80fyzF7tLIOG uNo2R6FtYOgFQMt5g3YEpEu0bGhskB3C13tyCSKZi9lEsQw5XDoJeuOo6jA4ah3pophY Jk2g== 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=iuvTqO3NSV6u7uQL7TsRgoXE3JzoZTVXEQCQK0o//4w=; b=GFE7+6T9zTIRfFLIQ0Lot73fR7W1dazTYtbLnZtf9n3nk/ji1xemgMBlfieE1w9bRF BQB633on/KZx6h9yGkpOOBorxQRauTg5jM6+Wg0TsyGsjQBXVSqNcyGaz86HqJ7KXE/+ wbfqqxgYUbLLqYEzsHiICqQAq7c9yOAsAjVdwopW5MHDERD05djo4v2qW+0TzasmIOrQ l4lTXQ0qG/ylJPU/zMIu2mgc1g4X1N1lNh+npgxgSkzH2+hdTdNodoj5mFwwgkMpqxLS BbldUKtJpxMc9Z+D2tq0PchVa5nRblcCyrwsbOZl5u+BQkTbW+zM9vU2+b8K48XRWFyP TFkA== X-Gm-Message-State: AHQUAubyzXL2r3rahLoElgS4q4Va+dQViEBG6jgSemcG2gAxqxTUjKuS d0DMhLh9KSON/M1zCHFmHFwWCtx/usVKuWj4aT6IzjFe/guSbg== X-Received: by 2002:a9d:5549:: with SMTP id h9mr18864609oti.83.1550644504978; Tue, 19 Feb 2019 22:35:04 -0800 (PST) MIME-Version: 1.0 References: <20190214213729.21702-1-brendanhiggins@google.com> In-Reply-To: From: Brendan Higgins Date: Tue, 19 Feb 2019 22:34:54 -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 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.