Re: [RFC v1 22/31] kunit: mock: add the concept of spyable functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 16, 2018 at 6:54 PM Brendan Higgins
<brendanhiggins@xxxxxxxxxx> 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



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux