From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [RFC v4 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework References: <20190214213729.21702-1-brendanhiggins@google.com> From: Frank Rowand Message-ID: <4dff3b1a-7ded-7218-5325-3c397cc3c73e@gmail.com> Date: Tue, 19 Feb 2019 22:46:19 -0800 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org To: Brendan Higgins 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 List-ID: 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. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frank Rowand Subject: Re: [RFC v4 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework Date: Tue, 19 Feb 2019 22:46:19 -0800 Message-ID: <4dff3b1a-7ded-7218-5325-3c397cc3c73e@gmail.com> References: <20190214213729.21702-1-brendanhiggins@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Brendan Higgins 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 List-Id: devicetree@vger.kernel.org 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. From mboxrd@z Thu Jan 1 00:00:00 1970 From: frowand.list at gmail.com (Frank Rowand) Date: Tue, 19 Feb 2019 22:46:19 -0800 Subject: [RFC v4 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework In-Reply-To: References: <20190214213729.21702-1-brendanhiggins@google.com> Message-ID: <4dff3b1a-7ded-7218-5325-3c397cc3c73e@gmail.com> 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. From mboxrd@z Thu Jan 1 00:00:00 1970 From: frowand.list@gmail.com (Frank Rowand) Date: Tue, 19 Feb 2019 22:46:19 -0800 Subject: [RFC v4 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework In-Reply-To: References: <20190214213729.21702-1-brendanhiggins@google.com> Message-ID: <4dff3b1a-7ded-7218-5325-3c397cc3c73e@gmail.com> Content-Type: text/plain; charset="UTF-8" Message-ID: <20190220064619.Xh0lQl5_1faZi5Y9kN8lvrN053r1Kd4JWwbvm6We4gI@z> On 2/19/19 10:34 PM, Brendan Higgins wrote: > On Mon, Feb 18, 2019@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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gwLeB-0000BZ-5y for linux-um@lists.infradead.org; Wed, 20 Feb 2019 06:46:24 +0000 Received: by mail-pl1-x641.google.com with SMTP id y10so11727800plp.0 for ; Tue, 19 Feb 2019 22:46:22 -0800 (PST) Subject: Re: [RFC v4 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework References: <20190214213729.21702-1-brendanhiggins@google.com> From: Frank Rowand Message-ID: <4dff3b1a-7ded-7218-5325-3c397cc3c73e@gmail.com> Date: Tue, 19 Feb 2019 22:46:19 -0800 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-um" Errors-To: linux-um-bounces+geert=linux-m68k.org@lists.infradead.org To: Brendan Higgins Cc: brakmo@fb.com, Petr Mladek , Amir Goldstein , dri-devel , Sasha Levin , linux-kselftest@vger.kernel.org, shuah@kernel.org, Rob Herring , linux-nvdimm , Richard Weinberger , Knut Omang , Kieran Bingham , wfg@linux.intel.com, Joel Stanley , Jeff Dike , dan.carpenter@oracle.com, devicetree , "Bird," Timothy" , Kees Cook ," linux-um@lists.infradead.org, Steven Rostedt , Julia Lawall , Dan Williams , kunit-dev@googlegroups.com, Greg KH , Linux Kernel Mailing List , Luis Chamberlain , Daniel Vetter , Michael Ellerman , Joe Perches , Kevin Hilman 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. _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um