[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 26/29] tests/tcg: use ARRAY_SIZE macro
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [PATCH 26/29] tests/tcg: use ARRAY_SIZE macro |
Date: |
Tue, 18 Jul 2017 14:52:16 +0100 |
User-agent: |
mu4e 0.9.19; emacs 25.2.50.3 |
Marc-André Lureau <address@hidden> writes:
> Hi
>
> On Tue, Jul 18, 2017 at 4:16 AM, Alex Bennée <address@hidden> wrote:
>>
>> Marc-André Lureau <address@hidden> writes:
>>
>>> Hi
>>>
>>> On Mon, Jul 17, 2017 at 11:10 PM, Philippe Mathieu-Daudé
>>> <address@hidden> wrote:
>>>> Applied using the Coccinelle semantic patch
>>>> scripts/coccinelle/use_osdep.cocci
>>>>
>>>> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
>>>> ---
>>>> tests/tcg/alpha/test-cond.c | 2 +-
>>>> tests/tcg/alpha/test-ovf.c | 2 +-
>>>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>
>>> I think those do not include osdep.h
>>>
>>> (sigh, tests/tcg would need some love ;)
>>
>> Pranith has had a couple of revs at this:
>>
>> Subject: [PATCH v5 00/19] Cleanup of TCG tests
>> Date: Thu, 1 Dec 2016 00:14:14 -0500
>> Message-Id: <address@hidden>
>>
>> We have the cross-compilers available as a fallback via docker although
>> not every one can seamlessly use it for building stuff. Is getting a
>> working cross-compiler setup too much of a hurdle fore those that want
>> to build cross-arch tests?
>
> Yes, I also did some experiments in cleaning up tests/tcg
> (https://github.com/elmarco/qemu/tree/tcg-tests)
>
> The trouble is I don't see an official/automated way to run tests/tcg
> tests. Which cross-compiler should I use? When I played with this,
> they all had various quirks, on Fedora, Debian or crosstool-ng.
Debian at least have put a lot of work into getting cross-compilers
installed as part of the native distro with good multi-arch support. We
now use plain Debian 9 for most of the QEMU cross compiles - a few older
architectures still need Debian 8 with the emdebian overlay.
> I haven't looked at the docker tests, is this running tests/tcg test
> somehow?
No but as tests/tcg are all pretty simple and have less cross-compile
dependencies than QEMU itself it is fairly trivial to invoke docker to
do a cross-build for you in-place. e.g.:
docker run --rm -t -u (id -u) -v (pwd):(pwd) -w (pwd) qemu:debian-armhf-cross
arm-linux-gnueabihf-gcc tests/tcg/hello-arm.c
This is perhaps a bad example as there is a bit-rot that needs fixing.
The alternative is to mine the users PATH for fairly standard
cross-compile prefixes which work at least on Debian systems. I recently
submitted a patch to RISU that allowed you to use either in its
build-all-arches script:
https://git.linaro.org/people/peter.maydell/risu.git/tree/build-all-archs
--
Alex Bennée
- Re: [Qemu-devel] [PATCH 23/29] async: use ARRAY_SIZE macro, (continued)
- [Qemu-devel] [PATCH 24/29] tests/acpi: use ARRAY_SIZE macro, Philippe Mathieu-Daudé, 2017/07/18
- [Qemu-devel] [PATCH 25/29] libqos: use ARRAY_SIZE macro, Philippe Mathieu-Daudé, 2017/07/18
- [Qemu-devel] [PATCH 26/29] tests/tcg: use ARRAY_SIZE macro, Philippe Mathieu-Daudé, 2017/07/18
- [Qemu-devel] [PATCH 27/29] tests/hbitmap: use ARRAY_SIZE macro, Philippe Mathieu-Daudé, 2017/07/18
- [Qemu-devel] [PATCH 28/29] tests/qapi: use QEMU_IS_ALIGNED macro, Philippe Mathieu-Daudé, 2017/07/18
- [Qemu-devel] [PATCH 29/29] tests/qapi: use ARRAY_SIZE macro, Philippe Mathieu-Daudé, 2017/07/18