[LTP] [PATCH v2 2/2] Skip oversleep checks in timer tests under VM

Jan Stancek jstancek@redhat.com
Wed Apr 29 08:54:57 CEST 2020



----- Original Message -----
> Timer tests often fail on sleep overrun when LTP is running inside a VM.
> The main cause is usually that the VM doesn't get enough CPU time to wake up
> the test process in time. Disable oversleep tests if tst_is_virt() detects
> any hypervisor.

> BTW, systemd-detect-virt can't detect the PowerPC LPAR hypervisor.

Same with virt-what. We could (in separate patch) add check for
'pseries_platform' (powerpc-utils) output:

# pseries_platform
PowerVM pSeries LPAR

# pseries_platform
PowerNV Host

# pseries_platform
Power KVM pSeries Guest

>  
> +	/*
> +	 * Running tests in VM may cause timing issues, disable upper bound
> +	 * checks if LTP_VM_ENV is set to non-zero.
> +	 */
> +	virt_env = tst_is_virt(VIRT_ANY);

The comment still mentions LTP_VM_ENV. Other than that, I don't have major
objections. Maybe somebody would like to run strict checks on VMs too, but
that's something we could add later with an env. variable.



More information about the ltp mailing list