d101cabf6356d7a3fb027b20ef709d235d708c2b |
|
14-Feb-2017 |
Cyril Hrubis <chrubis@suse.cz> |
lib: Redirect to tst_brk_() early This is first patch of a patchset that would allow us to use SAFE_MACROS() in newlib testcases. After the patch we redirect to tst_brk_() in case of newlib tests directly in the test library code. This is needed since the tst_brkm_() from the old library is marked as attribute ((noreturn)) and because of that the return address is not saved on stack and hence we cannot return from the function. Removing the atrribute is not an option either since that generates ~1000 "control reaches end of non-void function" warnings. This commit redefines tst_brkm in test.h for the test library code so that we branch depending on if we are running oldlib/newlib testcase and call corresponding tst_brk_() or tst_brkm_() function directly instead of branching in the tst_brkm_() code. We also had to add a few returns to various places in the test library so that we exit corresponding function in a case that tst_brkm() actually returned. Signed-off-by: Cyril Hrubis <chrubis@suse.cz> Acked-by: Jan Stancek <jstancek@redhat.com>
/external/ltp/lib/tst_virt.c
|
794b46d9127198b40e73dec3ff3e3889a1f345e1 |
|
18-Aug-2016 |
Cyril Hrubis <chrubis@suse.cz> |
tst_virt: Make use of systemd-detect-virt if available The problem is that there is no defined way to detect if we are inside of a virtual machine, only bunch of heuristics. If you look at the src/basic/virt.c in systemd source code it's ~500 lines of code that tries many different things to try to guess if we are running virtualized and under what hypervisor. Currenlty LTP fails to detect KVM in OpenStack Cloud (and possibly many more) since the /proc/cpuinfo does not contain the QEMU string there. You can also boot QEMU with non-default -cpu option and you will get the same result. The easiest solution is to try the systemd-detect-virt first if it exists, then we fall back to the previously implemented detections for older distributions. This is not complete solution, as the detection still fails with older and non-systemd distributions, but it at least fixes the bug for most distributions. Signed-off-by: Cyril Hrubis <chrubis@suse.cz> Acked-by: Jan Stancek <jstancek@redhat.com>
/external/ltp/lib/tst_virt.c
|
5b617e23f4ff2bfde93e4584337b88e279d5df2c |
|
04-Feb-2015 |
Jiri Jaburek <jjaburek@redhat.com> |
lib: support VIRT_KVM for tst_is_virt() Signed-off-by: Jiri Jaburek <jjaburek@redhat.com>
/external/ltp/lib/tst_virt.c
|
852807b3a8811cd1b9525b3e457ca53447d56219 |
|
20-May-2014 |
Xing Gu <gux.fnst@cn.fujitsu.com> |
lib: safe_stdio.c, tst_virt.c: delete the redundant code Since tst_brkm() can break remaining test cases, the code after this function is redundant. Signed-off-by: Xing Gu <gux.fnst@cn.fujitsu.com>
/external/ltp/lib/tst_virt.c
|
c26dd371acbd490b57bf7804371fef065de764ca |
|
17-Oct-2013 |
Jan Stancek <jstancek@redhat.com> |
getrusage04: skip it on Xen Skip this test on Xen, as it is known to fail, presumably because Xen is not able to account virtual CPU time with same accuracy as on the real CPU. Signed-off-by: Jan Stancek <jstancek@redhat.com> Acked-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/lib/tst_virt.c
|
11a84a6b532b9951a912c0d7a5be72846c33cb54 |
|
17-Oct-2013 |
Jan Stancek <jstancek@redhat.com> |
lib: add tst_is_virt() The initial version supports only generic check for xen dom0/domU, but should allow to easily extend it for other types of checks, (e.g. KVM guest) if needed later. Signed-off-by: Jan Stancek <jstancek@redhat.com> Acked-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/lib/tst_virt.c
|