Re: [kvm-unit-tests PATCH v3] x86: Support environments without test-devices

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

 



On Mon, Jul 22, 2019 at 03:55:40PM -0700, Nadav Amit wrote:
> Enable to run the tests when test-device is not present (e.g.,
> bare-metal). Users can provide the number of CPUs and ram size through
> kernel parameters.
> 
> On Ubuntu that uses grub, for example, the tests can be run by copying a
> test to the boot directory (/boot) and adding a menu-entry to grub
> (e.g., by editing /etc/grub.d/40_custom):
> 
>   menuentry 'idt_test' {
> 	set root='[ROOT]'
> 	multiboot [BOOT_RELATIVE]/[TEST].flat [PARAMETERS]
> 	module params.initrd
>   }
> 
> Replace:
>   * [ROOT] with `grub-probe --target=bios_hints /boot`
>   * [BOOT_RELATIVE] with `grub-mkrelpath /boot`
>   * [TEST] with the test executed
>   * [PARAMETERS] with the test parameters
> 
> params.initrd, which would be located on the boot directory should
> describe the machine and tell the test infrastructure that a test
> device is not present and boot-loader was used (the bootloader and qemu
> deliver test . For example for a 4 core machines with 4GB of
> memory:
> 
>   NR_CPUS=4
>   MEMSIZE=4096
>   TEST_DEVICE=0
>   BOOTLOADER=1
> 
> Since we do not really use E820, using more than 4GB is likely to fail
> due to holes.
> 
> Finally, do not forget to run update-grub. Remember that the output goes
> to the serial port.
> 
> Cc: Andrew Jones <drjones@xxxxxxxxxx>
> Signed-off-by: Nadav Amit <nadav.amit@xxxxxxxxx>
> 
> ---
> 
> v2->v3:
>  * Adding argument to argv when bootloader is used [Andrew]
>  * Avoid unnecessary check of test-device availability [Andrew]
> 
> v1->v2:
>  * Using initrd to hold configuration override [Andrew]
>  * Adapting vmx, tscdeadline_latency not to ignore the first argument
>    on native
> ---
>  lib/argv.c      | 13 +++++++++----
>  lib/argv.h      |  1 +
>  lib/x86/fwcfg.c | 28 ++++++++++++++++++++++++++++
>  lib/x86/fwcfg.h | 10 ++++++++++
>  lib/x86/setup.c |  5 +++++
>  x86/apic.c      |  4 +++-
>  x86/cstart64.S  |  8 ++++++--
>  x86/eventinj.c  | 17 ++++++++++++++---
>  x86/vmx_tests.c |  5 +++++
>  9 files changed, 81 insertions(+), 10 deletions(-)
> 

Reviewed-by: Andrew Jones <drjones@xxxxxxxxxx>



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux