From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Kernel Mocking
Date: Fri, 20 Feb 2015 12:24:27 -0800 [thread overview]
Message-ID: <20150220202427.GA23293@kroah.com> (raw)
In-Reply-To: <CAK7rcp_OPFLLo_7yykxppBShokqsqhwHpEa=7rYZ+7dpOBNnMw@mail.gmail.com>
On Fri, Feb 20, 2015 at 02:51:25PM -0500, Kenneth Adam Miller wrote:
> So, in userland development, the idea of mocking is used to isolate context
> management and machine configuration into a single class or set of functions
> that can be reused, and also facilitate testing much easier. Google mock is a
> great example.
>
> Say I develop a kernel module, and I want that module to have some result X
> after some returned result, whatever that might be. Is there anything similar
> for kernel code??
Not really, sorry. Running in the kernel means you don't have much room
for "simulation". But you can use qemu, or other virtual machines and a
debugger to test your code if you really want to.
Good luck!
greg k-h
next prev parent reply other threads:[~2015-02-20 20:24 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 [this message]
2015-02-20 20:26 ` Kenneth Adam Miller
2015-02-20 20:45 ` Greg KH
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=20150220202427.GA23293@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.