All of lore.kernel.org
 help / color / mirror / Atom feed
* How to use kci_test?
@ 2020-06-22  3:10 leimaohui
  2020-06-28  6:38 ` Corentin Labbe
  0 siblings, 1 reply; 5+ messages in thread
From: leimaohui @ 2020-06-22  3:10 UTC (permalink / raw)
  To: kernelci@groups.io

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?

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

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'

Best regards
Lei Maohui


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to use kci_test?
       [not found] <161ABF04116C5EFF.11535@groups.io>
@ 2020-06-28  3:55 ` leimaohui
  0 siblings, 0 replies; 5+ messages in thread
From: leimaohui @ 2020-06-28  3:55 UTC (permalink / raw)
  To: kernelci@groups.io, Lei, Maohui

ping


________________________________________
From: kernelci@groups.io <kernelci@groups.io> on behalf of leimaohui <leimaohui@cn.fujitsu.com>
Sent: Monday, 22 June 2020 11:10
To: kernelci@groups.io
Subject: How to use kci_test?

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?

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

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'

Best regards
Lei Maohui







^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to use kci_test?
  2020-06-22  3:10 leimaohui
@ 2020-06-28  6:38 ` Corentin Labbe
  2020-06-29  8:04   ` Guillaume Tucker
  0 siblings, 1 reply; 5+ messages in thread
From: Corentin Labbe @ 2020-06-28  6:38 UTC (permalink / raw)
  To: kernelci, leimaohui

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.


> 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'
> 

Probably some user/token are wrong

Regards

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to use kci_test?
  2020-06-28  6:38 ` Corentin Labbe
@ 2020-06-29  8:04   ` Guillaume Tucker
  2020-06-30  7:18     ` leimaohui
  0 siblings, 1 reply; 5+ messages in thread
From: Guillaume Tucker @ 2020-06-29  8:04 UTC (permalink / raw)
  To: leimaohui; +Cc: kernelci, clabbe

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to use kci_test?
  2020-06-29  8:04   ` Guillaume Tucker
@ 2020-06-30  7:18     ` leimaohui
  0 siblings, 0 replies; 5+ messages in thread
From: leimaohui @ 2020-06-30  7:18 UTC (permalink / raw)
  To: kernelci@groups.io, guillaume.tucker@collabora.com; +Cc: clabbe@baylibre.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








^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-06-30  7:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <161ABF04116C5EFF.11535@groups.io>
2020-06-28  3:55 ` How to use kci_test? leimaohui
2020-06-22  3:10 leimaohui
2020-06-28  6:38 ` Corentin Labbe
2020-06-29  8:04   ` Guillaume Tucker
2020-06-30  7:18     ` leimaohui

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.