aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2018-06-15qobject: Move block-specific qdict code to block-qdict.cMarkus Armbruster
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>
2018-06-15block: Add block-specific QDict headerMax Reitz
There are numerous QDict functions that have been introduced for and are used only by the block layer. Move their declarations into an own header file to reflect that. While qdict_extract_subqdict() is in fact used outside of the block layer (in util/qemu-config.c), it is still a function related very closely to how the block layer works with nested QDicts, namely by sometimes flattening them. Therefore, its declaration is put into this header as well and util/qemu-config.c includes it with a comment stating exactly which function it needs. Suggested-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Message-Id: <20180509165530.29561-7-mreitz@redhat.com> [Copyright note tweaked, superfluous includes dropped] Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2018-06-15iotests: Add test 221 to catch qemu-img map regressionEric Blake
Although qemu-img creates aligned files (by rounding up), it must also gracefully handle files that are not sector-aligned. Test that the bug fixed in the previous patch does not recur. It's a bit annoying that we can see the (implicit) hole past the end of the file on to the next sector boundary, so if we ever reach the point where we report a byte-accurate size rather than our current behavior of always rounding up, this test will probably need a slight modification. Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2018-06-12Merge remote-tracking branch ↵Peter Maydell
'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>
2018-06-12Merge remote-tracking branch 'remotes/kraxel/tags/usb-20180612-pull-request' ↵Peter Maydell
into staging usb: bug fix collection, doc update. # gpg: Signature made Tue 12 Jun 2018 11:44:17 BST # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/usb-20180612-pull-request: usb-mtp: Return error on suspicious TYPE_DATA packet from initiator usb-hcd-xhci-test: add a test for ccid hotplug usb-ccid: fix bus leak object: fix OBJ_PROP_LINK_UNREF_ON_RELEASE ambivalence bus: do not unref the added child bus on realize usb/dev-mtp: Fix use of uninitialized values usb: correctly handle Zero Length Packets usb: update docs Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-12Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into stagingPeter Maydell
pc: fixes A couple of fixes to acpi and nvdimm. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Mon 11 Jun 2018 20:21:03 BST # 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: nvdimm: make persistence option symbolic hw/i386: Update SSDT table used by "make check" Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-12Merge remote-tracking branch ↵Peter Maydell
'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>
2018-06-12usb-hcd-xhci-test: add a test for ccid hotplugMarc-André Lureau
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20180531195119.22021-5-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-06-11nvdimm: make persistence option symbolicRoss Zwisler
Replace the "nvdimm-cap" option which took numeric arguments such as "2" with a more user friendly "nvdimm-persistence" option which takes symbolic arguments "cpu" or "mem-ctrl". Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> Suggested-by: Michael S. Tsirkin <mst@redhat.com> Suggested-by: Dan Williams <dan.j.williams@intel.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2018-06-11hw/i386: Update SSDT table used by "make check"Ross Zwisler
This commit: commit aa78a16d8645 ("hw/i386: Rename 2.13 machine types to 3.0") updated the name used to create the q35 machine, which in turn changed the SSDT table which is generated when we run "make check": acpi-test: Warning! SSDT mismatch. Actual [asl:/tmp/asl-QZDWJZ.dsl, aml:/tmp/aml-T8JYJZ], Expected [asl:/tmp/asl-DTWVJZ.dsl, aml:tests/acpi-test-data/q35/SSDT.dimmpxm]. Here's the only difference, aside from the checksum: < Name (MEMA, 0x07FFF000) --- > Name (MEMA, 0x07FFE000) Update the binary table that we compare against so it reflects this name change. Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Peter Maydell <peter.maydell@linaro.org> Cc: Cornelia Huck <cohuck@redhat.com> Cc: Thomas Huth <thuth@redhat.com> Cc: Eduardo Habkost <ehabkost@redhat.com> Fixes: commit aa78a16d8645 ("hw/i386: Rename 2.13 machine types to 3.0") Tested-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2018-06-11iotests: Add case for a corrupted inactive imageMax Reitz
Reviewed-by: John Snow <jsnow@redhat.com> Tested-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20180606193702.7113-4-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-06-11qemu-img: Remove deprecated -s snapshot_id_or_name optionThomas Huth
It has been marked as deprecated since QEMU v2.0 already, so it is time now to finally remove it. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-id: 1528288551-31641-1-git-send-email-thuth@redhat.com Reviewed-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-06-11iotests: Fix 219's timingMax Reitz
219 has two issues that may lead to sporadic failure, both of which are the result of issuing query-jobs too early after a job has been modified. This can then lead to different results based on whether the modification has taken effect already or not. First, query-jobs is issued right after the job has been created. Besides its current progress possibly being in any random state (which has already been taken care of), its total progress too is basically arbitrary, because the job may not yet have been able to determine it. This patch addresses this by just filtering the total progress, like what has been done for the current progress already. However, for more clarity, the filtering is changed to replace the values by a string 'FILTERED' instead of deleting them. Secondly, query-jobs is issued right after a job has been resumed. The job may or may not yet have had the time to actually perform any I/O, and thus its current progress may or may not have advanced. To make sure it has indeed advanced (which is what the reference output already assumes), keep querying it until it has. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20180606190628.8170-1-mreitz@redhat.com Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-06-11iotests: improve pause_jobVladimir Sementsov-Ogievskiy
It's possible, that job was finished during waiting. In this case we will see error message "Timeout waiting for job to pause" which is not very informative. So, let's check during waiting iteration that the job exists. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20180601115923.17159-1-vsementsov@virtuozzo.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-06-11iotests: Test post-backing convert target behaviorMax Reitz
This adds a test case to 122 for what happens when you convert to a target with a backing file that is shorter than the target, and the image format does not support efficient zero writes (as is the case with qcow2 v2). Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20180501165750.19242-3-mreitz@redhat.com Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-06-11iotests: Add test for rebasing with relative pathsMax Reitz
Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20180509182002.8044-3-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-06-11iotests: Let 216 make use of qemu-io's exit codeMax Reitz
As a showcase of how you can use qemu-io's exit code to determine success or failure (same for qemu-img), this test is changed to use qemu_io_silent() instead of qemu_io(), and to assert the exit code instead of logging the filtered result. One real advantage of this is that in case of an error, you get a backtrace that helps you locate the issue in the test file quickly. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20180509194302.21585-6-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-06-11iotests.py: Add qemu_io_silentMax Reitz
With qemu-io now returning a useful exit code, some tests may find it sufficient to just query that instead of logging (and filtering) the whole output. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20180509194302.21585-5-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-06-11iotests: Repairing error during snapshot deletionMax Reitz
This adds a test for an I/O error during snapshot deletion, and maybe more importantly, for how to repair the resulting image. If the snapshot has been deleted before the error occurs, the only negative result will be leaked clusters -- and those should be repairable with qemu-img check -r leaks. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20180509200059.31125-3-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-06-11iotests: Rework 113Max Reitz
This test case has been broken since 398e6ad014df261d (roughly half a year). qemu-img amend requires its output image to be R/W, so it opens it as such; the node is then turned into an read-only node automatically which is now accompanied by a warning, however. This warning has not been part of the reference output. For one thing, this warning shows that we cannot keep the test case as it is. We would need a format that has no create_opts but that does have write support -- we do not have such a format, though. Another thing is that qemu now actually checks whether an image format supports amendment instead of whether it has create_opts (since the former always implies the latter). So we can now use any format that does not support amendment (even if it supports creation) and thus test the same code path. The reason nobody has noticed the breakage until now of course is the fact that nobody runs the iotests for nbd+bochs. There actually was never any reason to set the protocol to "nbd" but because that was technically correct; functionally it made no difference. So that is the first thing we are going to change: Make the protocol "file" instead so that people might actually notice breakage here. Secondly, now that bochs no longer works for the amend test case, we have to change the format there anyway. Set let us just bend the truth a bit, declare this test a raw test. In fact, that does not even concern the bochs test cases, other than the output now reading 'bochs' instead of 'IMGFMT'. So with this test now being a raw test, we can rework the amend test case to use raw instead. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 20180509210023.20283-8-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-06-11iotests: Test help option for unsupporting formatsMax Reitz
This adds test cases to 082 for qemu-img create/convert/amend "-o help" on formats that do not support creation or amendment, respectively. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20180509210023.20283-7-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-06-11qemu-img: Add print_amend_option_help()Max Reitz
The more generic print_block_option_help() function is not really suitable for qemu-img amend, for a couple of reasons: (1) We do not need to append the protocol-level options, as amendment happens only on one node and does not descend downwards to its children. (2) print_block_option_help() says those options are "supported". For option amendment, we do not really know that. So this new function explicitly says that those options are the creation options, and not all of them may be supported. (3) If the driver does not support option amendment, we should not print anything (except for an error message that amendment is not supported). Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1537956 Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20180509210023.20283-5-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-06-11block: Add Error parameter to bdrv_amend_optionsMax Reitz
Looking at the qcow2 code that is riddled with error_report() calls, this is really how it should have been from the start. Along the way, turn the target_version/current_version comparisons at the beginning of qcow2_downgrade() into assertions (the caller has to make sure these conditions are met), and rephrase the error message on using compat=1.1 to get refcount widths other than 16 bits. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20180509210023.20283-3-mreitz@redhat.com Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-06-11iotests: Add creation test to 153Max Reitz
This patch adds a test case to 153 which tries to overwrite an image (using qemu-img create) while it is in use. Without the original user explicitly sharing the necessary permissions (writing and truncation), this should not be allowed. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Message-id: 20180509215336.31304-4-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2018-06-11linux-user: disable qemu-bridge-helper and socket_scm_helper buildLaurent Vivier
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>
2018-06-08python: Remove scripts/ordereddict.pyEduardo Habkost
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>
2018-06-08python: futurize -f lib2to3.fixes.fix_numliteralsEduardo Habkost
Convert octal literals into the new syntax. This is necessary for Python 3 compatibility. Done using: $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \ sort -u | grep -v README.sh4) $ futurize -w -f lib2to3.fixes.fix_numliterals $py Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20180608122952.2009-11-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2018-06-08python: futurize -f lib2to3.fixes.fix_renamesEduardo Habkost
Change sys.maxint to sys.maxsize. This is necessary for Python 3 compatibility. Done using: $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \ sort -u | grep -v README.sh4) $ futurize -w -f lib2to3.fixes.fix_renames $py Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20180608122952.2009-9-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2018-06-08python: futurize -f lib2to3.fixes.fix_reduceEduardo Habkost
Handle the move of reduce() to functools.reduce(). This is necessary for Python 3 compatibility. Done using: $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \ sort -u | grep -v README.sh4) $ futurize -w -f lib2to3.fixes.fix_reduce $py Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20180608122952.2009-7-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2018-06-08python: futurize -f lib2to3.fixes.fix_has_keyEduardo Habkost
Change "dict.has_key(key)" to "key in dict" This is necessary for Python 3 compatibility. Done using: $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \ sort -u | grep -v README.sh4) $ futurize -w -f lib2to3.fixes.fix_has_key $py Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20180608122952.2009-5-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2018-06-08python: futurize -f libfuturize.fixes.fix_next_callEduardo Habkost
Change obj.next() calls to next(obj). This is necessary for Python 3 compatibility. Done using: $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \ sort -u | grep -v README.sh4) $ futurize -w -f libfuturize.fixes.fix_next_call $py Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20180608122952.2009-4-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2018-06-08python: futurize -f libfuturize.fixes.fix_absolute_importEduardo Habkost
Make implicit relative imports explicit and add "from __future__ import absolute_import" at the top of each relevant module. This is necessary for Python 3 compatibility. Done using: $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \ sort -u | grep -v README.sh4) $ futurize -w -f libfuturize.fixes.fix_absolute_import $py Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20180608122952.2009-3-ehabkost@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2018-06-08python: futurize -f libfuturize.fixes.fix_print_with_importEduardo Habkost
Change all Python code to use print as a function. This is necessary for Python 3 compatibility. Done using: $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \ sort -u | grep -v README.sh4) $ futurize -w -f libfuturize.fixes.fix_print_with_import $py Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Fam Zheng <famz@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20180608122952.2009-2-ehabkost@redhat.com> [ehabkost: fixup tests/docker/docker.py] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2018-06-08ahci: move PIO Setup FIS before transfer, fix it for ATAPI commandsJohn Snow
The PIO Setup FIS is written in the PIO:Entry state, which comes before the ATA and ATAPI data transfer states. As a result, the PIO Setup FIS interrupt is now raised before DMA ends for ATAPI commands, and tests have to be adjusted. This is also hinted by the description of the command header in the AHCI specification, where the "A" bit is described as When ‘1’, indicates that a PIO setup FIS shall be sent by the device indicating a transfer for the ATAPI command. and also by the description of the ACMD (ATAPI command region): The ATAPI command must be either 12 or 16 bytes in length. The length transmitted by the HBA is determined by the PIO setup FIS that is sent by the device requesting the ATAPI command. QEMU, which conflates the "generator" and the "receiver" of the FIS into one device, always uses ATAPI_PACKET_SIZE, aka 12, for the length. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20180606190955.20845-3-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
2018-06-08libqos/ahci: track sector sizeJohn Snow
It's not always 512, and it does wind up mattering for PIO tranfers, because this means DRQ blocks are four times as big for ATAPI. Replace an instance of 2048 with the correct define, too. This patch by itself winds changing no behavior. fis->count is ignored for CMD_PACKET, and sect_count only gets used in non-ATAPI cases. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20180606190955.20845-2-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
2018-06-08tests/cdrom-test: Test that -cdrom parameter is workingThomas Huth
Commit 1454509726719e0933c800 recently broke the "-cdrom" parameter on a couple of boards without us noticing it immediately. Thus let's add a test which checks that "-cdrom" can at least be used to start QEMU with certain machine types. 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>
2018-06-08tests/cdrom-test: Test booting from CD-ROM ISO image fileThomas Huth
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>
2018-06-08tests/boot-sector: Add magic bytes to s390x boot code headerThomas Huth
We're going to use the s390x boot code for testing CD-ROM booting. But the ISO loader of the s390-ccw bios is a little bit more picky than the network loader and expects some magic bytes in the header of the file (see linux_s390_magic in pc-bios/s390-ccw/bootmap.c), so we've got to add them in our boot code here, too. Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> 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>
2018-06-08misc: add pca9552 LED blinker modelCédric Le Goater
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>
2018-06-06test: Add swtpm migration test for the TPM TIS interfaceStefan Berger
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>
2018-06-06test: Pass TPM interface model to functions creating command lineStefan Berger
Pass the TPM interface model, such as 'tpm-crb', through to the functions that create the command line for QEMU. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-06-06test: Move common TPM test functions to tpm-tests.cStefan Berger
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>
2018-06-06test: Move reusable code from tpm-crb-swtpm-test.c to tpm-util.cStefan Berger
Move code we can reuse from tpm-crb-swtpm-test.c into tpm-util.c and prefix functions with 'tpm_util_'. Remove some unnecessary #include's. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-06-05docker: add debian/tricore imagePhilippe Mathieu-Daudé
TriCore binutils is built from Bastian Koppelmann repository. Note: There is no TriCore compiler in this image (only assembler/linker). Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> [AJB: base of Debian9, add to Makefile.include] Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2018-06-05docker: test-mingw: use SDL2 and GTK+3Paolo Bonzini
Do not test the deprecated API versions. debian-win32-cross and debian-win64-cross are already using SDL2 (they do not cover GTK+ at all). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> [AJB: fix merge conflicts] Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2018-06-05docker: Add fedora-i386-cross imageFam Zheng
It has some basic *-devel.i686 packages to be used with "gcc -m32" as a 32 bit cross build environment. Signed-off-by: Fam Zheng <famz@redhat.com> [AJB: add glibc-static] Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2018-06-05Makefile: Rename TARGET_DIRS to TARGET_LISTFam Zheng
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>
2018-06-05docker: add "probe" command for configureAlex Bennée
This is a helper function for the configure script. It replies yes, sudo or no to inform the user if non-interactive docker support is available. We trap the Exception to fail gracefully. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Fam Zheng <famz@redhat.com>
2018-06-04Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into ↵Peter Maydell
staging Pull request * Copy offloading for qemu-img convert (iSCSI, raw, and qcow2) If the underlying storage supports copy offloading, qemu-img convert will use it instead of performing reads and writes. This avoids data transfers and thus frees up storage bandwidth for other purposes. SCSI EXTENDED COPY and Linux copy_file_range(2) are used to implement this optimization. * Drop spurious "WARNING: I\/O thread spun for 1000 iterations" warning # gpg: Signature made Mon 04 Jun 2018 12:20:08 BST # gpg: using RSA key 9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/block-pull-request: main-loop: drop spin_counter qemu-img: Convert with copy offloading block-backend: Add blk_co_copy_range iscsi: Implement copy offloading iscsi: Create and use iscsi_co_wait_for_task iscsi: Query and save device designator when opening file-posix: Implement bdrv_co_copy_range qcow2: Implement copy offloading raw: Implement copy offloading raw: Check byte range uniformly block: Introduce API for copy offloading Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-04Merge remote-tracking branch 'remotes/famz/tags/docker-pull-request' into ↵Peter Maydell
staging # gpg: Signature made Mon 04 Jun 2018 08:09:27 BST # gpg: using RSA key CA35624C6A9171C6 # gpg: Good signature from "Fam Zheng <famz@redhat.com>" # Primary key fingerprint: 5003 7CB7 9706 0F76 F021 AD56 CA35 624C 6A91 71C6 * remotes/famz/tags/docker-pull-request: docker: Update fedora image to 28 tests/docker/Makefile.include: handle empty TARGET_LIST Signed-off-by: Peter Maydell <peter.maydell@linaro.org>