Idea: Qemu as test coverage tool for kernels
Hi,
Qemu's system emulators could be modified to output information about the code areas which have been executed by the virtual CPU. The output could then be used in standard test coverage tools. The benefit would be the ability to get kernel-level coverage data.
Are there any other tools for this purpose? I guess this would not be too difficult to do.
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
Hi...
Quoted 6 lines · Blue Swirl
Hi,
Qemu's system emulators could be modified to output information about the code areas which have been executed by the virtual CPU. The output could then be used in standard test coverage tools. The benefit would be the ability to get kernel-level coverage data.
Why not just use Oprofile (oprofile.sf.net) or standard "readprofile" tool for this?
I am not against your idea, but I just want to avoid reinventing the wheel
regards
Mulyadi
Quoted 2 lines
Why not just use Oprofile (oprofile.sf.net) or standard "readprofile" tool for this?
I didn't know about that, but after a quick look I'd say Oprofile is doing performance profiling (which could be done using Qemu as well), not test coverage analysis. Also, the kernel in question needs to be patched.
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
Quoted 6 lines · Blue Swirl
Hi,
Qemu's system emulators could be modified to output information about the code areas which have been executed by the virtual CPU. The output could then be used in standard test coverage tools. The benefit would be the ability to get kernel-level coverage data.
You might want to look a valgrind. The KDE project uses it heavily for memory leak and other types of problem detection. It is a sort of intermediate step between an interpreter and Qemu. I'm not sure where it lives, but Google should find it.
Best,
Kyle
Quoted 8 lines · Kyle Hayes
Quoted 6 lines · Blue Swirl
Hi,
Qemu's system emulators could be modified to output information about the code areas which have been executed by the virtual CPU. The output could then be used in standard test coverage tools. The benefit would be the ability to get kernel-level coverage data.
Quoted 4 lines
You might want to look a valgrind. The KDE project uses it heavily for memory leak and other types of problem detection. It is a sort of intermediate step between an interpreter and Qemu. I'm not sure where it lives, but Google should find it.
Another option might be SystemTap, by activating and counting all probes
and then generating coverage maps from the output, might be simpler to actually set-up, though I have no idea of the resulting impedance of activating all probes in a running kernel:
http://sourceware.org/systemtap/ http://www.redhat.com/magazine/011sep05/features/systemtap/
Daniel
Signature · 3 lines
Daniel Veillard | Red Hat http://redhat.com/ [email protected] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/