Bug 9706 - Systemd-boot: Create test harness in OE
Summary: Systemd-boot: Create test harness in OE
Status: VERIFIED FIXED
Alias: None
Product: BSPs
Classification: Build System, Metadata & Runtime
Component: bsps-oe-core (show other bugs)
Version: 2.0
Hardware: x86 Multiple
: Medium+ enhancement
Target Milestone: 2.2 M2
Assignee: Jose Perez C
QA Contact: David Rodriguez
URL:
Whiteboard:
Depends on:
Blocks: 9903
  Show dependency tree
 
Reported: 2016-06-03 17:25 UTC by Jianxun Zhang
Modified: 2016-08-17 13:50 UTC (History)
1 user (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jianxun Zhang 2016-06-03 17:25:20 UTC
The new bootloader systemd-boot has been in poky master http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=c71f5ab37416629793b9f826480d440d67531791

Now we should create a new test script in OE like what we did for the existing gummiboot.
Comment 1 Jianxun Zhang 2016-06-03 17:26:35 UTC
The work will involve creating new test cases in testpidia and actual python script in OE.
Comment 2 Jianxun Zhang 2016-06-09 17:29:41 UTC
I will create equivalent test cases for systemd-boot based on these existing gummiboot cases:

https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1101
https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1103
Comment 3 Jianxun Zhang 2016-06-09 18:11:38 UTC
I don't have sufficient permission to create test cases in testopia when I tried to add fist test case so I dump information here:

Summary:
systemd-boot: Check if EFI bootloader can be built in poky

Action:
Clone poky
Source environment
Set EFI_PROVIDER = "systemd-boot" and MACHINE = "genericx86-64" in conf/local.conf
Run "bitbake mtools-native core-image-minimal"
Try to use mtool to copy EFI/BOOT/bootx64.efi from hddimg, fail if not successfull
diff copied bootx64.efi against systemd-bootx64.efi in build directory of systemd-boot, fail if two images are not identical.
Pass

Expected Result:
systemd-bootx64.efi can be built successfully.
system-bootx64.efi can be deployed as bootx64.efi in correct location on EFI partition in hddimg file.
Comment 4 Jianxun Zhang 2016-06-10 01:28:25 UTC
The second test case is for wic similarly as gummiboot:
 - After the image is built, run command: wic create mkgummidisk -e core-image-minimal"

Note we could have a new "mksdbootdisk" option to replace "mkgummidisk". This requires another functional patch in OE.

Please QA team create the first test case in my previous comments and then contact me for the 2nd new test case.
Comment 5 Jose Perez C 2016-06-15 13:49:57 UTC
I created Test Case on Testopia, please review it and as soon as I get the approval I'll work on the automated test case.

 https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=1445
Comment 6 Jose Perez C 2016-07-04 21:33:16 UTC
Patch sent for review :

https://lists.yoctoproject.org/pipermail/poky/2016-July/thread.html
Comment 7 Jose Perez C 2016-07-04 21:34:13 UTC
link corrected form Comment 6

https://lists.yoctoproject.org/pipermail/poky/2016-July/010614.html
Comment 8 Jianxun Zhang 2016-07-05 04:58:43 UTC
Jose,
I just noticed patch should be implemented as the new test case, but the steps in test case are not the same thing I depicted in this ticket. I think the original gummiboot TC actually doesn't verify the final output in image. That's why we should improve it a a new way.

Could you go over what I outlined in my previous comments?

Thanks
Comment 9 Jose Perez C 2016-07-11 13:58:32 UTC
After a talk with the reporter Jianxun Zhang, the main objective of create test harness is already coverd by this patch [1], Bug 9903 opened has enhancement to add more test cases to the harness starting with the one mentioned on Comment 3. 


1 - https://lists.yoctoproject.org/pipermail/poky/2016-July/010614.html
Comment 10 Ross Burton 2016-07-26 16:34:24 UTC
Merged in oe-core 3f859816aef3c3dba35cfbea15f0c56483205544.
Comment 11 David Rodriguez 2016-08-17 13:50:28 UTC
Verified on Master, using TC in comment 5 and "test_efi_systemdboot_images_can_be_built" method. Systemd-boot images can be built correctly.