These instructions provide some Example Tests and Test Cases you can use to validate your CIP Board-at-Desk Single-Developer (B@D) Virtual Machine (VM) or from which, you can learn how all of the tooling works together.
This set of instructions assumes you have already connected the board to the machine where you have installed B@D. If that is not the case please go back to the Beaglebone Black Setup & Configuration wiki page or Renesas IWG20M depending on the board you are using, which is step 3.
It is also assumed you have already created an initramfs with BusyBox for the board, that is step 4. If that is not the case, please go back to the wiki page where the creation is explained.
If you have a kernel that you have built on another machine that you wish to test with B@D please refer to Test 6.
Note that if you are using the latest version of B@D with LAVA 2018-4 or greater (LAVA version is checkable by clicking the Help button and examining the header of that Help page) then see Version specific information
1. On your host machine, open a web browser and enter the following in the address box:
http://localhost:8080
2. The LAVA Home Page is displayed in your web browser. Log in to the web server as the superuser:
3. Click on Scheduler and then select All Devices.
4. Click on the qemu01 Hostname
5. Click the Force Health Check button.
6. The results are displayed in the web page as the test runs. When the test is done, the status of the Job will show as Complete at the top of the page.
This is what the start of the Health Check looks like:
lava-dispatcher, installed at version: 2018.4-2~bpo9+1 start: 0 validate Start time: 2018-05-09 10:10:28.905849+00:00 (UTC) Validating that https://images.validation.linaro.org/kvm/standard/stretch-2.img.gz exists qemu-system-x86, installed at version: 1:2.8+dfsg-6+deb9u3 validate duration: 0.15 case: validate case_id: 1 definition: lava result: pass start: 1 deployimages (timeout 00:05:00) [common] start: 1.1 download-retry (timeout 00:05:00) [common] start: 1.1.1 http-download (timeout 00:05:00) [common] downloading https://images.validation.linaro.org/kvm/standard/stretch-2.img.gz saving as /var/lib/lava/dispatcher/tmp/1/deployimages-vsmyq1ic/rootfs/stretch-2.img
<snip>
This is what the end of a successful test looks like:
</snip> start: 4 finalize (timeout 00:05:00) [common] start: 4.1 power-off (timeout 00:00:05) [common] end: 4.1 power-off (duration 00:00:00) [common] start: 4.2 read-feedback (timeout 00:05:00) [common] <LAVA_TEST_RUNNER>: exiting lava-test-runner Listened to connection for namespace 'common' for 1s Finalising connection for namespace 'common' end: 4.2 read-feedback (duration 00:00:01) [common] end: 4 finalize (duration 00:00:01) [common] Cleaning after the job Cleaning up download directory: /var/lib/lava/dispatcher/tmp/1/deployimages-vsmyq1ic/rootfs Root tmp directory removed at /var/lib/lava/dispatcher/tmp/1 Job finished correctly case: job case_id: 10 definition: lava result: pass
7. You can see an example of a successful test log file here: the QEMU Test results
See the build howto for the method.
1. Check the status of the (4) blue user LED's on the Beaglebone Black. If they are all off, manually reboot the board by pressing the reset button (S1) or disconnect and reconnect the power cable to the board.
2. On your host machine, open a web browser and enter the following in the address box:
http://localhost:8080
3. The LAVA Home Page is displayed in your web browser. Log in to the web server as the superuser:
4. In a Vagrant ssh session change to the ~/git-repos/linux-cip
directory.
vagrant@guest:~$ cd ~/git-repos/linux-cip
5. Set the TREE_NAME environment variable.
vagrant@guest:~/git-repos/linux-cip$ export TREE_NAME=cip-example
Note: This must be the same name you used when you built the kernel.
6. Create a test - from within the linux-cip
git repository.
vagrant@guest:~/git-repos/linux-cip$ /vagrant/scripts/create_test.sh /vagrant/tests/bbb_debian_local.yaml ~/mytest-bbb.yaml
Note: create_test.sh
must be run in the linux-cip
directory so that the script can retrieve the git settings.
Note: mytest-bbb.yaml
is an example filename. Substitute your own test file name in its place.
7. Replace the current health check (see Health Check configuration for the location of the health check) with the contents of the yaml file you generated in the previous step.
8. Click on Scheduler and then select All Devices.
9. Click on the bbb01 Hostname
10. Click the Force Health Check button.
11. The results are displayed in the web page as the test runs. When the test is done, the status of the Job will show as Complete at the top of the page.
This is what the start of the Health Check looks like:
lava-dispatcher, installed at version: 2018.4-2~bpo9+1 start: 0 validate Start time: 2018-05-10 12:14:13.326013+00:00 (UTC) Validating that http://localhost:8010/initramfs/initramfs.cpio.gz exists Validating that http://localhost:8010/cip-test/cip_v4.4.126/v4.4.126-cip22/arm/omap2plus_defconfig/zImage exists Validating that http://localhost:8010/cip-test/cip_v4.4.126/v4.4.126-cip22/arm/omap2plus_defconfig/dtbs/am335x-boneblack.dtb exists Validating that http://localhost:8010/cip-test/cip_v4.4.126/v4.4.126-cip22/arm/omap2plus_defconfig/modules.tar.xz exists validate duration: 0.02 case: validate case_id: 128 definition: lava result: pass start: 1 tftp-deploy (timeout 00:04:00) [common] start: 1.1 download-retry (timeout 00:04:00) [common] start: 1.1.1 http-download (timeout 00:04:00) [common] Not decompressing ramdisk as can be used compressed. downloading http://localhost:8010/initramfs/initramfs.cpio.gz saving as /var/lib/lava/dispatcher/tmp/11/tftp-deploy-pozjv6jf/ramdisk/initramfs.cpio.gz <snip>
This is what the end of a successful test looks like:
</snip> Finalising connection for namespace 'common' end: 4.2 read-feedback (duration 00:00:01) [common] end: 4 finalize (duration 00:00:01) [common] Cleaning after the job Cleaning up download directory: /var/lib/lava/dispatcher/tmp/11/tftp-deploy-pozjv6jf/ramdisk Cleaning up download directory: /var/lib/lava/dispatcher/tmp/11/tftp-deploy-pozjv6jf/kernel Cleaning up download directory: /var/lib/lava/dispatcher/tmp/11/tftp-deploy-pozjv6jf/dtb Cleaning up download directory: /var/lib/lava/dispatcher/tmp/11/tftp-deploy-pozjv6jf/modules Override tmp directory removed at /var/lib/lava/dispatcher/tmp/11 Root tmp directory removed at /var/lib/lava/dispatcher/tmp/11 Job finished correctly case: job case_id: 142 definition: lava result: pass
Note: After running the health check, if the (4) user LED's are all off, manually reboot the board by pressing the reset button (S1) or disconnect and reconnect the power cable to the board before re-running the health check.
12. You can see an example of a successful test log file the Beaglebone Black Test results .
1. Check the status of the (4) blue user LED's on the Beaglebone Black. If they are all off, manually reboot the board by pressing the reset button (S1) or disconnect and reconnect the power cable to the board.
2. On your host machine, open a web browser and enter the following in the address box:
http://localhost:8080
3. The LAVA Home Page is displayed in your web browser. Log in to the web server as the superuser:
4. From the LAVA homepage, click on Scheduler and Submit Job
5. Copy the contents of the /vagrant/tests/bbb_debian_ramdisk_test.yaml
and paste them into the job definition box on the Submit Job page.
6. Modify the job's “Action Block” to include the paths to the files generated by Kernel CI.
7. Click on the Validate button under the job definition box to make sure the syntax of the job is correct.
8. Click the Submit button. You will then be taken to the page showing the log as it runs.
9. When the test is done, the status of the Job will show as Complete at the top of the page (if successful).
This is what the start of the Health Check looks like:
lava-dispatcher, installed at version: 2018.4-2~bpo9+1 start: 0 validate Start time: 2018-05-10 12:14:13.326013+00:00 (UTC) Validating that http://localhost:8010/initramfs/initramfs.cpio.gz exists Validating that http://localhost:8010/cip-test/cip_v4.4.126/v4.4.126-cip22/arm/omap2plus_defconfig/zImage exists Validating that http://localhost:8010/cip-test/cip_v4.4.126/v4.4.126-cip22/arm/omap2plus_defconfig/dtbs/am335x-boneblack.dtb exists Validating that http://localhost:8010/cip-test/cip_v4.4.126/v4.4.126-cip22/arm/omap2plus_defconfig/modules.tar.xz exists validate duration: 0.02 case: validate case_id: 128 definition: lava result: pass start: 1 tftp-deploy (timeout 00:04:00) [common] start: 1.1 download-retry (timeout 00:04:00) [common] start: 1.1.1 http-download (timeout 00:04:00) [common] Not decompressing ramdisk as can be used compressed. downloading http://localhost:8010/initramfs/initramfs.cpio.gz saving as /var/lib/lava/dispatcher/tmp/11/tftp-deploy-pozjv6jf/ramdisk/initramfs.cpio.gz <snip>
This is what the end of a successful test looks like:
</snip> Finalising connection for namespace 'common' end: 4.2 read-feedback (duration 00:00:01) [common] end: 4 finalize (duration 00:00:01) [common] Cleaning after the job Cleaning up download directory: /var/lib/lava/dispatcher/tmp/11/tftp-deploy-pozjv6jf/ramdisk Cleaning up download directory: /var/lib/lava/dispatcher/tmp/11/tftp-deploy-pozjv6jf/kernel Cleaning up download directory: /var/lib/lava/dispatcher/tmp/11/tftp-deploy-pozjv6jf/dtb Cleaning up download directory: /var/lib/lava/dispatcher/tmp/11/tftp-deploy-pozjv6jf/modules Override tmp directory removed at /var/lib/lava/dispatcher/tmp/11 Root tmp directory removed at /var/lib/lava/dispatcher/tmp/11 Job finished correctly case: job case_id: 142 definition: lava result: pass
1. On your host machine, open a web browser and enter the following in the address box:
http://localhost:8080
2. The LAVA Home Page is displayed in your web browser. Log in to the web server as the superuser:
3. In a Vagrant ssh session change to the ~/git-repos/linux-cip
directory.
vagrant@guest:~$ cd ~/git-repos/linux-cip
4. Set the TREE_NAME environment variable.
vagrant@guest:~/git-repos/linux-cip$ export TREE_NAME=cip-example
Note: This must be the same name you used when you built the kernel.
5. Create a test - from within the linux-cip
git repository.
vagrant@guest:~/git-repos/linux-cip$ /vagrant/scripts/create_test.sh /vagrant/tests/iwg20m-test-ramdisk.yaml ~/mytest-iwg20m.yaml
Note: create_test.sh
must be run in the linux-cip
directory so that the script can retrieve the git settings.
Note: mytest-iwg20m.yaml
is an example filename. Substitute your own test file name in its place.
6. Replace the current health check (see Health Check configuration for the location of the health check) with the contents of the yaml file you generated in the previous step.
7. Click on Scheduler and then select All Devices.
8. Click on the iwg20m01 Hostname
9. Click the Force Health Check button.
10. The results are displayed in the web page as the test runs. When the test is done, the status of the Job will show as Complete at the top of the page.
This is what the start of the Health Check looks like:
lava-dispatcher, installed at version: 2018.4-2~bpo9+1 start: 0 validate Start time: 2018-05-17 12:20:24.171357+00:00 (UTC) Validating that http://localhost:8010/initramfs/initramfs.cpio.gz exists Validating that http://localhost:8010/cip-checks/cip_v4.4.126/v4.4.126-cip22/arm/shmobile_defconfig/zImage exists Validating that http://localhost:8010/cip-checks/cip_v4.4.126/v4.4.126-cip22/arm/shmobile_defconfig/dtbs/r8a7743-iwg20d-q7.dtb exists Specifying a type in the boot action is deprecated. Please specify the kernel type in the deploy parameters. validate duration: 0.02 case: validate case_id: 114 definition: lava result: pass start: 1 tftp-deploy (timeout 00:05:00) [common] start: 1.1 download-retry (timeout 00:05:00) [common] start: 1.1.1 http-download (timeout 00:05:00) [common] Not decompressing ramdisk as can be used compressed. downloading http://localhost:8010/initramfs/initramfs.cpio.gz saving as /var/lib/lava/dispatcher/tmp/9/tftp-deploy-ge8cmxso/ramdisk/initramfs.cpio.gz total size: 5813656 (5MB) <snip>
This is what the end of a successful test looks like:
</snip> Finalising connection for namespace 'common' end: 4.2 read-feedback (duration 00:00:01) [common] end: 4 finalize (duration 00:00:01) [common] Cleaning after the job Cleaning up download directory: /var/lib/lava/dispatcher/tmp/9/tftp-deploy-ge8cmxso/ramdisk Cleaning up download directory: /var/lib/lava/dispatcher/tmp/9/tftp-deploy-ge8cmxso/kernel Cleaning up download directory: /var/lib/lava/dispatcher/tmp/9/tftp-deploy-ge8cmxso/dtb Override tmp directory removed at /var/lib/lava/dispatcher/tmp/9 Root tmp directory removed at /var/lib/lava/dispatcher/tmp/9 Job finished correctly case: job case_id: 127 definition: lava result: pass
11. You can see an example of a successful test log file the Renesas IWG20M Test results .
Note that lava-tool is deprecated so, in preference, set up and use lavacli see lavacli instructions.
1. On the Virtual machine change to the ~/git-repos/linux-cip
directory.
vagrant@guest:~$ cd ~/git-repos/linux-cip
2. If you have not already done so, you will need to create an authentication token
In the LAVA web interface, click on API->Authentication Tokens and then on the 'new' button, give it a description and then click the 'View Token Hash' button and copy the displayed hash value. Then:
vagrant@guest:~/git-repos/linux-cip$ lava-tool auth-add http://lavauser@localhost:8080/RPC2
Paste token for http://lavauser@localhost:8080/RPC2/: **paste token - which will not be echoed**
3. Set the TREE_NAME environment variable.
vagrant@guest:~/git-repos/linux-cip$ export TREE_NAME=cip-example
Note: This must be the same name you used when you built the kernel.
4. Create a test for use with the lava-tool
utility from within the linux-cip
git repository.
vagrant@guest:~/git-repos/linux-cip$ /vagrant/scripts/create_test.sh /vagrant/tests/bbb_debian_local.yaml ~/mytest-board.yaml
- if you are using the Renesas IWG20M use /vagrant/tests/iwg20m-test-ramdisk.yaml as the second parameter!
Note: create_test.sh
must be run in the linux-cip
directory so that the script can retrieve the git settings.
Note: mytest-board.yaml
is an example filename. Substitute your own test file name in its place.
5. Run the lava-tool command
to submit the job to LAVA.
vagrant@guest:~/git-repos/linux-cip$ lava-tool submit-job http://lavauser@localhost:8080/RPC2 ~/mytest-bbb.yaml
submitted as job: http://localhost:8080/scheduler/job/12
Note: Please see the LAVA documentation for help writing tests in LAVA,
6. On your host machine, open a web browser and navigate to the LAVA Website:
http://localhost:8080
7. Click on the Scheduler menu and select the All Jobs option.
8. Click on the View Job Results icon for the top job to watch the build.
9. The results are displayed in the web page as the test runs. When the test is done, the status of the Job will show as Complete at the top of the page.
This is an example what the start of the test looks like in the Beaglebone case:
lava-dispatcher, installed at version: 2018.4-2~bpo9+1 start: 0 validate Start time: 2018-05-10 12:14:13.326013+00:00 (UTC) Validating that http://localhost:8010/initramfs/initramfs.cpio.gz exists Validating that http://localhost:8010/cip-test/cip_v4.4.126/v4.4.126-cip22/arm/omap2plus_defconfig/zImage exists Validating that http://localhost:8010/cip-test/cip_v4.4.126/v4.4.126-cip22/arm/omap2plus_defconfig/dtbs/am335x-boneblack.dtb exists Validating that http://localhost:8010/cip-test/cip_v4.4.126/v4.4.126-cip22/arm/omap2plus_defconfig/modules.tar.xz exists validate duration: 0.02 case: validate case_id: 128 definition: lava result: pass start: 1 tftp-deploy (timeout 00:04:00) [common] start: 1.1 download-retry (timeout 00:04:00) [common] start: 1.1.1 http-download (timeout 00:04:00) [common] Not decompressing ramdisk as can be used compressed. downloading http://localhost:8010/initramfs/initramfs.cpio.gz saving as /var/lib/lava/dispatcher/tmp/11/tftp-deploy-pozjv6jf/ramdisk/initramfs.cpio.gz <snip>
This is what the end of a successful test looks like:
</snip> Finalising connection for namespace 'common' end: 4.2 read-feedback (duration 00:00:01) [common] end: 4 finalize (duration 00:00:01) [common] Cleaning after the job Cleaning up download directory: /var/lib/lava/dispatcher/tmp/11/tftp-deploy-pozjv6jf/ramdisk Cleaning up download directory: /var/lib/lava/dispatcher/tmp/11/tftp-deploy-pozjv6jf/kernel Cleaning up download directory: /var/lib/lava/dispatcher/tmp/11/tftp-deploy-pozjv6jf/dtb Cleaning up download directory: /var/lib/lava/dispatcher/tmp/11/tftp-deploy-pozjv6jf/modules Override tmp directory removed at /var/lib/lava/dispatcher/tmp/11 Root tmp directory removed at /var/lib/lava/dispatcher/tmp/11 Job finished correctly case: job case_id: 142 definition: lava result: pass
Note: After running the test, if the (4) user LED's are all off, manually reboot the board by pressing the reset button (S1) or disconnect and reconnect the power cable to the board before re-running the test.
10. You can see an example of a successful test log file the Beaglebone Black Test results .
1. On the Virtual machine change to the ~/git-repos/linux-cip
directory.
vagrant@guest:~$ cd ~/git-repos/linux-cip
2. If you have not done so you will need to install lavacli:
vagrant@guest:~$ sudo apt install lavacli
vagrant@guest:~$ mkdir ~/.config
3. If you have not already done so, you will need to create an authentication token
In the LAVA web interface, click on API->Authentication Tokens and then on the 'new' button, give it a description and then click the 'View Token Hash' button and copy the displayed hash value. Then:
vagrant@guest:~/git-repos/linux-cip$ lavacli identities add --token <paste token here> --uri http://localhost:8080/RPC2 --username lavauser boardAtDesk
4. Set the TREE_NAME environment variable.
vagrant@guest:~/git-repos/linux-cip$ export TREE_NAME=cip-example
Note: This must be the same name you used when you built the kernel.
5. Create a test for use with the lava-tool
utility from within the linux-cip
git repository.
vagrant@guest:~/git-repos/linux-cip$ /vagrant/scripts/create_test.sh /vagrant/tests/bbb_debian_local.yaml ~/mytest-board.yaml
- if you are using the Renesas IWG20M use /vagrant/tests/iwg20m-test-ramdisk.yaml as the second parameter!
Note: create_test.sh
must be run in the linux-cip
directory so that the script can retrieve the git settings.
Note: mytest-board.yaml
is an example filename. Substitute your own test file name in its place.
6. Run the lavacli command
to submit the job to LAVA.
vagrant@guest:~/git-repos/linux-cip$ lavacli -i boardAtDesk jobs submit ~/mytest-bbb.yaml
// a job number will be echoed //
Note: Please see the LAVA documentation for help writing tests in LAVA,
7. On your host machine, open a web browser and navigate to the LAVA Website:
8. Click on the Scheduler menu and select the All Jobs option.
9. Click on the View Job Results icon for the top job to watch the build.
10. The results are displayed in the web page as the test runs. When the test is done, the status of the Job will show as Complete at the top of the page.
This is an example what the start of the test looks like in the Beaglebone case:
lava-dispatcher, installed at version: 2018.4-2~bpo9+1 start: 0 validate Start time: 2018-05-10 12:14:13.326013+00:00 (UTC) Validating that http://localhost:8010/initramfs/initramfs.cpio.gz exists Validating that http://localhost:8010/cip-test/cip_v4.4.126/v4.4.126-cip22/arm/omap2plus_defconfig/zImage exists Validating that http://localhost:8010/cip-test/cip_v4.4.126/v4.4.126-cip22/arm/omap2plus_defconfig/dtbs/am335x-boneblack.dtb exists Validating that http://localhost:8010/cip-test/cip_v4.4.126/v4.4.126-cip22/arm/omap2plus_defconfig/modules.tar.xz exists validate duration: 0.02 case: validate case_id: 128 definition: lava result: pass start: 1 tftp-deploy (timeout 00:04:00) [common] start: 1.1 download-retry (timeout 00:04:00) [common] start: 1.1.1 http-download (timeout 00:04:00) [common] Not decompressing ramdisk as can be used compressed. downloading http://localhost:8010/initramfs/initramfs.cpio.gz saving as /var/lib/lava/dispatcher/tmp/11/tftp-deploy-pozjv6jf/ramdisk/initramfs.cpio.gz <snip>
This is what the end of a successful test looks like:
</snip> Finalising connection for namespace 'common' end: 4.2 read-feedback (duration 00:00:01) [common] end: 4 finalize (duration 00:00:01) [common] Cleaning after the job Cleaning up download directory: /var/lib/lava/dispatcher/tmp/11/tftp-deploy-pozjv6jf/ramdisk Cleaning up download directory: /var/lib/lava/dispatcher/tmp/11/tftp-deploy-pozjv6jf/kernel Cleaning up download directory: /var/lib/lava/dispatcher/tmp/11/tftp-deploy-pozjv6jf/dtb Cleaning up download directory: /var/lib/lava/dispatcher/tmp/11/tftp-deploy-pozjv6jf/modules Override tmp directory removed at /var/lib/lava/dispatcher/tmp/11 Root tmp directory removed at /var/lib/lava/dispatcher/tmp/11 Job finished correctly case: job case_id: 142 definition: lava result: pass
Note: After running the test, if the (4) user LED's are all off, manually reboot the board by pressing the reset button (S1) or disconnect and reconnect the power cable to the board before re-running the test.
11. You can see an example of a successful test log file the Beaglebone Black Test results .
vagrant scp $PATH_TO/kernelFiles.tgz :kernelFiles.tgz
With this version of LAVA, in the above test cases, replace any of the following sequences:
Click on Scheduler and then select All Devices.
Click on the BoardName Hostname
Click the Force Health Check button.
With:
In Administration scroll down to Devices and select it, tick the appropriate device and then in the Action pull down select 'Update health of selected devices to Unknown' and click the 'Go' button.
If a test file has been generated and you wish to replace the default health check then copy it as below:
vagrant@guest:~$ sudo cp testFileName.yaml /etc/lava-server/dispatcher-config/health-checks/DeviceName.yaml
So for the supported devices replace DeviceName with beaglebone-black.yaml or renesas-iwg20m.yaml as appropriate.
If you wish to just test then use the lavacli instructions, replacing the file with your appropriate test.
Return to the B@D feature page