All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"qemu trival" <qemu-trivial@nongnu.org>,
	QEMU <qemu-devel@nongnu.org>,
	"Richard Henderson" <rth@twiddle.net>
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH 26/29] tests/tcg: use ARRAY_SIZE macro
Date: Tue, 18 Jul 2017 14:52:16 +0100	[thread overview]
Message-ID: <878tjl97jj.fsf@linaro.org> (raw)
In-Reply-To: <CAJ+F1CLXojLp2VxET469gBLsaSwCvkQoGODOMyFUs3jUbkdk3A@mail.gmail.com>


Marc-André Lureau <marcandre.lureau@gmail.com> writes:

> Hi
>
> On Tue, Jul 18, 2017 at 4:16 AM, Alex Bennée <alex.bennee@linaro.org> wrote:
>>
>> Marc-André Lureau <marcandre.lureau@gmail.com> writes:
>>
>>> Hi
>>>
>>> On Mon, Jul 17, 2017 at 11:10 PM, Philippe Mathieu-Daudé
>>> <f4bug@amsat.org> wrote:
>>>> Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci
>>>>
>>>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>>> ---
>>>>  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: <20161201051433.17168-1-bobby.prani@gmail.com>
>>
>> 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


WARNING: multiple messages have this Message-ID (diff)
From: "Alex Bennée" <alex.bennee@linaro.org>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"qemu trival" <qemu-trivial@nongnu.org>,
	QEMU <qemu-devel@nongnu.org>,
	"Richard Henderson" <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH 26/29] tests/tcg: use ARRAY_SIZE macro
Date: Tue, 18 Jul 2017 14:52:16 +0100	[thread overview]
Message-ID: <878tjl97jj.fsf@linaro.org> (raw)
In-Reply-To: <CAJ+F1CLXojLp2VxET469gBLsaSwCvkQoGODOMyFUs3jUbkdk3A@mail.gmail.com>


Marc-André Lureau <marcandre.lureau@gmail.com> writes:

> Hi
>
> On Tue, Jul 18, 2017 at 4:16 AM, Alex Bennée <alex.bennee@linaro.org> wrote:
>>
>> Marc-André Lureau <marcandre.lureau@gmail.com> writes:
>>
>>> Hi
>>>
>>> On Mon, Jul 17, 2017 at 11:10 PM, Philippe Mathieu-Daudé
>>> <f4bug@amsat.org> wrote:
>>>> Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci
>>>>
>>>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>>> ---
>>>>  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: <20161201051433.17168-1-bobby.prani@gmail.com>
>>
>> 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

  reply	other threads:[~2017-07-18 13:52 UTC|newest]

Thread overview: 139+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-18  6:09 [Qemu-trivial] [PATCH 00/29] coccinelle script to enforce qemu/osdep.h macros usage Philippe Mathieu-Daudé
2017-07-18  6:09 ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18  6:09 ` [Qemu-trivial] [PATCH 01/29] coccinelle: add a " Philippe Mathieu-Daudé
2017-07-18  6:09   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18 15:18   ` [Qemu-trivial] " Eric Blake
2017-07-18 15:18     ` [Qemu-devel] " Eric Blake
2017-07-18  6:09 ` [Qemu-trivial] [PATCH 02/29] pci: remove superfluous parenthesis Philippe Mathieu-Daudé
2017-07-18  6:09   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-19  0:16   ` [Qemu-trivial] " Richard Henderson
2017-07-19  0:16     ` Richard Henderson
2017-07-18  6:09 ` [Qemu-trivial] [PATCH 03/29] qemu-img: use QEMU_IS_ALIGNED macro Philippe Mathieu-Daudé
2017-07-18  6:09   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18 15:19   ` [Qemu-trivial] " Eric Blake
2017-07-18 15:19     ` [Qemu-devel] " Eric Blake
2017-07-18  6:09 ` [Qemu-trivial] [PATCH 04/29] scsi-disk: " Philippe Mathieu-Daudé
2017-07-18  6:09   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18  6:09 ` [Qemu-trivial] [PATCH 05/29] block: " Philippe Mathieu-Daudé
2017-07-18  6:09   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18  9:59   ` [Qemu-trivial] " Juan Quintela
2017-07-18  9:59     ` [Qemu-devel] " Juan Quintela
2017-07-18 15:25   ` [Qemu-trivial] " Eric Blake
2017-07-18 15:25     ` [Qemu-devel] " Eric Blake
2017-07-18  6:09 ` [Qemu-trivial] [PATCH 06/29] migration/block: " Philippe Mathieu-Daudé
2017-07-18  6:09   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18  9:58   ` [Qemu-trivial] " Juan Quintela
2017-07-18  9:58     ` [Qemu-devel] " Juan Quintela
2017-07-18 11:19     ` [Qemu-trivial] " Alex Bennée
2017-07-18 11:19       ` Alex Bennée
2017-07-18  6:09 ` [Qemu-trivial] [PATCH 07/29] ds1338: " Philippe Mathieu-Daudé
2017-07-18  6:09   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18 10:23   ` [Qemu-trivial] " Alastair D'Silva
2017-07-18 10:23     ` [Qemu-devel] " Alastair D'Silva
2017-07-18 13:23     ` [Qemu-trivial] " Philippe Mathieu-Daudé
2017-07-18 13:23       ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18  6:09 ` [Qemu-trivial] [PATCH 08/29] ui: " Philippe Mathieu-Daudé
2017-07-18  6:09   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18  6:09 ` [Qemu-trivial] [PATCH 09/29] net: " Philippe Mathieu-Daudé
2017-07-18  6:09   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18 17:51   ` [Qemu-trivial] " Eric Blake
2017-07-18 17:51     ` [Qemu-devel] " Eric Blake
2017-07-18  6:09 ` [Qemu-trivial] [PATCH 10/29] net/rocker: " Philippe Mathieu-Daudé
2017-07-18  6:09   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18 17:51   ` [Qemu-trivial] " Eric Blake
2017-07-18 17:51     ` [Qemu-devel] " Eric Blake
2017-07-21 16:23     ` [Qemu-trivial] " Philippe Mathieu-Daudé
2017-07-21 16:23       ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18  6:09 ` [Qemu-trivial] [PATCH 11/29] s390x/sclp: " Philippe Mathieu-Daudé
2017-07-18  6:09   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18  9:58   ` [Qemu-trivial] " Cornelia Huck
2017-07-18  9:58     ` [Qemu-devel] " Cornelia Huck
2017-07-18 10:03     ` [Qemu-trivial] " Cornelia Huck
2017-07-18 10:03       ` [Qemu-devel] " Cornelia Huck
2017-07-18  6:09 ` [Qemu-trivial] [PATCH 12/29] sm501: " Philippe Mathieu-Daudé
2017-07-18  6:09   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18  6:09 ` [Qemu-trivial] [PATCH 13/29] tcg: " Philippe Mathieu-Daudé
2017-07-18  6:09   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18  6:09 ` [Qemu-trivial] [PATCH 14/29] cris: " Philippe Mathieu-Daudé
2017-07-18  6:09   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18  6:09 ` [Qemu-devel] [PATCH 15/29] microblaze: " Philippe Mathieu-Daudé
2017-07-18 11:08   ` [Qemu-trivial] " Marc-André Lureau
2017-07-18 11:08     ` Marc-André Lureau
2017-07-18 14:46     ` [Qemu-trivial] " Thomas Huth
2017-07-18 14:46       ` Thomas Huth
2017-07-18  6:09 ` [Qemu-trivial] [PATCH 16/29] lm32: " Philippe Mathieu-Daudé
2017-07-18  6:09   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18 11:42   ` [Qemu-trivial] " Michael Walle
2017-07-18 11:42     ` [Qemu-devel] " Michael Walle
2017-07-18 14:37     ` [Qemu-trivial] " Thomas Huth
2017-07-18 14:37       ` Thomas Huth
2017-07-21 16:29       ` [Qemu-trivial] " Philippe Mathieu-Daudé
2017-07-21 16:29         ` Philippe Mathieu-Daudé
2017-07-18  6:09 ` [Qemu-trivial] [PATCH 18/29] nios2: " Philippe Mathieu-Daudé
2017-07-18  6:09   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18  6:09 ` [Qemu-trivial] [PATCH 19/29] disas: " Philippe Mathieu-Daudé
2017-07-18  6:09   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18 11:07   ` [Qemu-trivial] " Marc-André Lureau
2017-07-18 11:07     ` Marc-André Lureau
2017-07-18 14:43     ` [Qemu-trivial] " Thomas Huth
2017-07-18 14:43       ` Thomas Huth
2017-07-23 14:52       ` [Qemu-trivial] " Paolo Bonzini
2017-07-23 14:52         ` Paolo Bonzini
2017-07-24 12:16         ` [Qemu-trivial] " Eric Blake
2017-07-24 12:16           ` Eric Blake
2017-07-18 11:09   ` [Qemu-trivial] " Michael Tokarev
2017-07-18 11:09     ` [Qemu-devel] " Michael Tokarev
2017-07-18  6:09 ` [Qemu-trivial] [PATCH 20/29] disas: use ARRAY_SIZE macro Philippe Mathieu-Daudé
2017-07-18  6:09   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18  6:49   ` [Qemu-trivial] " David Gibson
2017-07-18  6:49     ` [Qemu-devel] " David Gibson
2017-07-18 10:55   ` [Qemu-trivial] " Marc-André Lureau
2017-07-18 10:55     ` Marc-André Lureau
2017-07-18  6:09 ` [Qemu-trivial] [PATCH 21/29] qga: " Philippe Mathieu-Daudé
2017-07-18  6:09   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18 11:29   ` [Qemu-trivial] " Marc-André Lureau
2017-07-18 11:29     ` Marc-André Lureau
2017-07-18  6:09 ` [Qemu-trivial] [PATCH 22/29] vmsvga: " Philippe Mathieu-Daudé
2017-07-18  6:09   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18 11:28   ` [Qemu-trivial] " Marc-André Lureau
2017-07-18 11:28     ` Marc-André Lureau
2017-07-18  6:09 ` [Qemu-trivial] [PATCH 23/29] async: " Philippe Mathieu-Daudé
2017-07-18  6:09   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18 10:54   ` [Qemu-trivial] " Marc-André Lureau
2017-07-18 10:54     ` Marc-André Lureau
2017-07-18  6:10 ` [Qemu-trivial] [PATCH 24/29] tests/acpi: " Philippe Mathieu-Daudé
2017-07-18  6:10   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18  6:10 ` [Qemu-trivial] [PATCH 25/29] libqos: " Philippe Mathieu-Daudé
2017-07-18  6:10   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18 11:00   ` [Qemu-trivial] " Marc-André Lureau
2017-07-18 11:00     ` Marc-André Lureau
2017-07-18 11:58   ` [Qemu-trivial] " Laurent Vivier
2017-07-18 11:58     ` [Qemu-devel] " Laurent Vivier
2017-07-18 13:36     ` [Qemu-trivial] " Philippe Mathieu-Daudé
2017-07-18 13:36       ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18  6:10 ` [Qemu-trivial] [PATCH 26/29] tests/tcg: " Philippe Mathieu-Daudé
2017-07-18  6:10   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18 10:56   ` [Qemu-trivial] " Marc-André Lureau
2017-07-18 10:56     ` Marc-André Lureau
2017-07-18 11:16     ` [Qemu-trivial] " Alex Bennée
2017-07-18 11:16       ` Alex Bennée
2017-07-18 11:24       ` [Qemu-trivial] " Marc-André Lureau
2017-07-18 11:24         ` Marc-André Lureau
2017-07-18 13:52         ` Alex Bennée [this message]
2017-07-18 13:52           ` Alex Bennée
2017-07-18 13:41       ` [Qemu-trivial] " Philippe Mathieu-Daudé
2017-07-18 13:41         ` Philippe Mathieu-Daudé
2017-07-18  6:10 ` [Qemu-trivial] [PATCH 27/29] tests/hbitmap: " Philippe Mathieu-Daudé
2017-07-18  6:10   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18 10:52   ` [Qemu-trivial] " Marc-André Lureau
2017-07-18 10:52     ` Marc-André Lureau
2017-07-18 15:36   ` [Qemu-trivial] " John Snow
2017-07-18 15:36     ` John Snow
2017-07-18  6:10 ` [Qemu-trivial] [PATCH 28/29] tests/qapi: use QEMU_IS_ALIGNED macro Philippe Mathieu-Daudé
2017-07-18  6:10   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18 10:53   ` [Qemu-trivial] " Marc-André Lureau
2017-07-18 10:53     ` Marc-André Lureau
2017-07-18  6:10 ` [Qemu-trivial] [PATCH 29/29] tests/qapi: use ARRAY_SIZE macro Philippe Mathieu-Daudé
2017-07-18  6:10   ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-07-18 10:52   ` [Qemu-trivial] " Marc-André Lureau
2017-07-18 10:52     ` Marc-André Lureau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878tjl97jj.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=f4bug@amsat.org \
    --cc=marcandre.lureau@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.