kunit: mock: added support for arbitrary function mocking

Up to this point KUnit only supported method style function mocking
where there was some type of class or context object and the function
was only accessed via a pointer.

This adds support for mocking any function via the __mockable attribute.

Change-Id: I22f325a0fda3d16f5fb22f07332848feaa196b41
Signed-off-by: Brendan Higgins <brendanhiggins@google.com>
3 files changed