grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 8/8] travis: Test module loading from tftp as well


From: Alexander Graf
Subject: Re: [PATCH v2 8/8] travis: Test module loading from tftp as well
Date: Tue, 14 May 2019 06:18:41 -0700
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 10.05.19 13:24, Daniel Kiper wrote:
> On Thu, May 02, 2019 at 08:55:37AM +0200, Alexander Graf wrote:
>> The travis test today only uses modules that are delivered with the
>> grub.efi binary. Let's drop echo and reboot and see if grub can load
>> them dynamically.
>>
>> For this, we need to ensure that all modules required to load additional
>> modules are included in the grub binary. Some of these are target
>> specific (like efinet), so only include them conditionally.
>>
>> Furthermore, the iPXE option rom included in Ubuntu Xenial seems to be
>> broken, so we need to ensure that we only use the OVMF built-in network
>> driver and not pass in an option rom.
>>
>> Signed-off-by: Alexander Graf <address@hidden>
>>
>> ---
>>
>> v1 -> v2:
>>
>>   - new patch
>> ---
>>  .travis.yml | 22 +++++++++++++++++-----
>>  1 file changed, 17 insertions(+), 5 deletions(-)
>>
>> diff --git a/.travis.yml b/.travis.yml
>> index d8f6170e6..9bed42ac5 100644
>> --- a/.travis.yml
>> +++ b/.travis.yml
>> @@ -67,15 +67,27 @@ script:
>>      done
>>
>>    # Our test canary.
>> -  - echo -e "insmod echo\\ninsmod reboot\\necho hello world\\nreboot" > 
>> grub.cfg
>> +  - echo -e "insmod echo\\ninsmod reboot\\necho hello world\\nreboot" > 
>> /tmp/grub/lib/grub/grub.cfg
>>
>>    # Assemble images and possibly run them.
>> -  - ( for target in $GRUB_TARGETS; do grub-mkimage -c grub.cfg -p / -O 
>> $target -o grub-$target echo reboot normal || exit; done )
>> +  - ( for target in $GRUB_TARGETS; do
>> +        pushd /tmp/grub/lib/grub/;
>> +        if [ -f $target/efinet.mod ]; then
>> +          EXTMODULES="efinet";
>> +        else
>> +          EXTMODULES="";
>> +        fi;
>> +        grub-mkimage -p / -O $target -o grub-$target normal tftp 
>> $EXTMODULES || exit;
>> +        popd;
>> +      done )
>>
>>    # Run images we know how to run.
>> -  - if [[ "$GRUB_TARGETS" == *"x86_64-efi"* ]]; then qemu-system-x86_64     
>>                      -bios /usr/share/ovmf/OVMF.fd -m 512 -no-reboot 
>> -nographic -net nic -net user,tftp=.,bootfile=grub-x86_64-efi | tee grub.log 
>> && grep "hello world" grub.log; fi
>> -  - if [[ "$GRUB_TARGETS" == *"arm64-efi"* ]];  then qemu-system-aarch64 -M 
>> virt -cpu cortex-a57 -bios QEMU_EFI.aarch64.fd     -m 512 -no-reboot 
>> -nographic -net nic -net user,tftp=.,bootfile=grub-arm64-efi  | tee grub.log 
>> && grep "hello world" grub.log; fi
>> -  - if [[ "$GRUB_TARGETS" == *"arm-efi"* ]];    then qemu-system-arm     -M 
>> virt -cpu cortex-a15 -bios QEMU_EFI.arm.fd         -m 512 -no-reboot 
>> -nographic -net nic -net user,tftp=.,bootfile=grub-arm-efi    | tee grub.log 
>> && grep "hello world" grub.log; fi
>> +  - if [[ "$GRUB_TARGETS" == *"x86_64-efi"* ]]; then qemu-system-x86_64     
>>                      -bios /usr/share/ovmf/OVMF.fd
>> +                         -m 512 -no-reboot -nographic -net none -netdev 
>> user,id=nd,tftp=/tmp/grub/lib/grub/,bootfile=grub-x86_64-efi -device 
>> virtio-net-pci,netdev=nd,romfile="" | tee grub.log && grep "hello world" 
>> grub.log; fi
>> +  - if [[ "$GRUB_TARGETS" == *"arm64-efi"* ]];  then qemu-system-aarch64 -M 
>> virt -cpu cortex-a57 -bios QEMU_EFI.aarch64.fd
>> +                         -m 512 -no-reboot -nographic -net none -netdev 
>> user,id=nd,tftp=/tmp/grub/lib/grub/,bootfile=grub-arm64-efi  -device 
>> virtio-net-pci,netdev=nd,romfile="" | tee grub.log && grep "hello world" 
>> grub.log; fi
>> +  - if [[ "$GRUB_TARGETS" == *"arm-efi"* ]];    then qemu-system-arm     -M 
>> virt -cpu cortex-a15 -bios QEMU_EFI.arm.fd
>> +                         -m 512 -no-reboot -nographic -net none -netdev 
>> user,id=nd,tftp=/tmp/grub/lib/grub/,bootfile=grub-arm-efi    -device 
>> virtio-net-pci,netdev=nd,romfile="" | tee grub.log && grep "hello world" 
>> grub.log; fi
> I am not sure why you do not use grep directly on the output.
> Could you drop tee? If yes please drop it from all commands.


This way you can see the VM output on the log. Without that, it becomes
really hard to debug when something goes wrong.


Alex





reply via email to

[Prev in Thread] Current Thread [Next in Thread]