summaryrefslogtreecommitdiffstats
path: root/tests/Makefile.include
Commit message (Collapse)AuthorAgeFilesLines
* qobject: Move block-specific qdict code to block-qdict.cMarkus Armbruster2018-06-151-0/+4
| | | | | | | | | Pure code motion, except for two brace placements and a comment tweaked to appease checkpatch. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* Merge remote-tracking branch ↵Peter Maydell2018-06-121-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'remotes/vivier2/tags/linux-user-for-3.0-pull-request' into staging Fixes in syscall numbers, disable the build of binaries not needed for linux-user, update of qemu-binfmt-conf.sh and cleanup around is_error() # gpg: Signature made Tue 12 Jun 2018 11:57:18 BST # gpg: using RSA key F30C38BD3F2FBE3C # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" # gpg: aka "Laurent Vivier <laurent@vivier.eu>" # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/vivier2/tags/linux-user-for-3.0-pull-request: linux-user/sparc64: Add inotify_rm_watch and tee syscalls linux-user/microblaze: Fix typo in accept4 syscall linux-user/hppa: Fix typo in mknodat syscall linux-user/alpha: Fix epoll syscalls qemu-binfmt-conf.sh: ignore the OS/ABI field linux-user: disable qemu-bridge-helper and socket_scm_helper build linux-user: Use is_error() to avoid warnings and make the code clearer linux-user: Export use is_error(), use it to avoid warnings Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * linux-user: disable qemu-bridge-helper and socket_scm_helper buildLaurent Vivier2018-06-111-1/+1
| | | | | | | | | | | | | | | | | | linux-user targets don't need them, and if we ask to build statically linked binaries, some static libraries they need are not available. Signed-off-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20180605160958.5434-1-laurent@vivier.eu>
* | Merge remote-tracking branch ↵Peter Maydell2018-06-121-1/+0Star
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'remotes/ehabkost/tags/python-next-pull-request' into staging Python queue, 2018-06-11 * Make code compatible with Python 3 using 'futurize --stage1' * Require Python >= 2.7 and remove Python 2.6 compatibility modules # gpg: Signature made Mon 11 Jun 2018 18:41:26 BST # gpg: using RSA key 2807936F984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/python-next-pull-request: python: Remove scripts/ordereddict.py python: Remove scripts/argparse.py configure: Require Python 2.7 or newer python: futurize -f lib2to3.fixes.fix_numliterals python: futurize -f lib2to3.fixes.fix_except python: futurize -f lib2to3.fixes.fix_renames python: futurize -f lib2to3.fixes.fix_tuple_params python: futurize -f lib2to3.fixes.fix_reduce python: futurize -f lib2to3.fixes.fix_standarderror python: futurize -f lib2to3.fixes.fix_has_key python: futurize -f libfuturize.fixes.fix_next_call python: futurize -f libfuturize.fixes.fix_absolute_import python: futurize -f libfuturize.fixes.fix_print_with_import Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * python: Remove scripts/ordereddict.pyEduardo Habkost2018-06-081-1/+0Star
| | | | | | | | | | | | | | | | | | | | Python 2.7 (the minimum Python version we require) provides collections.OrderedDict on the standard library, so we don't need to carry our own implementation. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20180608175252.25110-3-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
* | tests/cdrom-test: Test booting from CD-ROM ISO image fileThomas Huth2018-06-081-0/+2
|/ | | | | | | | | | | | | | We already have the code for a boot file in tests/boot-sector.c, so if the genisoimage program is available, we can easily create a bootable CD ISO image that we can use for testing whether our CD-ROM emulation and the BIOS CD-ROM boot works correctly. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Hervé Poussineau <hpoussin@reactos.org> Acked-By: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: John Snow <jsnow@redhat.com>
* misc: add pca9552 LED blinker modelCédric Le Goater2018-06-081-0/+2
| | | | | | | | | | | | | | | | Specs are available here : https://www.nxp.com/docs/en/application-note/AN264.pdf This is a simple model supporting the basic registers for led and GPIO mode. The device also supports two blinking rates but not the model yet. Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20180530064049.27976-7-clg@kaod.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* test: Add swtpm migration test for the TPM TIS interfaceStefan Berger2018-06-061-0/+3
| | | | | | | | Add a test case for testing swtpm migration with the TPM TIS interface. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
* test: Move common TPM test functions to tpm-tests.cStefan Berger2018-06-061-1/+1
| | | | | | | | | Move common TPM test functions from tpm-crb-swtpm-test.c to tpm-tests.c so that for example test cases with the TPM TIS interface can use the same code. Prefix all funcions with 'tpm_test_'. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
* Makefile: Rename TARGET_DIRS to TARGET_LISTFam Zheng2018-06-051-1/+1
| | | | | | | | | | | To be more accurate on its purpose and make code that looks for a certain target out of this variable more readable. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
* tests: qapi-schema tests for allow-preconfigIgor Mammedov2018-05-301-0/+1
| | | | | | | | | | use new allow-preconfig parameter in tests and make sure that the QAPISchema can parse allow-preconfig correctly Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <1526058959-41425-1-git-send-email-imammedo@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
* test: Add test cases that use the external swtpm with CRB interfaceStefan Berger2018-05-261-0/+3
| | | | | | | | | | | | | | | | | | Add a test program for testing the CRB with the external swtpm. The 1st test case extends a PCR and reads back the value and compares it against an expected return packet. The 2nd test case repeats the 1st test case and then migrates the external swtpm's state along with the VM state to a destination QEMU and swtpm and checks that the PCR has the expected value now. The test cases require 'swtpm' to be installed on the system and in the PATH and 'swtpm' must support the --tpm2 option. If this is not the case, the test will be skipped. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
* tests: add oob-test for qapi-schemaPeter Xu2018-03-271-0/+1
| | | | | | | | | | | It simply tests the new OOB capability, and make sure the QAPISchema can parse it correctly. Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20180326063901.27425-7-peterx@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
* qapi: Force UTF8 encoding when parsing qapi filesEric Blake2018-03-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit d4e5ec877 already fixed things to work around Python 3's lame bug of having LC_ALL=C not be 8-bit clean, when parsing the main QMP qapi files; but failed to do likewise in the tests directory. As a result, running 'LC_ALL=C make check' fails on escape-too-big and unicode-str when using python 3 with a nasty stack trace instead of the intended graceful error message that QAPI doesn't yet support 8-bit data (the two tests contain Unicode é, when parsed in UTF-8; they represent something different when parsed in a proper single-byte C locale, but that doesn't matter to the error message printed out, provided that brain-dead Python hasn't first choked on the input instead of being 8-bit clean). Ideally, we'd teach the qapi generator scripts to automatically slurp things in using UTF-8 regardless of locale, and to honor content that is not limited to 7 bit data rather than gracefully erroring out; but until then, since our graceful error depends on python parsing 8-bit data (even if nothing we generate uses 8-bit data), our quick fix is to use the right locale when running these tests. Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <20180319205040.1113423-1-eblake@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
* Merge remote-tracking branch ↵Peter Maydell2018-03-201-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'remotes/ehabkost/tags/machine-next-pull-request' into staging Machine and x86 queue, 2018-03-19 * cpu_model/cpu_type cleanups * x86: Fix on Intel Processor Trace CPUID checks # gpg: Signature made Mon 19 Mar 2018 20:07:14 GMT # gpg: using RSA key 2807936F984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/machine-next-pull-request: i386: Disable Intel PT if packets IP payloads have LIP values cpu: drop unnecessary NULL check and cpu_common_class_by_name() cpu: get rid of unused cpu_init() defines Use cpu_create(type) instead of cpu_init(cpu_model) cpu: add CPU_RESOLVING_TYPE macro tests: add machine 'none' with -cpu test nios2: 10m50_devboard: replace cpu_model with cpu_type Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * tests: add machine 'none' with -cpu testIgor Mammedov2018-03-191-0/+2
| | | | | | | | | | | | | | | | | | | | Check that "$QEMU -M none -cpu FOO" starts QEMU without error Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <1518000027-274608-3-git-send-email-imammedo@redhat.com> [ehabkost: include qmp/qdict.h instead of qmp/types.h] [ehabkost: add riscv targets to machine-none-test] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
* | qapi: Pass '-u' when doing non-silent diffEric Blake2018-03-191-4/+4
|/ | | | | | | | | | | | | | | Ed-script diffs are awful compared to context diffs. Fix another 'diff -q' while in the area (if the files are different, being noisy makes it easier to diagnose why). While at it, diff .err before .out, because if a test fails, .err is more likely to contain the most important information for fixing the failure. Fixes: 46ec4fce Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20180315125116.804342-1-eblake@redhat.com>
* sockets: move fd_is_socket() into common sockets codeDaniel P. Berrange2018-03-131-0/+3
| | | | | | | | | The fd_is_socket() helper method is useful in a few places, so put it in the common sockets code. Make the code more compact while moving it. Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* sockets: pull code for testing IP availability out of specific testDaniel P. Berrange2018-03-131-1/+1
| | | | | | | | | | | The test-io-channel-socket.c file has some useful helper functions for checking if a specific IP protocol is available. Other tests need to perform similar kinds of checks to avoid running tests that will fail due to missing IP protocols. Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into stagingPeter Maydell2018-03-061-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Block layer patches # gpg: Signature made Mon 05 Mar 2018 17:45:51 GMT # gpg: using RSA key 7F09B272C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * remotes/kevin/tags/for-upstream: (38 commits) block: Fix NULL dereference on empty drive error qcow2: Replace align_offset() with ROUND_UP() block/ssh: Add basic .bdrv_truncate() block/ssh: Make ssh_grow_file() blocking block/ssh: Pull ssh_grow_file() from ssh_create() qemu-img: Make resize error message more general qcow2: make qcow2_co_create2() a coroutine_fn block: rename .bdrv_create() to .bdrv_co_create_opts() Revert "IDE: Do not flush empty CDROM drives" block: test blk_aio_flush() with blk->root == NULL block: add BlockBackend->in_flight counter block: extract AIO_WAIT_WHILE() from BlockDriverState aio: rename aio_context_in_iothread() to in_aio_context_home_thread() docs: document how to use the l2-cache-entry-size parameter specs/qcow2: Fix documentation of the compressed cluster descriptor iotest 033: add misaligned write-zeroes test via truncate block: fix write with zero flag set and iovector provided block: Drop unused .bdrv_co_get_block_status() vvfat: Switch to .bdrv_co_block_status() vpc: Switch to .bdrv_co_block_status() ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org> # Conflicts: # include/block/block.h
| * block: test blk_aio_flush() with blk->root == NULLKevin Wolf2018-03-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | This patch adds test cases for the scenario where blk_aio_flush() is called on a BlockBackend with no root. Calling drain afterwards should complete the requests with -ENOMEDIUM. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | qapi: Move qapi-schema.json to qapi/, rename generated filesMarkus Armbruster2018-03-021-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move qapi-schema.json to qapi/, so it's next to its modules, and all files get generated to qapi/, not just the ones generated for modules. Consistently name the generated files qapi-MODULE.EXT: qmp-commands.[ch] become qapi-commands.[ch], qapi-event.[ch] become qapi-events.[ch], and qmp-introspect.[ch] become qapi-introspect.[ch]. This gets rid of the temporary hacks in scripts/qapi/commands.py, scripts/qapi/events.py, and scripts/qapi/common.py. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180211093607.27351-28-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> [eblake: Fix trailing dot in tpm.c, undo temporary hack for OSX toolchain] Signed-off-by: Eric Blake <eblake@redhat.com>
* | qapi: Rename generated qmp-marshal.c to qmp-commands.cMarkus Armbruster2018-03-021-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All generated .c are named like their .h, except for qmp-marshal.c and qmp-commands.h. To add to the confusion, tests-qmp-commands.c falsely matches generated test-qmp-commands.h. Get rid of this unnecessary complication. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180211093607.27351-19-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Eric Blake <eblake@redhat.com>
* | qapi-gen: New common driver for code and doc generatorsMarkus Armbruster2018-03-021-28/+28
|/ | | | | | | | | | | | | | | | | | | | | Whenever qapi-schema.json changes, we run six programs eleven times to update eleven files. Similar for qga/qapi-schema.json. This is silly. Replace the six programs by a single program that spits out all eleven files. The programs become modules in new Python package qapi, along with the helper library. This requires moving them to scripts/qapi/. While moving them, consistently drop executable mode bits. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20180211093607.27351-9-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> [eblake: move change to one-line 'blurb' earlier in series, mention mode bit change as intentional, update qapi-code-gen.txt to match actual generated events.c file] Signed-off-by: Eric Blake <eblake@redhat.com>
* Merge remote-tracking branch ↵Peter Maydell2018-03-011-1/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'remotes/stefanberger/tags/pull-tpm-2018-02-21-2' into staging Merge tpm 2018/02/21 v2 # gpg: Signature made Tue 27 Feb 2018 13:50:28 GMT # gpg: using RSA key 75AD65802A0B4211 # gpg: Good signature from "Stefan Berger <stefanb@linux.vnet.ibm.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: B818 B9CA DF90 89C2 D5CE C66B 75AD 6580 2A0B 4211 * remotes/stefanberger/tags/pull-tpm-2018-02-21-2: tests: add test for TPM TIS device tests: Move common TPM test code into tpm-emu.c Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * tests: add test for TPM TIS deviceStefan Berger2018-02-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Move the TPM TIS related register and flag #defines into include/hw/acpi/tpm.h for access by the test case. Write a test case that covers the TIS functionality. Add the tests cases to the MAINTAINERS file. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
| * tests: Move common TPM test code into tpm-emu.cStefan Berger2018-02-211-1/+1
| | | | | | | | | | | | | | Move threads and other common TPM test code into tpm-emu.c. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
* | scripts: Add decodetree.pyRichard Henderson2018-02-231-1/+8
|/ | | | | | | To be used to decode ARM SVE, but could be used for any fixed-width ISA. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tests/m48t59: Use the m48t59 test on ppc, tooThomas Huth2018-02-141-0/+2
| | | | | | | The ref405ep machine has a memory-mapped m48t59 device, so we can run the m48t59 test on this machine, too. Signed-off-by: Thomas Huth <thuth@redhat.com>
* tests/Makefile: Derive check-qtest-ppc64-y from check-qtest-ppc-yThomas Huth2018-02-141-7/+4Star
| | | | | | | ppc64 is a superset of ppc, so the ppc64 tests should include all the ppc tests. Signed-off-by: Thomas Huth <thuth@redhat.com>
* tests/m48t59: Fix and re-enable the test for sparcThomas Huth2018-02-141-4/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The m48t59 test has been disabled in commit baeddded5fe6fa37d13fb94bf8d ("sparc: disable qtest in make check"), likely due to some timing issues in the bcd_check_time tests which might fail if it gets interrupted for too long. It should be OK to re-enable this test if we make sure that we do not run it on timing-sensitive machines, thus it should be OK if we only run it in the g_test_slow() mode. Additionally, there are two other issues: First, the test can not run so easily on sparc64 anymore, since commit f3b18f35a23c60edbda6420cd ("sun4u: switch m48t59 NVRAM to MMIO access") moved the m48t59 device to the ebus instead, and for this you first have to set up the corresponding PCI device (which is currently not possible from within the m48t59 test). So we can only re-enable this test on sparc, but not the sparc64 target. Second, the fuzzing test is executed before the bcd-check-time test (due to the naming of the tests), without having the base address set up properly, so the fuzzing test does not really check anything at all. Fix it by setting up the base address from the main function already and by moving the qtest_start() to the tests themselves, so that each test starts with a clean environment (since after the fuzzing, the clock is unusable for the bcd-check-time test). Signed-off-by: Thomas Huth <thuth@redhat.com>
* tests/boot-serial-test: Add support for the aarch64 virt machineWei Huang2018-02-141-0/+1
| | | | | | | | | | This patch adds a small binary kernel to test aarch64 virt machine's UART. Signed-off-by: Wei Huang <wei@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> [thuth: Fixed contextual conflicts with the hppa and sdhci patches] Signed-off-by: Thomas Huth <thuth@redhat.com>
* tests/boot-serial: Enable the boot-serial test on SPARC machines, tooThomas Huth2018-02-141-0/+2
| | | | | | | | | | OpenBIOS prints out the name of the detected CPU here, so looking for this string is a nice test to verify that the CPU detection is still working correctly. Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
* sdhci: check Spec v3 capabilities qtestPhilippe Mathieu-Daudé2018-02-131-0/+1
| | | | | | Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Acked-by: Alistair Francis <alistair.francis@xilinx.com> Message-Id: <20180208164818.7961-29-f4bug@amsat.org>
* sdhci: add qtest to check the SD capabilities registerPhilippe Mathieu-Daudé2018-02-131-0/+3
| | | | | | | | | The PCI model is tested with the pc/x86_64 machine, the SysBus model with the smdkc210/arm machine. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20180208164818.7961-3-f4bug@amsat.org>
* Merge remote-tracking branch ↵Peter Maydell2018-02-061-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'remotes/ehabkost/tags/python-next-pull-request' into staging Python queue, 2018-02-05 # gpg: Signature made Mon 05 Feb 2018 23:07:57 GMT # gpg: using RSA key 2807936F984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/python-next-pull-request: (21 commits) docker: change Fedora images to run with python3 travis: improve python version test coverage ui: update keycodemapdb to get py3 fixes input: add missing JIS keys to virtio input qemu.py: don't launch again before shutdown() qemu.py: cleanup redundant calls in launch() qemu.py: use poll() instead of 'returncode' qemu.py: always cleanup on shutdown() qemu.py: refactor launch() qemu.py: better control of created files qemu.py: remove unused import configure: allow use of python 3 scripts: ensure signrom treats data as bytes qapi: force a UTF-8 locale for running Python qapi: ensure stable sort ordering when checking QAPI entities qapi: remove '-q' arg to diff when comparing QAPI output qapi: Adapt to moved location of 'maketrans' function in py3 qapi: adapt to moved location of StringIO module in py3 qapi: Use OrderedDict from standard library if available qapi: use items()/values() intead of iteritems()/itervalues() ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * qapi: remove '-q' arg to diff when comparing QAPI outputDaniel P. Berrange2018-02-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | When the qapi schema tests fail they merely print that the expected output didn't match the actual output. This is largely useless when trying diagnose what went wrong. Removing the '-q' arg to diff means that it is still silent on successful tests, but when it fails we'll see details of the incorrect output. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-Id: <20180116134217.8725-7-berrange@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
* | tests: Enable boot-serial-test for hppaRichard Henderson2018-02-041-0/+2
|/ | | | | Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* tpm: add CRB deviceMarc-André Lureau2018-01-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | tpm_crb is a device for TPM 2.0 Command Response Buffer (CRB) Interface as defined in TCG PC Client Platform TPM Profile (PTP) Specification Family “2.0” Level 00 Revision 01.03 v22. The PTP allows device implementation to switch between TIS and CRB model at run time, but given that CRB is a simpler device to implement, I chose to implement it as a different device. The device doesn't implement other locality than 0 for now (my laptop TPM doesn't either, so I assume this isn't so bad) Tested with some success with Linux upstream and Windows 10, seabios & modified ovmf. The device is recognized and correctly transmit command/response with passthrough & emu. However, we are missing PPI ACPI part atm. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
* tests/cpu-plug-test: Test CPU hot-plugging on s390xThomas Huth2018-01-221-0/+1
| | | | | | | | CPU hot-plugging on s390x is possible with both, "cpu-add" and "device_add", so test both. Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
* tests/cpu-plug-test: Check CPU hot-plugging on ppc64, tooThomas Huth2018-01-221-0/+1
| | | | | | | | | | | Hot plugging on ppc64 is possible via "device_add", too. Unlike x86, we must not specify a 'socket-id' and 'thread-id' here, so this needs to be done with a separate function that just specifies the 'core-id' during the "device_add". Reviewed-by: Daniel Barboza <danielhb@linux.vnet.ibm.com> Tested-by: Daniel Barboza <danielhb@linux.vnet.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
* tests: Rename pc-cpu-test.c to cpu-plug-test.cThomas Huth2018-01-221-2/+2
| | | | | | | | | The test will be extended to work on other architectures, too, so let's use a more generic name for the file and the functions in here first. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
* tests/boot-serial-test: Add support for the raspi2 machineThomas Huth2018-01-161-0/+1
| | | | | | | | | The raspi2 machine supports loading firmware images, so we can easily load a small test sequence as raw binary blob here to test the UART. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1512031988-32490-8-git-send-email-thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* tests/boot-serial-test: Add a test for the moxiesim machineThomas Huth2018-01-161-0/+2
| | | | | | | | | | Now that moxiesim supports the -bios parameter, we can check this machine in the boot-serial tester, too, by supplying a mini bios that only writes 'T' characters to the UART. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1512031988-32490-7-git-send-email-thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* tests/boot-serial-test: Add tests for microblaze boardsThomas Huth2018-01-161-0/+2
| | | | | | | | | This adds two simple TCG + UART tests for the microblaze boards, one in big endian mode, and one in little endian mode. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1512031988-32490-5-git-send-email-thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* test-bdrv-drain: Test BlockDriver callbacks for drainKevin Wolf2017-12-221-0/+2
| | | | | | | | | | This adds a test case that the BlockDriver callbacks for drain are called in bdrv_drained_all_begin/end(), and that both of them are called exactly once. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
* tests/boot-serial-test: Add support for the mcf5208evb boardThomas Huth2017-12-211-0/+2
| | | | | | | | | | We can output a character quite easily here with some few lines of assembly that we provide as a mini-kernel for this board. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1512031988-32490-4-git-send-email-thuth@redhat.com> [lv: add boot-serial-test in check-qtest-m68k] Signed-off-by: Laurent Vivier <laurent@vivier.eu>
* tests/qapi-schema/doc-bad-section: New, factored out of doc-goodMarkus Armbruster2017-12-201-1/+2
| | | | | | | | | | A negative test case crept into doc-good.json: invalid use of section markup we currently fail to reject. Move this into its own doc-bad-section.json. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20171002141341.24616-6-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
* Makefile: use $(MAKE) variablePhilippe Mathieu-Daudé2017-12-181-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some systems (i.e. FreeBSD) the default 'make' is not compatible with the GNU extensions used by QEMU makefiles. Calling the GNU make (gmake) works, however the help displayed refers to the host 'make' and copy/paste leads to lot of unobvious errors: $ gmake check-help [...] make check Run all tests $ make check make: "Makefile" line 28: Missing dependency operator make: "Makefile" line 37: Need an operator make: "Makefile" line 41: warning: duplicate script for target "git-submodule-update" ignored make: "rules.mak" line 70: warning: duplicate script for target "%.o" ignored make: Unknown modifier ' ' make: Unclosed substitution for eval modules (= missing) make: "tests/Makefile.include" line 24: Variable/Value missing from "export" make: "tests/" line 1: warning: Zero byte read from file, skipping rest of line. make: "tests/" line 1: Need an operator make: "Makefile" line 660: warning: duplicate script for target "ifneq" ignored make: "Makefile" line 78: warning: using previous script for "ifneq" defined here make: Fatal errors encountered -- cannot continue Using the $(MAKE) variable, the help displayed is consistent with the 'make' program used. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* tests: Add check-qobject for equality testsMax Reitz2017-11-171-1/+3
| | | | | | | | | | | | Add a new test file (check-qobject.c) for unit tests that concern QObjects as a whole. Its only purpose for now is to test the qobject_is_equal() function. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20171114180128.17076-7-mreitz@redhat.com Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>