[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABGGiswwS9NJJ__WVgimcFUiTy_76AtDOxeSbSuv-oz1xjjD5w@mail.gmail.com>
Date: Wed, 17 Oct 2018 17:46:54 -0500
From: Rob Herring <rob.herring@...aro.org>
To: brendanhiggins@...gle.com
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
keescook@...gle.com, mcgrof@...nel.org, shuah@...nel.org,
joel@....id.au, Michael Ellerman <mpe@...erman.id.au>,
Joe Perches <joe@...ches.com>, brakmo@...com,
Steven Rostedt <rostedt@...dmis.org>, Tim.Bird@...y.com,
khilman@...libre.com, Julia Lawall <julia.lawall@...6.fr>,
linux-kselftest@...r.kernel.org, kunit-dev@...glegroups.com,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
jdike@...toit.com, richard@....at, linux-um@...ts.infradead.org
Subject: Re: [RFC v1 22/31] kunit: mock: add the concept of spyable functions
On Tue, Oct 16, 2018 at 6:54 PM Brendan Higgins
<brendanhiggins@...gle.com> wrote:
>
> Adds the concept of spying like in Mockito
> (http://static.javadoc.io/org.mockito/mockito-core/2.20.0/org/mockito/Mockito.html#spy-T-).
> This allows a function declaration to be labled as spyable which allows
> the function to be mocked *and* to allow the mock to invoke the original
> function definition.
We can already hook into arbitrary functions ftrace. Wouldn't
utilizing that simplify features like this and avoid having to touch
existing code for testing? Not sure what it would take to enable
ftrace on UML. It is at least partially compiler dependent.
Rob
Powered by blists - more mailing lists