From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Kernel Mocking
Date: Fri, 20 Feb 2015 12:45:29 -0800 [thread overview]
Message-ID: <20150220204529.GB23925@kroah.com> (raw)
In-Reply-To: <CAK7rcp8K+E2WRGv6JEiAL5qR1yZNkN85x3EcjpRA=PKGWmZdiQ@mail.gmail.com>
On Fri, Feb 20, 2015 at 03:26:40PM -0500, Kenneth Adam Miller wrote:
> Thanks for your expedient answer!
>
> So, I was discussing an alternative to mocking; function hooking. But in a
> benign way. Is there any way to, at runtime replace the functionality of code
> in order that you specify what it does for any given kernel function?
Not really, but there are some hacks you can do if you _really_ know
what you are doing.
Hint, don't do this, just write "normal" tests for your kernel code, we
have lots of them already in the source tree, look in tools/selftests/.
Best of luck,
greg k-h
next prev parent reply other threads:[~2015-02-20 20:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-20 19:51 Kernel Mocking Kenneth Adam Miller
2015-02-20 20:24 ` Greg KH
2015-02-20 20:26 ` Kenneth Adam Miller
2015-02-20 20:45 ` Greg KH [this message]
2015-02-20 20:49 ` Kenneth Adam Miller
2015-02-20 22:58 ` Jeff Haran
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150220204529.GB23925@kroah.com \
--to=greg@kroah.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.