On Fri, 2018-06-01 at 04:02 -0400, Hongzhi.Song wrote:
> We are going to let runtime test support kernel tests. Now we just
> add
> kernel self-contained sample tests. And we plan to add overall kernel
> tests in the future.
> 
> This patch is just add kernel samples test which contains about 13
> tests
> enabled by kernel-sample.scc. So it needs statement,
> KERNEL_FEATURES_append += " kernel-sample/kernel-sample.scc" in
> local.conf.
> 
> Signed-off-by: Hongzhi.Song <hongzhi.s...@windriver.com>
> ---
>  meta/lib/oeqa/runtime/cases/ksample.py | 440
> +++++++++++++++++++++++++++++++++
>  1 file changed, 440 insertions(+)
>  create mode 100644 meta/lib/oeqa/runtime/cases/ksample.py
[...]
> +        # check config
> +        status, ret = self.target.run('zcat /proc/config.gz | grep 
> CONFIG_TRACING_SUPPORT')
> +        result = "CONFIG_TRACING_SUPPORT=y" in ret
> +        if not result:
> +            self.skipTest("CONFIG error")
> +        # make sure if module exists
> +        status, ret = self.target.run('uname -r')
> +        cmd = "ls " + "/lib/modules/" + ret + 
> "/kernel/samples/trace_events/trace-events-sample.ko"
> +        status, output = self.target.run(cmd)
> +        if status != 0:
> +            self.skipTest("trace-events-sample.ko doesn't exist")


There looks to be a fair bit of copy and paste code in these tests such
as the code above to look at config.gz. Could you turn some of these
into shared functions please?

Also, do we want to include this kernel-sample feature to the qemu
machines by default so that we enable these tests?

Cheers,

Richard

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to