All of lore.kernel.org
 help / color / mirror / Atom feed
From: "leimaohui" <leimaohui@cn.fujitsu.com>
To: "kernelci@groups.io" <kernelci@groups.io>,
	"guillaume.tucker@collabora.com" <guillaume.tucker@collabora.com>
Cc: "clabbe@baylibre.com" <clabbe@baylibre.com>
Subject: Re: How to use kci_test?
Date: Tue, 30 Jun 2020 07:18:01 +0000	[thread overview]
Message-ID: <1593501481440.58333@cn.fujitsu.com> (raw)
In-Reply-To: <5b0e9ac3-7ec6-76a5-5713-dcf244d36d6e@collabora.com>

Hi, Guillaume, LABBE

I have solved this issue with your replies. Thank both of you very much!

Best regards
Lei


________________________________________
From: kernelci@groups.io <kernelci@groups.io> on behalf of Guillaume Tucker <guillaume.tucker@collabora.com>
Sent: Monday, 29 June 2020 16:04
To: Lei, Maohui
Cc: kernelci@groups.io; clabbe@baylibre.com
Subject: Re: How to use kci_test?

On 28/06/2020 07:38, Corentin Labbe wrote:
> On Mon, Jun 22, 2020 at 03:10:31AM +0000, leimaohui wrote:
>> Hi, all
>>
>> I am learning to use kernelci. At present, I have installed kernelci docker and lava docker, and use kci_ build builds the kernel.
>> Using kci_test, we encountered some problems:
>>
>> 1. What do I need to do to connect kernelci and lava before the test command?
>>
>
> Hello
>
> You need to create a lab in kernelci, you can use https://github.com/kernelci/kernelci-admin for this
> With this lab created, you will have a token for it.
>
> For LAVA, you need to have a LAVA instance working with a qemu passing healthcheck.
> Then you need to create an user and get the token of it.

As you've installed LAVA Docker, you should have a local LAVA
lab.  You need to create an API token for it with a user
called "kernel-ci".  Then as you have a KernelCI Docker container
running locally, there's no need to get anything connected to
kernelci.org with your local setup.


>> 2. Is the following understanding of kci_test's options correct​?
>> For example:
>> ./kci_test generate
>>
>>   --bmeta-json=linux/_install_/bmeta.json \      //bmeta file in build directory generated by kci_build
>>   --dtbs-json=linux/_install_/dtbs.json \             //dtbs file in build directory generated by kci_build​
>>   --plan=baseline_qemu \                                      // test_plan
>>   --target=qemu_arm64-virt-gicv3 \                     //device_type
>>   --lab=lab-name \                                                   //lab name which is recorded in lab-configs.yaml
>>  --user=kernelci-user-name \                               //user of lava for kernelci test
>>   --token=abcd-7890 \                                            //token of lava user for kenelci test
>>   --lab-json=lab-name.json \                                  //JSON file generated by executing command get_lab_info
>>   > job.yaml
>>
>
> With all users/token and labname created in 1), it will works (generated some jobs in a directory "$labname"
>
>> 3. Error is occurred when executing the following command. Is there any problem with parameter specification?
>> Command line : $. / KCI_ test get_ lab_ info --lab=lab-linaro-lkft --lab-json=lab-linaro- lkft.json
>> Error message:   $ attributeerror: 'nonetype' object has no attribute 'scheduler'
>>

You're trying to use Linaro's LKFT lab, which kernelci.org, and
you don't have tokens for that which is normal.  In your case,
with your local setup, you need to use your own LAVA instance
with your local KernelCI Docker container.

To do that, you need to add an entry in lab-configs.yaml, for
example:

  local-lab:
    lab_type: lava
    url: 'http://localhost/RPC2'


The `local-lab` name is arbitrary but you'll need to use it in
the kci_test command line.  The URL needs to match your local
LAVA lab running in your Docker container.

Once you have this, you need to produce a kernel build using
kci_build, as explained in the kernelci-docs.  You can then
generate some tests for it using kci_test as also explained in
the docs, except you'll be using --lab=local-lab and your owh API
token.


What I've explained here, about how to set up a lab, seems like a
gap in the documentation so we should try to improve it for other
users in your case.

Best wishes,
Guillaume








  reply	other threads:[~2020-06-30  7:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-22  3:10 How to use kci_test? leimaohui
2020-06-28  6:38 ` Corentin Labbe
2020-06-29  8:04   ` Guillaume Tucker
2020-06-30  7:18     ` leimaohui [this message]
     [not found] <161ABF04116C5EFF.11535@groups.io>
2020-06-28  3:55 ` leimaohui

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=1593501481440.58333@cn.fujitsu.com \
    --to=leimaohui@cn.fujitsu.com \
    --cc=clabbe@baylibre.com \
    --cc=guillaume.tucker@collabora.com \
    --cc=kernelci@groups.io \
    /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.