Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-08-12 Thread Brendan Higgins
On Fri, Aug 02, 2019 at 09:37:53AM +0200, John Ogness wrote: > On 2019-08-01, Brendan Higgins wrote: > > On Fri, Jul 26, 2019 at 1:31 AM Petr Mladek wrote: > >> On Thu 2019-07-25 13:21:12, Brendan Higgins wrote: > >>> On Wed, Jul 24, 2019 at 12:31 AM Petr Mladek wrote: > On Mon 2019-07-22

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-08-12 Thread Brendan Higgins
On Thu, Aug 1, 2019 at 2:43 PM Brendan Higgins wrote: > > On Thu, Aug 1, 2019 at 2:14 PM Stephen Boyd wrote: > > > > Quoting Brendan Higgins (2019-08-01 11:59:57) > > > On Thu, Aug 1, 2019 at 11:55 AM Brendan Higgins > > > wrote: > > > > > > > > On Fri, Jul 26, 2019 at 1:31 AM Petr Mladek

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-08-02 Thread John Ogness
On 2019-08-01, Brendan Higgins wrote: > On Fri, Jul 26, 2019 at 1:31 AM Petr Mladek wrote: >> On Thu 2019-07-25 13:21:12, Brendan Higgins wrote: >>> On Wed, Jul 24, 2019 at 12:31 AM Petr Mladek wrote: On Mon 2019-07-22 16:54:10, Stephen Boyd wrote: > Quoting Brendan Higgins (2019-07-22

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-08-01 Thread Brendan Higgins
On Thu, Aug 1, 2019 at 2:14 PM Stephen Boyd wrote: > > Quoting Brendan Higgins (2019-08-01 11:59:57) > > On Thu, Aug 1, 2019 at 11:55 AM Brendan Higgins > > wrote: > > > > > > On Fri, Jul 26, 2019 at 1:31 AM Petr Mladek wrote: > > > > > > > To be honest I do not fully understand KUnit design. I

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-08-01 Thread Stephen Boyd
Quoting Brendan Higgins (2019-08-01 11:59:57) > On Thu, Aug 1, 2019 at 11:55 AM Brendan Higgins > wrote: > > > > On Fri, Jul 26, 2019 at 1:31 AM Petr Mladek wrote: > > > > > To be honest I do not fully understand KUnit design. I am not > > > completely sure how the tested code is isolated from

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-08-01 Thread Brendan Higgins
On Thu, Aug 1, 2019 at 11:55 AM Brendan Higgins wrote: > > On Fri, Jul 26, 2019 at 1:31 AM Petr Mladek wrote: > > > > On Thu 2019-07-25 13:21:12, Brendan Higgins wrote: > > > On Wed, Jul 24, 2019 at 12:31 AM Petr Mladek wrote: > > > > > > > > On Mon 2019-07-22 16:54:10, Stephen Boyd wrote: > >

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-08-01 Thread Brendan Higgins
On Fri, Jul 26, 2019 at 1:31 AM Petr Mladek wrote: > > On Thu 2019-07-25 13:21:12, Brendan Higgins wrote: > > On Wed, Jul 24, 2019 at 12:31 AM Petr Mladek wrote: > > > > > > On Mon 2019-07-22 16:54:10, Stephen Boyd wrote: > > > > Quoting Brendan Higgins (2019-07-22 15:30:49) > > > > > On Mon,

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-07-26 Thread Petr Mladek
On Thu 2019-07-25 13:21:12, Brendan Higgins wrote: > On Wed, Jul 24, 2019 at 12:31 AM Petr Mladek wrote: > > > > On Mon 2019-07-22 16:54:10, Stephen Boyd wrote: > > > Quoting Brendan Higgins (2019-07-22 15:30:49) > > > > On Mon, Jul 22, 2019 at 1:03 PM Stephen Boyd wrote: > > > > > > > > > > > >

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-07-25 Thread Brendan Higgins
On Wed, Jul 24, 2019 at 12:31 AM Petr Mladek wrote: > > On Mon 2019-07-22 16:54:10, Stephen Boyd wrote: > > Quoting Brendan Higgins (2019-07-22 15:30:49) > > > On Mon, Jul 22, 2019 at 1:03 PM Stephen Boyd wrote: > > > > > > > > > > > > What's the calling context of the assertions and

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-07-24 Thread Petr Mladek
On Mon 2019-07-22 16:54:10, Stephen Boyd wrote: > Quoting Brendan Higgins (2019-07-22 15:30:49) > > On Mon, Jul 22, 2019 at 1:03 PM Stephen Boyd wrote: > > > > > > > > > What's the calling context of the assertions and expectations? I still > > > don't like the fact that string stream needs to

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-07-22 Thread Brendan Higgins
On Mon, Jul 22, 2019 at 4:54 PM Stephen Boyd wrote: > > Quoting Brendan Higgins (2019-07-22 15:30:49) > > On Mon, Jul 22, 2019 at 1:03 PM Stephen Boyd wrote: > > > > > > > > > What's the calling context of the assertions and expectations? I still > > > don't like the fact that string stream

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-07-22 Thread Stephen Boyd
Quoting Brendan Higgins (2019-07-22 15:30:49) > On Mon, Jul 22, 2019 at 1:03 PM Stephen Boyd wrote: > > > > > > What's the calling context of the assertions and expectations? I still > > don't like the fact that string stream needs to allocate buffers and > > throw them into a list somewhere

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-07-22 Thread Brendan Higgins
On Mon, Jul 22, 2019 at 1:03 PM Stephen Boyd wrote: > > Quoting Brendan Higgins (2019-07-18 17:08:34) > > On Thu, Jul 18, 2019 at 12:22:33PM -0700, Brendan Higgins wrote: > > > > I started poking around with your suggestion while we are waiting. A > > couple early observations: > > > > 1) It is

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-07-22 Thread Stephen Boyd
Quoting Brendan Higgins (2019-07-18 17:08:34) > On Thu, Jul 18, 2019 at 12:22:33PM -0700, Brendan Higgins wrote: > > I started poking around with your suggestion while we are waiting. A > couple early observations: > > 1) It is actually easier to do than I previously thought and will probably >

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-07-22 Thread Brendan Higgins
On Thu, Jul 18, 2019 at 5:08 PM Brendan Higgins wrote: > > On Thu, Jul 18, 2019 at 12:22:33PM -0700, Brendan Higgins wrote: > > On Thu, Jul 18, 2019 at 10:50 AM Stephen Boyd wrote: > > > > > > Quoting Brendan Higgins (2019-07-16 11:52:01) > > > > On Tue, Jul 16, 2019 at 10:50 AM Stephen Boyd

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-07-18 Thread Brendan Higgins
On Thu, Jul 18, 2019 at 12:22:33PM -0700, Brendan Higgins wrote: > On Thu, Jul 18, 2019 at 10:50 AM Stephen Boyd wrote: > > > > Quoting Brendan Higgins (2019-07-16 11:52:01) > > > On Tue, Jul 16, 2019 at 10:50 AM Stephen Boyd wrote: [...] > > Do you have a link to those earlier patches? > >

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-07-18 Thread Brendan Higgins
On Thu, Jul 18, 2019 at 10:50 AM Stephen Boyd wrote: > > Quoting Brendan Higgins (2019-07-16 11:52:01) > > On Tue, Jul 16, 2019 at 10:50 AM Stephen Boyd wrote: > > > > > > > > The only hypothetical case where this can't be done is a complicated > > > assertion or expectation that does more than

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-07-18 Thread Stephen Boyd
Quoting Brendan Higgins (2019-07-16 11:52:01) > On Tue, Jul 16, 2019 at 10:50 AM Stephen Boyd wrote: > > > > > The only hypothetical case where this can't be done is a complicated > > assertion or expectation that does more than one check and can't be > > written as a function that dumps out

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-07-16 Thread Brendan Higgins
On Tue, Jul 16, 2019 at 10:50 AM Stephen Boyd wrote: > > Quoting Brendan Higgins (2019-07-16 01:37:34) > > On Tue, Jul 16, 2019 at 12:57 AM Brendan Higgins > > wrote: > > > > > > A `struct kunit_stream` is usually associated with a message that is > > > being built up over time like maybe an

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-07-16 Thread Brendan Higgins
On Tue, Jul 16, 2019 at 8:30 AM Stephen Boyd wrote: > > Quoting Brendan Higgins (2019-07-16 01:37:34) > > On Tue, Jul 16, 2019 at 12:57 AM Brendan Higgins > > wrote: > > > > > > On Mon, Jul 15, 2019 at 3:15 PM Stephen Boyd wrote: > > > > > > > > Quoting Brendan Higgins (2019-07-12 01:17:30) > >

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-07-16 Thread Stephen Boyd
Quoting Brendan Higgins (2019-07-16 01:37:34) > On Tue, Jul 16, 2019 at 12:57 AM Brendan Higgins > wrote: > > > > A `struct kunit_stream` is usually associated with a message that is > > being built up over time like maybe an expectation; it is meant to > > capture the idea that we might want to

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-07-16 Thread Stephen Boyd
Quoting Brendan Higgins (2019-07-16 01:37:34) > On Tue, Jul 16, 2019 at 12:57 AM Brendan Higgins > wrote: > > > > On Mon, Jul 15, 2019 at 3:15 PM Stephen Boyd wrote: > > > > > > Quoting Brendan Higgins (2019-07-12 01:17:30) > > > > diff --git a/include/kunit/kunit-stream.h

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-07-16 Thread Brendan Higgins
On Tue, Jul 16, 2019 at 12:57 AM Brendan Higgins wrote: > > On Mon, Jul 15, 2019 at 3:15 PM Stephen Boyd wrote: > > > > Quoting Brendan Higgins (2019-07-12 01:17:30) > > > diff --git a/include/kunit/kunit-stream.h b/include/kunit/kunit-stream.h > > > new file mode 100644 > > > index

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-07-16 Thread Brendan Higgins
On Mon, Jul 15, 2019 at 3:15 PM Stephen Boyd wrote: > > Quoting Brendan Higgins (2019-07-12 01:17:30) > > diff --git a/include/kunit/kunit-stream.h b/include/kunit/kunit-stream.h > > new file mode 100644 > > index 0..a7b53eabf6be4 > > --- /dev/null > > +++

Re: [PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-07-15 Thread Stephen Boyd
Quoting Brendan Higgins (2019-07-12 01:17:30) > diff --git a/include/kunit/kunit-stream.h b/include/kunit/kunit-stream.h > new file mode 100644 > index 0..a7b53eabf6be4 > --- /dev/null > +++ b/include/kunit/kunit-stream.h > @@ -0,0 +1,81 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ >

[PATCH v9 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-07-12 Thread Brendan Higgins
A lot of the expectation and assertion infrastructure prints out fairly complicated test failure messages, so add a C++ style log library for for logging test results. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- include/kunit/kunit-stream.h