aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2018-02-16Merge remote-tracking branch ↵Peter Maydell
'remotes/dgilbert/tags/pull-migration-20180214a' into staging Migration pull 20180214 Note that the 'Add test for migration to bad destination' displays a 'Connection refused' during running, but still gives the correct exit code and OK (It's checking that the source doesn't fail when it can't connect, so that's the right error). If it's particularly disliked that patch can be skipped individually. # gpg: Signature made Wed 14 Feb 2018 15:33:04 GMT # gpg: using RSA key 0516331EBC5BFDE7 # gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>" # Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A 9FA9 0516 331E BC5B FDE7 * remotes/dgilbert/tags/pull-migration-20180214a: migration: pass MigrationState to migrate_init() migration: allow send_rq to fail migration: provide postcopy_fault_thread_notify() migration: reuse mis->userfault_quit_fd migration: better error handling with QEMUFile tests/migration: Add test for migration to bad destination migration: Fix early failure cleanup tests/migration: Add source to PC boot block migration: improve documentation of postcopy-ram migration/xen: Check return value of qemu_fclose Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-02-16Merge remote-tracking branch 'remotes/berrange/tags/qio-next-pull-request' ↵Peter Maydell
into staging # gpg: Signature made Thu 15 Feb 2018 17:50:22 GMT # gpg: using RSA key BE86EBB415104FDF # gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>" # gpg: aka "Daniel P. Berrange <berrange@redhat.com>" # Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E 8E3F BE86 EBB4 1510 4FDF * remotes/berrange/tags/qio-next-pull-request: allow to build with older sed io/channel-command: Do not kill the child process after closing the pipe io: Add /dev/fdset/ support to QIOChannelFile io: Don't call close multiple times in QIOChannelFile io: Fix QIOChannelFile when creating and opening read-write io/channel-websock: handle continuous reads without any data io: fix QIONetListener memory leak Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-02-16tests/boot-serial-test: Fix problem with timeout due to dropped charactersThomas Huth
Commit 92b540dac9fc3a5 introduce a counter to handle the timeouts in a better way. But in case ccnt reaches 512, the current read character is ignored - and if that character is part of the string that we are looking for, the test fails to match the string. Almost all of the tests look for a string within the first 512 bytes of firmware output, so the problem never triggered there. But the hppa test that has been added recently looks for a longer string at the very end of a long output, thus there's a chance that we miss a character there so that the test fails unexpectedly. Fix it by *not* reading and dropping a character if the counter reaches 512. Fixes: 92b540dac9fc3a572c7342edd0b073000f5a6abf Signed-off-by: Thomas Huth <thuth@redhat.com> Message-id: 1518761564-9899-1-git-send-email-thuth@redhat.com [PMM: added initializer for nbd to silence false-positive warning from OpenBSD 6 compiler] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-02-15io: Fix QIOChannelFile when creating and opening read-writeRoss Lagerwall
The code wrongly passes the mode to open() only if O_WRONLY is set. Instead, the mode should be passed when O_CREAT is set (or O_TMPFILE on Linux). Fix this by always passing the mode since open() will correctly ignore the mode if it is not needed. Add a testcase which exercises this bug and also change the existing testcase to check that the mode of the created file is correct. Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2018-02-15Merge remote-tracking branch 'remotes/huth/tags/pull-request-2018-02-14' ↵Peter Maydell
into staging Various improvements to the qtest checks: - Clean-ups by Eric Blake with regards to the global_qtest variable - Some more test cases for the boot-serial tester - Re-activation of the m48t59-test # gpg: Signature made Wed 14 Feb 2018 11:07:44 GMT # gpg: using RSA key 2ED9D774FE702DB5 # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" # gpg: aka "Thomas Huth <thuth@redhat.com>" # gpg: aka "Thomas Huth <huth@tuxfamily.org>" # gpg: aka "Thomas Huth <th.huth@posteo.de>" # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * remotes/huth/tags/pull-request-2018-02-14: tests/m48t59: Use the m48t59 test on ppc, too tests/Makefile: Derive check-qtest-ppc64-y from check-qtest-ppc-y tests/m48t59: Make the test independent of global_qtest tests/m48t59: Fix and re-enable the test for sparc tests/boot-serial-test: Add support for the aarch64 virt machine tests/boot-serial: Add tests for PowerPC Mac machines tests/boot-serial: Enable the boot-serial test on SPARC machines, too wdt_ib700-test: Drop dependence on global_qtest tests/boot-sector: Drop dependence on global_qtest qmp-test: Drop dependence on global_qtest libqos: Use explicit QTestState for remaining libqos operations libqos: Use explicit QTestState for ahci operations libqos: Use explicit QTestState for i2c operations libqos: Use explicit QTestState for rtas operations libqos: Use explicit QTestState for fw_cfg operations libqos: Track QTestState with QPCIBus libqtest: Use qemu_strtoul() tests: Clean up wait for event Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-02-14tests/m48t59: Use the m48t59 test on ppc, tooThomas Huth
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>
2018-02-14tests/Makefile: Derive check-qtest-ppc64-y from check-qtest-ppc-yThomas Huth
ppc64 is a superset of ppc, so the ppc64 tests should include all the ppc tests. Signed-off-by: Thomas Huth <thuth@redhat.com>
2018-02-14tests/m48t59: Make the test independent of global_qtestThomas Huth
Stop using the functions that require global_qtest here and pass around the QTestState instead (global_qtest should finally get removed since this causes problems with tests running in parallel). Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2018-02-14tests/m48t59: Fix and re-enable the test for sparcThomas Huth
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>
2018-02-14tests/boot-serial-test: Add support for the aarch64 virt machineWei Huang
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>
2018-02-14tests/boot-serial: Add tests for PowerPC Mac machinesThomas Huth
OpenBIOS prints out the CPU type on these machine types, so we can use this string to test whether the CPU detection is 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>
2018-02-14tests/boot-serial: Enable the boot-serial test on SPARC machines, tooThomas Huth
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>
2018-02-14wdt_ib700-test: Drop dependence on global_qtestEric Blake
As a general rule, we prefer avoiding implicit global state because it makes code harder to safely copy and paste without thinking about the global state. Improve this test to be explicit about the state. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2018-02-14tests/boot-sector: Drop dependence on global_qtestEric Blake
As a general rule, we prefer avoiding implicit global state because it makes code harder to safely copy and paste without thinking about the global state. Adjust the helper code to use explicit state instead, and update all callers. Fix some trailing whitespace while touching the file. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2018-02-14qmp-test: Drop dependence on global_qtestEric Blake
As a general rule, we prefer avoiding implicit global state because it makes code harder to safely copy and paste without thinking about the global state. Although qmp-test does not maintain parallel qtest connections, it was the last test assigning to global_qtest. It's just as easy to be explicit about the state; once all tests have been cleaned up, a later patch can then get rid of global_qtest and a layer of wrappers in libqtest. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2018-02-14libqos: Use explicit QTestState for remaining libqos operationsEric Blake
Drop one more client of global_qtest by teaching all remaining libqos stragglers to pass in an explicit QTestState. Change the setting of global_qtest from being implicit in libqos' call to qtest_start() to instead be explicit in all clients that are still relying on global_qtest. Note that qmp_execute() can be greatly simplified in the process, and that we also get rid of interpolation of a JSON string into a temporary variable when qtest_qmp() can do it more reliably. Signed-off-by: Eric Blake <eblake@redhat.com> Acked-by: Greg Kurz <groug@kaod.org> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2018-02-14libqos: Use explicit QTestState for ahci operationsEric Blake
Drop one more client of global_qtest by teaching all ahci test functionality to pass in an explicit QTestState. The state was already available, so no callers had to be adjusted. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2018-02-14libqos: Use explicit QTestState for i2c operationsEric Blake
Drop one more client of global_qtest by teaching all i2c test functionality to pass in an explicit QTestState, adjusting all callers. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2018-02-14libqos: Use explicit QTestState for rtas operationsEric Blake
Drop one more client of global_qtest by teaching all rtas test functionality to pass in an explicit QTestState, adjusting all callers. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> [thuth: Use nicer indentation in rtas.h] Signed-off-by: Thomas Huth <thuth@redhat.com>
2018-02-14libqos: Use explicit QTestState for fw_cfg operationsEric Blake
Drop one more client of global_qtest by teaching all fw_cfg test functionality (invoked through alloc-pc) to pass in an explicit QTestState, adjusting all callers. In particular, fw_cfg-test had to reorder things to create the test state prior to creating the fw_cfg (and drop a pointless strdup in the meantime), but that test now no longer depends on global_qtest. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> [thuth: Fixed conflict wrt pc_alloc_init() in vhost-user-test.c] Signed-off-by: Thomas Huth <thuth@redhat.com>
2018-02-14libqos: Track QTestState with QPCIBusEric Blake
When initializing a QPCIBus, track which QTestState the bus is associated with (so that a later patch can then explicitly use that test state for all communication on the bus, rather than blindly relying on global_qtest). Update the initialization functions to take another parameter, and update all callers to pass in state (for now, most callers get away with passing the current global_qtest as the current state, although this required fixing the order of initialization to ensure qtest_start() is called before qpci_init*() in rtl8139-test, and provided an opportunity to pass in the allocator in e1000e-test). Touch up some allocations to use g_new0() rather than g_malloc() while in the area, and simplify some code (all implementations of QOSOps provide a .init_allocator() that never fails). Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> [thuth: Removed hunk from vhost-user-test.c that is not required anymore, fixed conflict in qtest_vboot() and adjusted qpci_init_pc() in sdhci-test] Signed-off-by: Thomas Huth <thuth@redhat.com>
2018-02-14tests/migration: Add test for migration to bad destinationDr. David Alan Gilbert
Check the source survives. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20180212160340.15333-3-dgilbert@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com>
2018-02-14tests/migration: Add source to PC boot blockDr. David Alan Gilbert
The boot block used in the migration test is currently only shipped as a hex (with the source in the git commit message of ea0c6d62), change this to actually include the source. A script is added to rebuild the header but the expectation is that the generated hex is shipped as well as the .s, so that there's no requirement to have just the right assembler etc. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20180213100606.5379-1-dgilbert@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Removed blank line at end of script
2018-02-14libqtest: Use qemu_strtoul()Eric Blake
This will keep checkpatch happy when the next patch does code motion. Fix the include order to match HACKING when adding the needed header. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2018-02-14tests: Clean up wait for eventMarkus Armbruster
We still use hacks like qmp("") to wait for an event, even though we have qmp_eventwait() since commit 8fe941f, and qmp_eventwait_ref() since commit 7ffe312. Both commits neglected to convert all the existing hacks. Make up what they missed. Bonus: gets rid of empty format strings. A step towards compile-time format string checking without triggering -Wformat-zero-length. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com> [thuth: dropped the hunks from the usb tests - not needed anymore] Signed-off-by: Thomas Huth <thuth@redhat.com>
2018-02-13Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into stagingPeter Maydell
Block layer patches # gpg: Signature made Tue 13 Feb 2018 17:03:11 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: (55 commits) iotests: Add l2-cache-entry-size to iotest 137 iotests: Test downgrading an image using a small L2 slice size iotests: Test valid values of l2-cache-entry-size qcow2: Allow configuring the L2 slice size qcow2: Rename l2_table in count_cow_clusters() qcow2: Rename l2_table in count_contiguous_clusters_unallocated() qcow2: Rename l2_table in count_contiguous_clusters() qcow2: Rename l2_table in qcow2_alloc_compressed_cluster_offset() qcow2: Update qcow2_truncate() to support L2 slices qcow2: Update expand_zero_clusters_in_l1() to support L2 slices qcow2: Prepare expand_zero_clusters_in_l1() for adding L2 slice support qcow2: Read refcount before L2 table in expand_zero_clusters_in_l1() qcow2: Update qcow2_update_snapshot_refcount() to support L2 slices qcow2: Prepare qcow2_update_snapshot_refcount() for adding L2 slice support qcow2: Update zero_single_l2() to support L2 slices qcow2: Update discard_single_l2() to support L2 slices qcow2: Update handle_alloc() to support L2 slices qcow2: Update handle_copied() to support L2 slices qcow2: Update qcow2_alloc_cluster_link_l2() to support L2 slices qcow2: Update qcow2_get_cluster_offset() to support L2 slices ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-02-13Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell
* CAN bus (will be under network maintainner) * scsi-block opblockers (myself) * Dirty log bitmap cleanup (myself) * SDHCI improvements and tests (Philippe) * HAX support for larger guest sizese (Yu Ning) # gpg: Signature made Tue 13 Feb 2018 15:37:14 GMT # gpg: using RSA key BFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: (48 commits) travis: use libgcc-4.8-dev (libgcc-6-dev is not available on Ubuntu 14.04) memory: unify loops to sync dirty log bitmap memory: hide memory_region_sync_dirty_bitmap behind DirtyBitmapSnapshot memory: remove memory_region_test_and_clear_dirty g364fb: switch to using DirtyBitmapSnapshot sdhci: add Spec v4.2 register definitions sdhci: add a check_capab_v3() qtest sdhci: check Spec v3 capabilities qtest hw/arm/xilinx_zynqmp: enable the UHS-I mode hw/arm/xilinx_zynqmp: fix the capabilities/spec version to match the datasheet hw/arm/fsl-imx6: implement SDHCI Spec. v3 hw/arm/bcm2835_peripherals: change maximum block size to 1kB hw/arm/bcm2835_peripherals: implement SDHCI Spec v3 sdhci: implement CMD/DAT[] fields in the Present State register sdhci: implement UHS-I voltage switch sdbus: add trace events sdhci: implement the Host Control 2 register (tuning sequence) sdhci: rename the hostctl1 register sdhci: add support for v3 capabilities hw/arm/xilinx_zynq: fix the capabilities register to match the datasheet ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-02-13Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into stagingPeter Maydell
virtio,vhost,pci,pc: features, fixes and cleanups - new stats in virtio balloon - virtio eventfd rework for boot speedup - vhost memory rework for boot speedup - fixes and cleanups all over the place Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Tue 13 Feb 2018 16:29:55 GMT # gpg: using RSA key 281F0DB8D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469 * remotes/mst/tags/for_upstream: (22 commits) virtio-balloon: include statistics of disk/file caches acpi-test: update FADT lpc: drop pcie host dependency tests: acpi: fix FADT not being compared to reference table hw/pci-bridge: fix pcie root port's IO hints capability libvhost-user: Support across-memory-boundary access libvhost-user: Fix resource leak virtio-balloon: unref the memory region before continuing pci: removed the is_express field since a uniform interface was inserted virtio-blk: enable multiple vectors when using multiple I/O queues pci/bus: let it has higher migration priority pci-bridge/i82801b11: clear bridge registers on platform reset vhost: Move log_dirty check vhost: Merge and delete unused callbacks vhost: Clean out old vhost_set_memory and friends vhost: Regenerate region list from changed sections list vhost: Merge sections added to temporary list vhost: Simplify ring verification checks vhost: Build temporary section list and deref after commit virtio: improve virtio devices initialization time ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-02-13acpi-test: update FADTMichael S. Tsirkin
Previous commit ("tests: acpi: fix FADT not being compared to reference table") started tracking changes to the FADT. Generate the expected FACP files - apparently these weren't updated since 2013. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2018-02-13tests: acpi: fix FADT not being compared to reference tableIgor Mammedov
It turns out that FADT isn't actually tested for changes against reference table, since it happens to be the 1st table in RSDT which is currently ignored. Fix it by making sure that all tables from RSDT are added to test list. NOTE: FADT contains guest allocated pointers to FACS/DSDT, zero them out so that possible FACS/DSDT address change won't affect test results. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2018-02-13iotests: Add l2-cache-entry-size to iotest 137Alberto Garcia
This test tries reopening a qcow2 image with valid and invalid options. This patch adds l2-cache-entry-size to the set. Signed-off-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 3d3b7d2dbfc020deaef60fb58739b0801eb9517c.1517840877.git.berto@igalia.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-02-13iotests: Test downgrading an image using a small L2 slice sizeAlberto Garcia
expand_zero_clusters_in_l1() is used when downgrading qcow2 images from v3 to v2 (compat=0.10). This is one of the functions that needed more changes to support L2 slices, so this patch extends iotest 061 to test downgrading a qcow2 image using a smaller slice size. Signed-off-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 3e5662dce5e4926c8fabbad4c0b9142b2a506dd4.1517840877.git.berto@igalia.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-02-13iotests: Test valid values of l2-cache-entry-sizeAlberto Garcia
The l2-cache-entry-size setting can only contain values that are powers of two between 512 and the cluster size. Signed-off-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: bd3547b670b8d0af11480c760991a22bcae5b48c.1517840877.git.berto@igalia.com [mreitz: Changed non-power-of-two test value from 300 to 4242] Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-02-13block: maintain persistent disabled bitmapsVladimir Sementsov-Ogievskiy
To maintain load/store disabled bitmap there is new approach: - deprecate @autoload flag of block-dirty-bitmap-add, make it ignored - store enabled bitmaps as "auto" to qcow2 - store disabled bitmaps without "auto" flag to qcow2 - on qcow2 open load "auto" bitmaps as enabled and others as disabled (except in_use bitmaps) Also, adjust iotests 165 and 176 appropriately. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20180202160752.143796-1-vsementsov@virtuozzo.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-02-13sdhci: add a check_capab_v3() qtestPhilippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20180208164818.7961-30-f4bug@amsat.org>
2018-02-13sdhci: check Spec v3 capabilities qtestPhilippe Mathieu-Daudé
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>
2018-02-13hw/arm/xilinx_zynq: fix the capabilities register to match the datasheetPhilippe Mathieu-Daudé
checking Xilinx datasheet "UG585" (v1.12.1) Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> Message-Id: <20180208164818.7961-17-f4bug@amsat.org>
2018-02-13sdhci: add qtest to check the SD Spec versionPhilippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20180208164818.7961-7-f4bug@amsat.org>
2018-02-13sdhci: add a check_capab_sdma() qtestPhilippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20180208164818.7961-6-f4bug@amsat.org>
2018-02-13sdhci: add a check_capab_baseclock() qtestPhilippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20180208164818.7961-5-f4bug@amsat.org>
2018-02-13sdhci: add check_capab_readonly() qtestPhilippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20180208164818.7961-4-f4bug@amsat.org>
2018-02-13sdhci: add qtest to check the SD capabilities registerPhilippe Mathieu-Daudé
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>
2018-02-13iotests: Use virtio-blk in 155Max Reitz
Only a few select machine types support floppy drives and there is actually nothing preventing us from using virtio here, so let's do it. Reported-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Tested-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2018-02-13iotests: Fix CID for VMDK afl imageFam Zheng
This reverts commit 76bf133c4 which updated the reference output, and fixed the reference image, because the code path we want to exercise is actually the invalid image size. The descriptor block in the image, which includes the CID to verify, has been invalid since the reference image was added. Since commit 9877860e7bd we report this error earlier than the "file too large", so 059.out mismatches. The binary change is generated along the operations of: $ bunzip2 afl9.vmdk.bz2 $ qemu-img create -f vmdk fix.vmdk 1G $ dd if=afl9.vmdk of=fix.vmdk bs=512 count=1 conv=notrunc $ mv fix.vmdk afl9.vmdk $ bzip2 afl9.vmdk Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2018-02-13Revert "tests: use memfd in vhost-user-test"Peter Maydell
This reverts commit 7e49f5e8e508ed020c96798b3f7083e24e0e425b. This commit seems to break parallel 'make -j4 check'; revert it until we identify the problem. Reported-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-02-12Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-fetch' into ↵Peter Maydell
staging trivial patches for 2018-02-10 # gpg: Signature made Sat 10 Feb 2018 07:54:03 GMT # gpg: using RSA key 701B4F6B1A693E59 # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>" # gpg: aka "Michael Tokarev <mjt@corpit.ru>" # gpg: aka "Michael Tokarev <mjt@debian.org>" # Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D 4324 457C E0A0 8044 65C5 # Subkey fingerprint: 7B73 BAD6 8BE7 A2C2 8931 4B22 701B 4F6B 1A69 3E59 * remotes/mjt/tags/trivial-patches-fetch: tests/qapi: use ARRAY_SIZE macro tests/qapi: use QEMU_IS_ALIGNED macro tests/hbitmap: use ARRAY_SIZE macro async: use ARRAY_SIZE macro qga: use ARRAY_SIZE macro MAINTAINERS: Add qemu-binfmt-conf.sh script oslib-posix: check for posix_memalign in configure script maint: Mention web site maintenance in README build: fix typo in error message configure: Allow capstone=git only if git update is not disabled scripts/make-release: Don't archive .git files qemu-options.hx: Remove confusing spaces in parameter listings mailmap: set preferred spelling for Daniel Berrangé Drop unneeded system header includes machine: Polish -machine xxx,help scripts/argparse.py: spelling (independant) qapi-schema.json: spelling (independant comparation) Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-02-10tests/qapi: use ARRAY_SIZE macroPhilippe Mathieu-Daudé
Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-02-10tests/qapi: use QEMU_IS_ALIGNED macroPhilippe Mathieu-Daudé
Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-02-10tests/hbitmap: use ARRAY_SIZE macroPhilippe Mathieu-Daudé
Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
2018-02-09iotests: 205: support luks formatVladimir Sementsov-Ogievskiy
Support default luks options in VM.add_drive and in new library function qemu_img_create. Use it in 205 iotests. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20180206182507.21753-1-vsementsov@virtuozzo.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>