All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: "Hongzhi.Song" <hongzhi.song@windriver.com>,
	openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] Meta runtime cases: add testcases for kernel sample
Date: Fri, 01 Jun 2018 09:12:39 +0100	[thread overview]
Message-ID: <1527840759.16911.180.camel@linuxfoundation.org> (raw)
In-Reply-To: <1527840158-99078-1-git-send-email-hongzhi.song@windriver.com>

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.song@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



  reply	other threads:[~2018-06-01  8:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-01  8:02 [PATCH] Meta runtime cases: add testcases for kernel sample Hongzhi.Song
2018-06-01  8:12 ` Richard Purdie [this message]
2018-06-01 23:48   ` Hongzhi, Song
2018-06-03 16:20     ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1527840759.16911.180.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=hongzhi.song@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.