aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-07-09sam460ex: Update u-boot-sam460ex firmwareBALATON Zoltan2-0/+0
Update the submodule and u-boot-sam460-20100605.bin to include following fixes from Sebastian Bauer: - Fix build with newer gcc - Decrease unnecessary delay which fixes slow booting from CD Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-07-07ppc: fix default VGA display for PReP machinesMark Cave-Ayland1-0/+2
Commit 29f9cef "ppc: Include vga cirrus card into the compiling process" changed the default display adapter for all PPC machines to cirrus. Unfortunately it missed setting the default display type to stdvga for both PReP machines causing the display to fail to initialise under OpenHackWare. Update the MachineClass for both prep and 40p machines so that the default std(vga) display adapter is the default if no options are specified which fixes the display for the PReP machines. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-07-07target/ppc: fix build on ppc64 hostLaurent Vivier1-1/+1
When I try to build a ppc64 target on a ppc64 host (gcc 8.1.1), I have: .../target/ppc/int_helper.c: In function 'helper_vinsertb': .../target/ppc/int_helper.c:1954:32: error: array subscript 18446744073709551608 is above array bounds of 'uint8_t[16]' {aka 'unsigned char[16]'} [-Werror=array-bounds] memmove(&r->u8[index], &b->u8[8 - sizeof(r->element)], \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .../target/ppc/int_helper.c:1965:1: note: in expansion of macro 'VINSERT' If we compare with the macro for ppc64le, we can see sizeof(r->element[0]) should be used instead of sizeof(r->element). And VINSERT uses only u8, u16, u32 and u64, so the maximum value of sizeof(r->element[0]) is 8 Suggested-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-07-07ppc440_uc: Fix a copy/paste errorPhilippe Mathieu-Daudé1-1/+1
Missed in 3c409c1927e, hopefully reported by Coverity. Fixes: Coverity CID 1393788 (Copy-paste error) Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-07-07sm501: Set updated region dirty after 2D operationBALATON Zoltan1-2/+15
Set the changed memory region dirty after performed a 2D operation to ensure that the screen is updated properly. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-07-07sm501: Fix support for non-zero frame buffer start addressBALATON Zoltan1-3/+16
Display updates and drawing hardware cursor did not work when frame buffer address was non-zero. Fix this by taking the frame buffer address into account in these cases. This fixes screen dragging on AmigaOS. Based on patch by Sebastian Bauer. Signed-off-by: Sebastian Bauer <mail@sebastianbauer.info> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-07-07sm501: Log unimplemented raster operation modesSebastian Bauer1-0/+23
The sm501 currently implements only a very limited set of raster operation modes. After this change, unknown raster operation modes are logged so these can be easily spotted. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-07-07sm501: Implement negated destination raster operation modeSebastian Bauer1-1/+11
Add support for the negated destination operation mode. This is used e.g. by AmigaOS for the INVERSEVID drawing mode. With this change, the cursor in the shell and non-immediate window adjustment are working now. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-07-07sm501: Use values from the pitch register for 2D operationsSebastian Bauer1-2/+2
Before, crt_h_total was used for src_width and dst_width. This is a property of the current display setting and not relevant for the 2D operation that also can be done off-screen. The pitch register's purpose is to describe line pitch relevant of the 2D operation. Signed-off-by: Sebastian Bauer <mail@sebastianbauer.info> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-07-07sm501: Perform a full update after palette changeSebastian Bauer1-0/+8
Changing the palette of a color index has as an immediate effect on all pixels with the corresponding index on real hardware. Performing a full update after a palette change is a simple way to emulate this effect. Signed-off-by: Sebastian Bauer <mail@sebastianbauer.info> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-07-07sm501: Implement i2c part for reading monitor EDIDBALATON Zoltan5-4/+149
Emulate the i2c part of SM501 which is used to access the EDID info from a monitor. The vmstate structure is changed and its version is increased but SM501 is only used on SH and PPC sam460ex machines that don't support cross-version migration. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-07-07spapr/vio: quiet down the "irq" property accessorsCédric Le Goater1-3/+12
commit efe2add7cb7f ("spapr/vio: deprecate the "irq" property") introduced get/set accessors for the "irq" property to warn of its usage, but the warning in the get pollutes the monitor 'info qtree'. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-07-07ppc: fix default VGA display for Mac machinesMark Cave-Ayland2-0/+2
Commit 29f9cef39e "ppc: Include vga cirrus card into the compiling process" changed the default display adapter for all PPC machines to cirrus. Unfortunately it missed setting the default display type to stdvga for both Mac machines causing the display to fail to initialise under OpenBIOS. Update the MachineClass for both Old World and New World Macs so that the default std(vga) display adapter is the default if no options are specified which fixes the display for the Mac machines. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-07-06Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell7-87/+84
Bug fixes. # gpg: Signature made Fri 06 Jul 2018 17:40:06 BST # 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: checkpatch: handle token pasting better ioapic: remove useless lower bounds check pr-manager-helper: fix memory leak on event qemu-char: check errno together with ret < 0 i386: fix '-cpu ?' output for host cpu type qtest: Use cpu address space instead of system memory pr-helper: Rework socket path handling pr-helper: avoid error on PR IN command with zero request size Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-07-06checkpatch: handle token pasting betterPaolo Bonzini1-5/+4
The mechanism to find possible type tokens can sometimes be confused and go into an infinite loop. This happens for example in QEMU for a line that looks like uint## BITS ##_t S = _S, T = _T; \ uint## BITS ##_t as, at, xs, xt, xd; \ Because the token pasting operator does not have a space before _t, it does not match $notPermitted. However, (?x) is turned on in the regular expression for modifiers, and thus ##_t matches the empty string. As a result, annotate_values goes in an infinite loop. The solution is simply to remove token pasting operators from the string before looking for modifiers. In the example above, the string uintBITS_t will be evaluated as a candidate modifier. This is not optimal, but it works as long as people do not write things like a##s##m, and it fits nicely into sub possible. For a similar reason, \# should be rejected always, even if it is not at end of line or followed by whitespace. The same patch was sent to the Linux kernel mailing list. Reported-by: Aleksandar Markovic <amarkovic@wavecomp.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-07-06ioapic: remove useless lower bounds checkPaolo Bonzini1-1/+1
The vector cannot be negative. Coverity now reports this because it sees an array access before the check, in ioapic_stat_update_irq. Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-07-06pr-manager-helper: fix memory leak on eventPaolo Bonzini1-0/+1
Reported by Coverity. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-07-06qemu-char: check errno together with ret < 0xinhua.Cao1-2/+5
In the tcp_chr_write function, we checked errno, but errno was not reset before a read or write operation. Therefore, this check of errno's actions is often incorrect after EAGAIN has occurred. we need check errno together with ret < 0. Signed-off-by: xinhua.Cao <caoxinhua@huawei.com> Message-Id: <20180704033642.15996-1-caoxinhua@huawei.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Fixes: 9fc53a10f81d3a9027b23fa810147d21be29e614 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-07-06i386: fix '-cpu ?' output for host cpu typeGreg Kurz1-7/+7
Since commit d6dcc5583e7, '-cpu ?' shows the description of the X86_CPU_TYPE_NAME("max") for the host CPU model: Enables all features supported by the accelerator in the current host instead of the expected: KVM processor with all supported host features or HVF processor with all supported host features This is caused by the early use of kvm_enabled() and hvf_enabled() in a class_init function. Since the accelerator isn't configured yet, both helpers return false unconditionally. A QEMU binary will only be compiled with one of these accelerators, not both. The appropriate description can thus be decided at build time. Signed-off-by: Greg Kurz <groug@kaod.org> Message-Id: <153055056654.212317.4697363278304826913.stgit@bahia.lan> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-07-06qtest: Use cpu address space instead of system memoryJulia Suvorova1-13/+26
Some devices (like nvic in armv7m) are not accessable through address_space_memory, therefore can not be tested with qtest. Signed-off-by: Julia Suvorova <jusual@mail.ru> Message-Id: <20180702065237.27899-1-jusual@mail.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-07-06pr-helper: Rework socket path handlingMichal Privoznik1-26/+10
When reviewing Paolo's pr-helper patches I've noticed couple of problems: 1) socket_path needs to be calculated at two different places (one for printing out help, the other if socket activation is NOT used), 2) even though the default socket_path is allocated in compute_default_paths() it is the only default path the function handles. For instance, pidfile is allocated outside of this function. And yet again, at different places than 1) Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Message-Id: <c791ba035f26ea957e8f3602e3009b621769b1ba.1530611283.git.mprivozn@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-07-06pr-helper: avoid error on PR IN command with zero request sizePaolo Bonzini1-33/+30
After reading a PR IN command with zero request size in prh_read_request, the resp->result field will be uninitialized and the resp.sz field will be also uninitialized when returning to prh_co_entry. If resp->result == GOOD (from a previous successful reply or just luck), then the assert in prh_write_response might not be triggered and uninitialized response will be sent. The fix is to remove the whole handling of sz == 0 in prh_co_entry. Those errors apply only to PR OUT commands and it's perfectly okay to catch them later in do_pr_out and multipath_pr_out; the check for too-short parameters in fact doesn't apply in the easy SG_IO case, as it can be left to the target firmware even. The result is that prh_read_request does not fail requests anymore and prh_co_entry becomes simpler. Reported-by: Dima Stepanov <dimastep@yandex-team.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-07-06tests/migration: Skip tests for ppc tcgDr. David Alan Gilbert1-6/+17
PPC tcg seems to be failing migration tests quite regularly; we believe this is TCG bugs in dirty bit updating; it's not clear why PPC fails more but lets skip for the moment. $ ./tests/migration-test /ppc64/migration/deprecated: OK /ppc64/migration/bad_dest: Skipping test: kvm_hv not available OK /ppc64/migration/postcopy/unix: Skipping test: kvm_hv not available OK /ppc64/migration/precopy/unix: Skipping test: kvm_hv not available OK Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com> Message-id: 20180706143105.93472-1-dgilbert@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-07-06Merge remote-tracking branch ↵Peter Maydell9-68/+235
'remotes/alistair/tags/pull-riscv-pull-20180705' into staging RISC-V: SoCify SiFive boards and connect GEM This series has three tasks: 1. To convert the SiFive U and E machines into SoCs and boards 2. To connect the Cadence GEM device to the SiFive U board 3. Fix some device tree problems with the SiFive U board After this series the SiFive E and U boards have their SoCs split into seperate QEMU objects, which can be used on future boards if desired. The RISC-V Virt and Spike boards have not been converted. They haven't been converted as they aren't physical boards, so it doesn't make a whole lot of sense to split them into an SoC and board. The only disadvantage with this is that they now differ to the SiFive boards. This series also connect the Cadence GEM device to the SiFive U board. There are some interrupt line changes requried before this is possible. # gpg: Signature made Fri 06 Jul 2018 02:17:21 BST # gpg: using RSA key 21E10D29DF977054 # gpg: Good signature from "Alistair Francis <alistair@alistair23.me>" # 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: F6C4 AC46 D493 4868 D3B8 CE8F 21E1 0D29 DF97 7054 * remotes/alistair/tags/pull-riscv-pull-20180705: hw/riscv/sifive_u: Connect the Cadence GEM Ethernet device hw/riscv/sifive_u: Move the uart device tree node under /soc/ hw/riscv/sifive_u: Set the interrupt controller number of interrupts hw/riscv/sifive_u: Set the soc device tree node as a simple-bus hw/riscv/sifive_plic: Use gpios instead of irqs hw/riscv/sifive_e: Create a SiFive E SoC object hw/riscv/sifive_u: Create a SiFive U SoC object Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-07-05hw/riscv/sifive_u: Connect the Cadence GEM Ethernet deviceAlistair Francis4-2/+61
Connect the Cadence GEM ethernet device. This also requires us to expose the plic interrupt lines. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Michael Clark <mjc@sifive.com>
2018-07-05hw/riscv/sifive_u: Move the uart device tree node under /soc/Alistair Francis1-1/+1
Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Michael Clark <mjc@sifive.com>
2018-07-05hw/riscv/sifive_u: Set the interrupt controller number of interruptsAlistair Francis1-1/+1
Set the interrupt-controller ndev to the correct number taken from the HiFive Unleashed board. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Michael Clark <mjc@sifive.com>
2018-07-05hw/riscv/sifive_u: Set the soc device tree node as a simple-busAlistair Francis1-1/+1
To allow Linux to ennumerate devices on the /soc/ node set it as a "simple-bus". Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Michael Clark <mjc@sifive.com>
2018-07-05hw/riscv/sifive_plic: Use gpios instead of irqsAlistair Francis5-12/+9
Instead of creating the interrupt in lines with qemu_allocate_irq() use qdev_init_gpio_in() as this gives us the ability to use the qdev*gpio*() helpers later on. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Suggested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Michael Clark <mjc@sifive.com>
2018-07-05hw/riscv/sifive_e: Create a SiFive E SoC objectAlistair Francis2-27/+83
Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Michael Clark <mjc@sifive.com>
2018-07-05hw/riscv/sifive_u: Create a SiFive U SoC objectAlistair Francis2-24/+79
Create a SiFive Unleashed U54 SoC and use that in the sifive_u machine. We leave the SoC, RAM, device tree and reset/fdt loading as part of the machine. All the other device creation has been moved to the SoC. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Michael Clark <mjc@sifive.com>
2018-07-05Merge remote-tracking branch ↵Peter Maydell21-56/+223
'remotes/stsquad/tags/pull-code-coverage-and-build-tweaks-050718-3' into staging Code coverage and other build tweaks - revert 208ecb3e (and drop filter for mingw, tweak for check-tcg) - some travis speed-ups - modernise code coverage support - docker image cleanups - clean-up binfmt_misc docker infrastructure - add debian-powerpc-user-cross image for ppc32 build # gpg: Signature made Thu 05 Jul 2018 17:00:02 BST # gpg: using RSA key FBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" # Primary key fingerprint: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44 * remotes/stsquad/tags/pull-code-coverage-and-build-tweaks-050718-3: docker: add linux-user powered cross builder for QEMU docker: add special rule for deboostrapped images docker: add special handling for FROM:debian-%-user targets docker: debian-bootstrap.pre allow customising of variant/url docker: drop QEMU build-dep from bootstrap docker: Do not run tests in 'intermediate' images docker: Clean the MXE base image docker: ubuntu: Use SDL2 docker: ubuntu: Update the package list before installing new ones linux-user: add gcov support to preexit_cleanup linux-user: introduce preexit_cleanup build-system: add coverage-report target build-system: add clean-coverage target travis: add gcovr summary for GCOV build docker: add gcovr to travis image .gitignore: add .gcov files build-system: remove per-test GCOV reporting travis: test out-of-tree builds travis: do not waste time cloning unused submodules Revert "Makefile: Rename TARGET_DIRS to TARGET_LIST" Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-07-05docker: add linux-user powered cross builder for QEMUAlex Bennée2-9/+48
We can't use cross compilers in the current Debian stable and Debian sid is sketchy as hell. So for powerpc fall back to dog-fooding our own linux-user to do the build. As we can only build the base image with a suitably configured source tree we fall back to checking for its existence when we can't build it from scratch. However this does mean you don't have to keep a static powerpc-linux-user in your active configuration just to update the cross build image. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2018-07-05Merge remote-tracking branch 'remotes/armbru/tags/pull-cov-model-2018-07-05' ↵Peter Maydell1-6/+2
into staging Coverity model patches for 2018-07-05 # gpg: Signature made Thu 05 Jul 2018 14:11:03 BST # gpg: using RSA key 3870B400EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-cov-model-2018-07-05: coverity-model: Fix replay_get_byte() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-07-05docker: add special rule for deboostrapped imagesAlex Bennée1-3/+21
We might as well have a custom rule for this. For one thing the dependencies are different. As the primary dependency for docker-image-% could never be docker-image-debian-bootstrap we can drop that test in the main rule as well. Missing EXECUTABLE, DEB_ARCH and DEB_TYPE are treated as hard faults now. We also error out if the EXECUTABLE file isn't there. We should really do this with a dependency on any source rules but currently subdir-FOO-linux-user isn't enough on a clean build. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2018-07-05docker: add special handling for FROM:debian-%-user targetsAlex Bennée1-0/+4
These will have been build with debootstrap so we need to check against the debian-bootstrap dockerfile. This does mean sticking to debian-FOO-user as the naming conventions for boot-strapped images. The actual cross image is built on top. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2018-07-05docker: debian-bootstrap.pre allow customising of variant/urlAlex Bennée1-1/+10
We default to the buildd variant as most of our images are for building. However lets give the user the ability to specify "minbase" if they want to create a simple base image for experimentation. Allowing the tweaking of DEB_URL means we can also bootstrap other Debian based OS's. For example: make docker-binfmt-image-debian-ubuntu-bionic-arm64 \ DEB_ARCH=arm64 DEB_TYPE=bionic \ DEB_VARIANT=minbase DEB_URL=http://ports.ubuntu.com/ \ EXECUTABLE=./aarch64-linux-user/qemu-aarch64 Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2018-07-05docker: drop QEMU build-dep from bootstrapAlex Bennée1-2/+0
This is best done with any child images that actually need it. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2018-07-05docker: Do not run tests in 'intermediate' imagesPhilippe Mathieu-Daudé1-1/+3
We can still build the DOCKER_INTERMEDIATE_IMAGES images, but they won't appear in 'make test*@$IMAGE'. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2018-07-05docker: Clean the MXE base imagePhilippe Mathieu-Daudé1-1/+1
Using the duplicated same package is confusing. Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2018-07-05docker: ubuntu: Use SDL2Philippe Mathieu-Daudé1-2/+2
Do not test the deprecated API versions (see cabd35840749d). Debian MXE MinGW cross images are already using SDL2. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2018-07-05docker: ubuntu: Update the package list before installing new onesPhilippe Mathieu-Daudé1-2/+2
Since docker caches the different layers, updating the package list does not invalidate the previous "apt-get update" layer, and it is likely "apt-get install" hits an outdated repository. See https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#apt-get This fixes: $ make docker-image-ubuntu V=1 ./tests/docker/docker.py build qemu:ubuntu tests/docker/dockerfiles/ubuntu.docker --add-current-user Sending build context to Docker daemon 3.072kB [...] E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mesa/libgles2-mesa_17.0.7-0ubuntu0.16.04.2_amd64.deb 404 Not Found E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mesa/libgles2-mesa-dev_17.0.7-0ubuntu0.16.04.2_amd64.deb 404 Not Found E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? The command '/bin/sh -c apt-get -y install $PACKAGES' returned a non-zero code: 100 tests/docker/Makefile.include:40: recipe for target 'docker-image-ubuntu' failed make: *** [docker-image-ubuntu] Error 1 Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2018-07-05linux-user: add gcov support to preexit_cleanupAlex Bennée1-0/+7
As we don't always take the normal exit path when running a guest we can skip the normal exit destructors where gcov normally dumps it's info. The GCC manual suggests long running programs use __gcov_dump() to flush out the coverage state periodically so we use that here. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2018-07-05linux-user: introduce preexit_cleanupAlex Bennée4-9/+39
To avoid repeating ourselves move our preexit clean-up code into a helper function. I figured the continuing effort to split of the syscalls made it worthwhile creating a new file for it now. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu>
2018-07-05build-system: add coverage-report targetAlex Bennée2-3/+21
This will build a coverage report under the current directory in reports/coverage. At the users option a report can be generated by directly invoking something like: make foo/bar/coverage-report.html Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-07-05build-system: add clean-coverage targetAlex Bennée2-3/+19
This can be used to remove any stale coverage data before any particular test run. This is useful for analysing individual tests. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>---
2018-07-05travis: add gcovr summary for GCOV buildAlex Bennée3-0/+31
This gives a more useful summary, sorted by descending % coverage, after the tests have run. The final numbers will give an idea if our coverage is getting better or worse. To keep the width sane we need to post process the file that the old gcovr tool generates. This is done with a mix of sed, awk and column in the scripts/coverage-summary.sh script. As quite a lot of lines don't get covered at all we filter out all the 0% lines. If the file doesn't appear it is not being exercised. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-07-05docker: add gcovr to travis imageAlex Bennée1-1/+1
Useful for debugging if nothing else as the gcovr on the Travis images are a little old. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-07-05.gitignore: add .gcov filesAlex Bennée1-0/+1
These are temporary files generated on gcov runs and shouldn't be included in the source tree. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-07-05build-system: remove per-test GCOV reportingAlex Bennée2-16/+5
I'm not entirely sure who's using this information and certainly in a CI environment it just washes over as additional noise. Later patches will provide new reporting options so a user who wants to analyse individual tests will be able to use that to get the information. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>