Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jul 2014 15:41:27 -0400
From:      Julio Merino <jmmv@freebsd.org>
To:        Garrett Cooper <yaneurabeya@gmail.com>
Cc:        "freebsd-testing@freebsd.org" <freebsd-testing@freebsd.org>
Subject:   Re: How do I extend Kyua requirements checking for FreeBSD?
Message-ID:  <CAFY7cWBf6dvdw4sotUZ4M-%2BzXnQygRc0Ec9VEGUrVo8FBgP2LA@mail.gmail.com>
In-Reply-To: <CAGHfRMC_JmA8R3JfYHotsu_TvayvMahuQar%2BY29Q9zLgbPrC3g@mail.gmail.com>
References:  <CAGHfRMAURGkTRv29Kgd4YF%2B4VQ12_9GkOf=uCQ0BAcBLJcWXZQ@mail.gmail.com> <CAOtMX2i2dT1HR_mO-Qm6VkeJbYRDfWbQ3SOW%2B-K3uXTYLtau2Q@mail.gmail.com> <CAGHfRMC_JmA8R3JfYHotsu_TvayvMahuQar%2BY29Q9zLgbPrC3g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jun 26, 2014 at 3:54 PM, Garrett Cooper <yaneurabeya@gmail.com> 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!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFY7cWBf6dvdw4sotUZ4M-%2BzXnQygRc0Ec9VEGUrVo8FBgP2LA>