aboutsummaryrefslogtreecommitdiff
path: root/tests/prom-env-test.c
AgeCommit message (Collapse)Author
2020-01-12test: Move qtests to a separate directoryThomas Huth
The tests directory itself is pretty overcrowded, and it's hard to see which test belongs to which test subsystem (unit, qtest, ...). Let's move the qtests to a separate folder for more clarity. Message-Id: <20191218103059.11729-6-thuth@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-12-17vl: configure accelerators from -accel optionsPaolo Bonzini
Drop the "accel" property from MachineState, and instead desugar "-machine accel=" to a list of "-accel" options. This has a semantic change due to removing merge_lists from -accel. For example: - "-accel kvm -accel tcg" all but ignored "-accel kvm". This is a bugfix. - "-accel kvm -accel thread=single" ignored "thread=single", since it applied the option to KVM. Now it fails due to not specifying the accelerator on "-accel thread=single". - "-accel tcg -accel thread=single" chose single-threaded TCG, while now it will fail due to not specifying the accelerator on "-accel thread=single". Also, "-machine accel" and "-accel" become incompatible. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-03-12Suppress test warnings about missing Spectre/Meltdown mitigations with TCGDavid Gibson
The new pseries-4.0 machine type defaults to enabling Spectre/Meltdown mitigations. Unfortunately those mitigations aren't implemented for TCG because we're not yet sure if they're necessary or how to implement them. We don't fail fatally, but we do warn in this case, because it is quite plausible that Spectre/Meltdown can be exploited through TCG (at least for the guest to get access to the qemu address space). This create noise in our testcases though. So, modify the affected tests to explicitly disable the mitigations to suppress these warnings. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-12-17tests/prom-env: Make test independent of global_qtestThomas Huth
global_qtest is only needed here for one readl(). Let's replace it with qtest_readl() and we can remove the global_qtest variable here. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2018-08-16libqtest: Replace qtest_startf() by qtest_initf()Markus Armbruster
qtest_init() creates a new QTestState, and leaves @global_qtest alone. qtest_start() additionally assigns it to @global_qtest, but qtest_startf() additionally assigns NULL to @global_qtest. This makes no sense. Replace it by qtest_initf() that works like qtest_init(), i.e. leaves @global_qtest alone. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20180806065344.7103-23-armbru@redhat.com>
2017-10-20libqtest: Add qtest_[v]startf()Eric Blake
We have several callers that were formatting the argument strings themselves; consolidate this effort by adding new convenience functions directly in libqtest, and update some call-sites that can benefit from it. Note that the new functions qtest_startf() and qtest_vstartf() behave more like qtest_init() (the caller must assign global_qtest after the fact, rather than getting it implicitly set). This helps us prepare for future patches that get rid of the global variable, by explicitly highlighting which tests still depend on it now. Signed-off-by: Eric Blake <eblake@redhat.com> [thuth: Dropped the hunks that do not apply cleanly to qemu master yet and added the missing g_free(args) in qtest_vstartf()] Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1508336428-20511-2-git-send-email-thuth@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-10-16tests/prom-env: Bump the timeout, and test pseries only in slow modeThomas Huth
If QEMU has been compiled with the flags --enable-tcg-interpreter and --enable-debug, the guest is running incredibly slow. The prom-env test is approximately 10 times slower than normal in this case, and it takes up to 500 seconds until the test with the pseries machine finishs. While we should still look for ways to speed up the test on the pseries machine here, let's bump the timeout to 600 seconds to allow the test to pass with this unusal configuration already now. Also move the pseries test into the "slow" category - since it is really a very slow test. Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Thomas Huth <thuth@redhat.com>
2017-02-28tests/prom-env: Enable the test for the sun4u machine, tooThomas Huth
The 32-bit TCG bug has been fixed a while ago, so we can enable this test for sparc64 now, too. Unfortunately, OpenBIOS does not work with the sun4v machine anymore (it needs to catch up with the improved emulation), so we can only enable this test for the sun4u machine right now. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2017-02-10tests/prom-env: Ease time-out problems on slow hostsThomas Huth
Peter Maydell recently ran into time-out problems with the prom-env test on a rather slow ARM board. To tackle this issue, we can speed up the test by running QEMU with "-nodefaults" for the pseries machine, so that SLOF has less devices to scan during boot, and by using the "nvramrc" environment variable instead of "boot-command", since this variable is evaluated earlier in the boot process. And to be really sure that we do not face such time out problems again, let's also increase the time out value from 100s to 120s instead. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-id: 1486739699-1076-1-git-send-email-thuth@redhat.com Tested-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-10-28tests: Add pseries machine to the prom-env-test, tooDavid Gibson
Now that we also support the "-prom-env" parameter for the pseries machine, we can enable this test for this machine, too. Since booting with TCG is rather slow with the pseries machine, we also enable the "-nodefaults" parameter for this test now, so that SLOF does not have to check that much devices during boot and thus runs a little bit faster. Signed-off-by: Thomas Huth <thuth@redhat.com> [dwg: Don't add -nodefaults to the command line, it causes extra warnings for the sparc testcases] Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-07-20tests/prom-env-test: increase the test timeoutMarcel Apfelbaum
On a slower machine the test can take more than 30 seconds. Increase the timeout to 100 seconds. Signed-off-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2016-06-17ppc / sparc: Add a tester for checking whether OpenBIOS runs successfullyThomas Huth
Since the mac99 and g3beige PowerPC machines recently broke without being noticed, it would be good to have a tester for "make check" that detects such issues immediately. A simple way to test the firmware of these machines is to use the "-prom-env" parameter of QEMU. This parameter can be used to put some Forth code into the 'boot-command' firmware variable which then can signal success to the tester by writing a magic value to a known memory location. And since some of the Sparc machines are also using OpenBIOS, they are now tested with this prom-env-tester, too. Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> [dwg: Removed sparc64, because it trips a TCG bug on 32-bit hosts] Signed-off-by: David Gibson <david@gibson.dropbear.id.au>