aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2019-12-16Merge remote-tracking branch 'remotes/amarkovic/tags/mips-queue-dec-16-2019' ↵Peter Maydell
into staging MIPS queue for December 16th, 2019 # gpg: Signature made Mon 16 Dec 2019 12:29:24 GMT # gpg: using RSA key D4972A8967F75A65 # gpg: Good signature from "Aleksandar Markovic <amarkovic@wavecomp.com>" [full] # Primary key fingerprint: 8526 FBF1 5DA3 811F 4A01 DD75 D497 2A89 67F7 5A65 * remotes/amarkovic/tags/mips-queue-dec-16-2019: MAINTAINERS: Add a file to MIPS section MAINTAINERS: Add three files to Malta section MAINTAINERS: Adjust maintainership for Malta board MAINTAINERS: Adjust maintainership for Fulong 2E board MAINTAINERS: Add a section on UI translation hw/mips: Deprecate the r4k machine mips: fulong 2e: Renovate coding style mips: r4000: Renovate coding style mips: mipssim: Renovate coding style mips: malta: Renovate coding style mips: jazz: Renovate coding style Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-16mips: malta: Renovate coding styleFilip Bozuta
The script checkpatch.pl located in scripts folder was used to detect all errors and warrnings in files: hw/mips/mips_malta.c hw/mips/gt64xxx_pci.c tests/acceptance/linux_ssh_mips_malta.py All these mips malta machine files were edited and all the errors and warrings generated by the checkpatch.pl script were corrected and then the script was ran again to make sure there are no more errors and warnings. Signed-off-by: Filip Bozuta <Filip.Bozuta@rt-rk.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1575640687-20744-3-git-send-email-Filip.Bozuta@rt-rk.com>
2019-12-16hw/arm/acpi: enable SHPC native hot plugHeyi Guo
After the introduction of generic PCIe root port and PCIe-PCI bridge, we will also have SHPC controller on ARM, so just enable SHPC native hot plug. Also update tests/data/acpi/virt/DSDT* to pass "make check". Cc: Shannon Zhao <shannon.zhaosl@gmail.com> Cc: Peter Maydell <peter.maydell@linaro.org> Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Heyi Guo <guoheyi@huawei.com> Message-id: 20191209063719.23086-3-guoheyi@huawei.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-16hw/arm/acpi: simplify AML bit and/or statementHeyi Guo
The last argument of AML bit and/or statement is the target variable, so we don't need to use a NULL target and then an additional store operation; using just aml_and() or aml_or() statement is enough. Also update tests/data/acpi/virt/DSDT* to pass "make check". Cc: Shannon Zhao <shannon.zhaosl@gmail.com> Cc: Peter Maydell <peter.maydell@linaro.org> Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Igor Mammedov <imammedo@redhat.com> Suggested-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Heyi Guo <guoheyi@huawei.com> Message-id: 20191209063719.23086-2-guoheyi@huawei.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-09docker: remove libcap development packagesPaolo Bonzini
Libcap was dropped from virtio-9p (commit 7e46261368d1), so remove it from the dockerfiles as well. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Alex Bennée <alex.bennee@linaro.org> [groug, mention SHA1 that dropped libcap] Signed-off-by: Greg Kurz <groug@kaod.org>
2019-11-26Merge remote-tracking branch ↵Peter Maydell
'remotes/stsquad/tags/pull-rc3-testing-261119-1' into staging A few vm-test updates - use Ubuntu 18.04 for i386 image - python3 for centos and docker - install locales for ubuntu # gpg: Signature made Tue 26 Nov 2019 11:31:26 GMT # gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full] # Primary key fingerprint: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44 * remotes/stsquad/tags/pull-rc3-testing-261119-1: tests/vm/ubuntu: update i386 image to 18.04 tests/vm/ubuntu: include language pack to silence locale warnings tests/vm/centos: fix centos build target Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-26Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-11-26' ↵Peter Maydell
into staging Block patches for 4.2.0-rc3: - Fix for shared storage migration with persistent dirty bitmaps # gpg: Signature made Tue 26 Nov 2019 13:27:32 GMT # gpg: using RSA key 91BEB60A30DB3E8857D11829F407DB0061D5CF40 # gpg: issuer "mreitz@redhat.com" # gpg: Good signature from "Max Reitz <mreitz@redhat.com>" [full] # Primary key fingerprint: 91BE B60A 30DB 3E88 57D1 1829 F407 DB00 61D5 CF40 * remotes/maxreitz/tags/pull-block-2019-11-26: iotests: add new test cases to bitmap migration block/qcow2-bitmap: fix bitmap migration Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-26iotests: add new test cases to bitmap migrationVladimir Sementsov-Ogievskiy
Add optional pre-shutdown: shutdown/launch vm before migration. This leads to storing persistent bitmap to the storage, which breaks migration with dirty-bitmaps capability enabled and shared storage until fixed by previous commit. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20191125125229.13531-3-vsementsov@virtuozzo.com Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-11-26tests/vm/ubuntu: update i386 image to 18.04Alex Bennée
The current image is broken while running qtests but the bug go away when built with a newer Ubuntu i386 image. I was unable to replicate the crash on Debian Buster for i386 either so I'm concluding it is a distro problem. Let's paper over that crack by updating our 32 bir test image. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-11-26tests/vm/ubuntu: include language pack to silence locale warningsAlex Bennée
The iotests in particular don't like the output being spammed with warnings about locales. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-11-26tests/vm/centos: fix centos build targetAlex Bennée
To be able to run the docker tests centos has here we have to install python3 as well as the basic tools. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-11-26pseries: fix migration-test and pxe-testLaurent Vivier
Commit 29cb4187497d ("spapr: Set VSMT to smp_threads by default") has introduced a new default value for VSMT that is not supported by old kernels (before 4.13 kernel) and this breaks "make check" on these kernels. To fix that, explicitly set in the involved tests the value that was used as the default value before the change. Cc: Greg Kurz <groug@kaod.org> Signed-off-by: Laurent Vivier <lvivier@redhat.com> Message-Id: <20191120142539.236279-1-lvivier@redhat.com> Acked-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Tested-by: Greg Kurz <groug@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-11-21Merge remote-tracking branch ↵Peter Maydell
'remotes/stsquad/tags/pull-rc3-testing-and-tcg-201119-1' into staging A few test and doc fixes: - tweak DEBUG behaviour for vm-test-build - rename and update plug docs for versioning - slim down MAIN_SOFTMMU_TARGETS # gpg: Signature made Wed 20 Nov 2019 10:56:23 GMT # gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full] # Primary key fingerprint: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44 * remotes/stsquad/tags/pull-rc3-testing-and-tcg-201119-1: tests/tcg: modify multiarch tests to work with clang .travis.yml: drop 32 bit systems from MAIN_SOFTMMU_TARGETS docs/devel: update tcg-plugins.rst with API versioning details docs/devel: rename plugins.rst to tcg-plugins.rst tests/vm: make --interactive (and therefore DEBUG=1) unconditional Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-20tests/tcg: modify multiarch tests to work with clangTaylor Simpson
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <1574032465-12186-1-git-send-email-tsimpson@quicinc.com> [AJB: tweak header line] Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-11-20tests/vm: make --interactive (and therefore DEBUG=1) unconditionalAlex Bennée
While the concept of only dropping to ssh if a test fails is nice it is more useful for this to be unconditional. You usually just want to get the build up and running and then noodle around debugging or attempting to replicate. Cc: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com>
2019-11-20tests: acpi: always retain dumped ACPI tables in case of errorIgor Mammedov
If IASL wasn't able to parse expected file, test will just print warning "Warning! iasl couldn't parse the expected aml\n" and remove temporary table dumped from guest. Typically expected tables are always valid, with an exception when patchset introduces new tables. Make sure dumped tables are retained even if expected files are not valid, so one could have a chance to manualy check new tables. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <1574240560-12538-1-git-send-email-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-11-19Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell
* microvm docs and fixes (Sergio, Liam) * New processor features for Intel errata (myself, Pawan) * Kconfig fixes (myself, Thomas) * Revert mc146818rtc change (myself) * Deprecate scsi-disk (myself) * RTC fix (myself, Marcelo) # gpg: Signature made Tue 19 Nov 2019 09:03:49 GMT # gpg: using RSA key BFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # 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: mc146818rtc: fix timer interrupt reinjection again Revert "mc146818rtc: fix timer interrupt reinjection" scsi: deprecate scsi-disk hw/i386: Move save_tsc_khz from PCMachineClass to X86MachineClass docs/microvm.rst: add instructions for shutting down the guest docs/microvm.rst: fix alignment in "Limitations" vfio: vfio-pci requires EDID hw/i386: Fix compiler warning when CONFIG_IDE_ISA is disabled target/i386: Export TAA_NO bit to guests target/i386: add PSCHANGE_NO bit for the ARCH_CAPABILITIES MSR microvm: fix memory leak in microvm_fix_kernel_cmdline scripts: Detect git worktrees for get_maintainer.pl --git Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-19scsi: deprecate scsi-diskPaolo Bonzini
It's an old compatibility shim that just delegates to scsi-cd or scsi-hd. Just like ide-drive, we don't need this. Acked-by: Peter Krempa <pkrempa@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-11-18tests: More iotest 223 improvementsEric Blake
Run the core of the test twice, once without iothreads, and again with, for more coverage of both setups. Suggested-by: Nir Soffer <nsoffer@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-Id: <20191114213415.23499-5-eblake@redhat.com>
2019-11-18iotests: Include QMP input in .out filesEric Blake
We generally include relevant HMP input in .out files, by virtue of the fact that HMP echoes its input. But QMP does not, so we have to explicitly inject it in the output stream (appropriately filtered to keep the tests passing), in order to make it easier to read .out files to see what behavior is being tested (especially true where the output file is a sequence of {'return': {}}). Suggested-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <20191114213415.23499-4-eblake@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
2019-11-18iotests: Switch nbd tests to use Unix rather than TCPEric Blake
Up to now, all it took to cause a lot of iotest failures was to have a background process such as 'nbdkit -p 10810 null' running, because we hard-coded the TCP port. Switching to a Unix socket eliminates this contention. We still have TCP coverage in test 233, and that test is more careful to not pick a hard-coded port. Add a comment explaining where the format layer applies when using NBD as protocol (until NBD gains support for a resize extension, we only pipe raw bytes over the wire). Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <20191114213415.23499-3-eblake@redhat.com> [eblake: Tweak socket name per Max Reitz' review]
2019-11-18iotests: Fix 173Eric Blake
This test has been broken since 3.0. It used TEST_IMG to influence the name of a file created during _make_test_img, but commit 655ae6bb changed things so that the wrong file name is being created, which then caused _launch_qemu to fail. In the meantime, the set of events issued for the actions of the test has increased. Why haven't we noticed the failure? Because the test rarely gets run: './check -qcow2 173' is insufficient (that defaults to using file protocol) './check -nfs 173' is insufficient (that defaults to using raw format) so the test is only run with: ./check -qcow2 -nfs 173 Note that we already have a number of other problems with -nfs: ./check -nfs (fails 18/30) ./check -qcow2 -nfs (fails 45/76 after this patch, if exports does not permit 'insecure') and it's not on my priority list to fix those. Rather, I found this because of my next patch's work on tests using _send_qemu_cmd. Fixes: 655ae6b Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-Id: <20191114213415.23499-2-eblake@redhat.com>
2019-11-18iotests: Test NBD client reconnectionAndrey Shinkevich
The test for an NBD client. The NBD server is disconnected after the client write request. The NBD client should reconnect and complete the write operation. Suggested-by: Denis V. Lunev <den@openvz.org> Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> Tested-by: Eric Blake <eblake@redhat.com> Message-Id: <1573529976-815699-1-git-send-email-andrey.shinkevich@virtuozzo.com>
2019-11-18iotests: Test multiple blockdev-snapshot callsKevin Wolf
Test that doing a second blockdev-snapshot doesn't make the first overlay's backing file go away. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2019-11-18iotests: Fix "no qualified output" error pathKevin Wolf
The variable for error messages to be displayed is $results, not $reason. Fix 'check' to print the "no qualified output" error message again instead of having a failure without any message telling the user why it failed. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
2019-11-18qemu-iotests/iotests.py: improve assert_qmp messageVladimir Sementsov-Ogievskiy
From the two values compared, make it obvious which is found at path, and which is expected. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-11-12tcg plugins: expose an API version conceptAlex Bennée
This is a very simple versioning API which allows the plugin infrastructure to check the API a plugin was built against. We also expose a min/cur API version to the plugin via the info block in case it wants to avoid using old deprecated APIs in the future. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Robert Foley <robert.foley@linaro.org>
2019-11-12tests/vm: support sites with sha512 checksumsAlex Bennée
The NetBSD project uses SHA512 for its checksums so lets support that in the download helper. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-11-12tests: only run ipmi-bt-test if CONFIG_LINUXAlex Bennée
This test has been unstable on NetBSD for awhile. It seems the mechanism used to listen to a random port is a Linux-ism (although a received wisdom Linux-ism rather than a well documented one). As working around would add more hard to test complexity to the test I've gone for the easier option of making it CONFIG_LINUX only. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Cc: Corey Minyard <cminyard@mvista.com> Cc: Kamil Rytarowski <kamil@netbsd.org>
2019-11-12tests/vm: update netbsd to version 8.1Gerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-Id: <20191031085306.28888-5-kraxel@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-11-12tests/vm: use console_consume for netbsdGerd Hoffmann
Use new helper to read all pending console output, not just a single char. Unblocks installer boot. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-Id: <20191031085306.28888-4-kraxel@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-11-12tests/vm: add console_consume helperGerd Hoffmann
Helper function to read all console output. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-Id: <20191031085306.28888-3-kraxel@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-11-12tests/vm: netbsd autoinstall, using serial consoleGerd Hoffmann
Instead of fetching the prebuilt image from patchew download the install iso and prepare the image locally. Install to disk, using the serial console. Create qemu user, configure ssh login. Install packages needed for qemu builds. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Kamil Rytarowski <n54@gmx.com> Tested-by: Thomas Huth <thuth@redhat.com> [ehabkost: rebased to latest qemu.git master] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20191031085306.28888-2-kraxel@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-11-11tests/migration: Print some debug on bad statusDr. David Alan Gilbert
We're seeing occasional asserts in 'wait_for_migraiton_fail', that I can't reliably reproduce, and where the cores don't have any useful state. Print the 'status' out, so we can see which unexpected state we're ending up in. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20191108104307.125020-1-dgilbert@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-11-11cpu-plug-test: fix leaksMarc-André Lureau
Spotted by ASAN. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20191107192731.17330-4-marcandre.lureau@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Fixes: 021a007efc3 ("cpu-plug-test: fix device_add for pc/q35 machines") Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-11-11qtest: fix qtest_qmp_device_add leakMarc-André Lureau
Spotted by ASAN. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20191107192731.17330-3-marcandre.lureau@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Fixes: b4510bb4109f5f ("tests: add qtest_qmp_device_add_qdict() helper") Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-11-07iotests: Add test for 4G+ compressed qcow2 writeMax Reitz
Test what qemu-img check says about an image after one has written compressed data to an offset above 4 GB. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20191028161841.1198-3-mreitz@redhat.com Reviewed-by: Alberto Garcia <berto@igalia.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-11-06Merge remote-tracking branch ↵Peter Maydell
'remotes/vivier2/tags/linux-user-for-4.2-pull-request' into staging sparc/sparc64 fixes: this doesn't fix debian chroot for me but they are a step in the good direction. Fix Netlink support. Trivial fix for alpha PULL v2: fix checkpatch warnings # gpg: Signature made Wed 06 Nov 2019 13:04:36 GMT # gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C # gpg: issuer "laurent@vivier.eu" # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full] # gpg: aka "Laurent Vivier <laurent@vivier.eu>" [full] # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full] # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/vivier2/tags/linux-user-for-4.2-pull-request: linux-user/alpha: Set r20 secondary return value linux-user/sparc: Fix cpu_clone_regs_* linux-user: Introduce cpu_clone_regs_parent linux-user: Rename cpu_clone_regs to cpu_clone_regs_child linux-user/sparc64: Fix target_signal_frame linux-user/sparc: Fix WREG usage in setup_frame linux-user/sparc: Use WREG_SP constant in sparc/signal.c linux-user/sparc: Begin using WREG constants in sparc/signal.c linux-user/sparc: Use WREG constants in sparc/target_cpu.h target/sparc: Define an enumeration for accessing env->regwptr tests/tcg/multiarch/linux-test: Fix error check for shmat scripts/qemu-binfmt-conf: Update for sparc64 linux-user: Support for NETLINK socket options Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-06Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into ↵Peter Maydell
staging Pull request Let's get the image fuzzer Python 3 changes merged in QEMU 4.2. # gpg: Signature made Tue 05 Nov 2019 15:43:16 GMT # gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full] # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" [full] # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/block-pull-request: image-fuzzer: Use OSerror.strerror instead of tuple subscript image-fuzzer: Use errors parameter of subprocess.Popen() image-fuzzer: Run using python3 image-fuzzer: Encode file name and file format to bytes image-fuzzer: Use bytes constant for field values image-fuzzer: Return bytes objects on string fuzzing functions image-fuzzer: Use %r for all fiels at Field.__repr__() image-fuzzer: Use io.StringIO image-fuzzer: Explicitly use integer division operator image-fuzzer: Write bytes instead of string to image file image-fuzzer: Open image files in binary mode Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-06tests/tcg/multiarch/linux-test: Fix error check for shmatRichard Henderson
The error indicator for this syscall is -1, not 0. Fixes: e374bfa35bfb ("shm tests - disabled clone test") Reviewed-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20191106113318.10226-3-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2019-11-05Merge remote-tracking branch ↵Peter Maydell
'remotes/philmd-gitlab/tags/fw_cfg-next-pull-request' into staging Fix the fw_cfg reboot-timeout=-1 special value, add a test for it. # gpg: Signature made Sun 03 Nov 2019 22:21:02 GMT # gpg: using RSA key 89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (Phil) <philmd@redhat.com>" [marginal] # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 89C1 E78F 601E E86C 8674 95CB A2A3 FD6E DEAD C0DE * remotes/philmd-gitlab/tags/fw_cfg-next-pull-request: tests/fw_cfg: Test 'reboot-timeout=-1' special value fw_cfg: Allow reboot-timeout=-1 again Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-05image-fuzzer: Use OSerror.strerror instead of tuple subscriptEduardo Habkost
OSError can't be used like a tuple on Python 3, so change the code to use `e.sterror` instead of `e[1]`. Reported-by: John Snow <jsnow@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 20191021214117.18091-1-ehabkost@redhat.com Message-Id: <20191021214117.18091-1-ehabkost@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-11-05image-fuzzer: Use errors parameter of subprocess.Popen()Eduardo Habkost
Instead of manually encoding stderr and stdout output, use `errors` parameter of subprocess.Popen(). This will make process.communicate() return unicode strings instead of bytes objects. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20191016192430.25098-11-ehabkost@redhat.com Message-Id: <20191016192430.25098-11-ehabkost@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-11-05image-fuzzer: Run using python3Eduardo Habkost
image-fuzzer is now supposed to be ready to run using Python 3. Remove the __future__ imports and change the interpreter line to "#!/usr/bin/env python3". Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20191016192430.25098-10-ehabkost@redhat.com Message-Id: <20191016192430.25098-10-ehabkost@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-11-05image-fuzzer: Encode file name and file format to bytesEduardo Habkost
Callers of create_image() will pass strings as arguments, but the Image class will expect bytes objects to be provided. Encode them inside create_image(). Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20191016192430.25098-9-ehabkost@redhat.com Message-Id: <20191016192430.25098-9-ehabkost@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-11-05image-fuzzer: Use bytes constant for field valuesEduardo Habkost
Field values are supposed to be bytes objects, not unicode strings. Change two constants that were declared as strings. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20191016192430.25098-8-ehabkost@redhat.com Message-Id: <20191016192430.25098-8-ehabkost@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-11-05image-fuzzer: Return bytes objects on string fuzzing functionsEduardo Habkost
No caller of fuzzer functions is interested in unicode string values, so replace them with bytes sequences. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20191016192430.25098-7-ehabkost@redhat.com Message-Id: <20191016192430.25098-7-ehabkost@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-11-05image-fuzzer: Use %r for all fiels at Field.__repr__()Eduardo Habkost
This makes the formatting code simpler, and safer if we change the type of self.value from str to bytes. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20191016192430.25098-6-ehabkost@redhat.com Message-Id: <20191016192430.25098-6-ehabkost@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-11-05image-fuzzer: Use io.StringIOEduardo Habkost
StringIO.StringIO is not available on Python 3, but io.StringIO is available on both Python 2 and 3. io.StringIO is slightly different from the Python 2 StringIO module, though, so we need bytes coming from subprocess.Popen() to be explicitly decoded. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20191016192430.25098-5-ehabkost@redhat.com Message-Id: <20191016192430.25098-5-ehabkost@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-11-05image-fuzzer: Explicitly use integer division operatorEduardo Habkost
Most of the division expressions in image-fuzzer assume integer division. Use the // operator to keep the same behavior when we move to Python 3. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20191016192430.25098-4-ehabkost@redhat.com Message-Id: <20191016192430.25098-4-ehabkost@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>