ATF-devel archive

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

Re: Only userland?



On Feb 6, 2008, at 11:37 PM, Martin Kulas wrote:

On Tue, Feb 05, 2008 at 11:16:07AM +0100, Julio M. Merino Vidal wrote:

mbuf_head() {
    set "descr" "My tests for the mbuf kernel function"
}
mbuf_body() {
    ... load kernel module ...
    ... fire kernel-side tests ...
    ... dump kernel output into a "kern.log" file ...

    # Process the kern.log file
    atf_check 'grep blah kern.log' 0 ignore null
    ...
}
mbuf_cleanup() {
    ... unload kernel module ...
}

This looks interesting.  I will give it a try.

Mmm, the more I think on this, the more I find this idea
interesting.  The only problem is that the framework itself will be
near to impossible to be portable.  But hey, as the ROADMAP states,
extreme portability is not a goal :-)

I run FreeBSD here so your kernel interface should be usable here ;-)

Heh, I suspected so. Well, if I end up trying it, I'll first target NetBSD. Hopefully, the kernel-side code will not be too hard to port to other systems.

BTW, your examples on http://www.netbsd.org/~jmmv/atf/examples.html
do not work:

 o  In t_example_1.cpp: It should be ATF_ADD_TEST_CASE(tcs, pow_func)
    instead of tcs.push_back(&pow_func)

Oops, obsolete text.  Will fix it now, thanks.

 o  In t_example_2: atf.header.subr and atf.footer.subr are necessary
    to be included and you have to set Prog_Name and call main.

This is not an error. You must use 'atf-compile' on shell scripts to generate the final, working executable. Looks like I should add a note about this in the web page :-)

(By the way, also look at atf(7) after installing atf-0.4. I hope it will clarify many things, and if not, please let me know!)

Thanks.



Home | Main Index | Thread Index | Old Index