How do I extend Kyua requirements checking for FreeBSD?

Julio Merino jmmv at
Thu Jul 24 19:41:55 UTC 2014

On Thu, Jun 26, 2014 at 3:54 PM, Garrett Cooper <yaneurabeya at> wrote:
>> I did it just be creating a library of shell functions that I call
>> from test bodies.  For example, something like this
>> function require_module() {
>>    kldstat $1 || atf_skip "Module $1 is not loaded"
>> }
> This is sort of what I'm doing, but this only works for the ATF test
> interface :/. I used kldstat -m $1 by the way for detecting statically
> compiled kernel modules, like aio:

Yeah, creating a library of helper functions is the easiest way now
with the disadvantage that this won't work for non-ATF test programs
as you say.

>> But that's not useful for C and C++ tests.  And it would be way cooler
>> if it were more tightly integrated into Kyua.  Would it be possible to
>> load site-specific Lua code that would handle this sort of
>> functionality, so the test could simply say "atf_set require.modules
>> aio"?
> Exactly!

Hmm, Lua extensions. That's actually a very nice idea!

More information about the freebsd-testing mailing list