From: "Alex Bennée" <alex.bennee@linaro.org>
To: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Cc: qemu-devel@nongnu.org
Subject: Re: How do I add my tcg tests to check-tcg?
Date: Wed, 03 Jun 2020 11:25:36 +0100 [thread overview]
Message-ID: <87v9k85tun.fsf@linaro.org> (raw)
In-Reply-To: <20200603095137.lt6dafpqpa4jzx2n@schnipp-desktop>
Bastian Koppelmann <kbastian@mail.uni-paderborn.de> writes:
> Hi Alex,
>
> I have some time again to integrate my tcg tests patch for TriCore [1]. However,
> I'm struggeling a bit to get through the details of the Makefiles. I'm assuming
> the right rule to run is 'make check-tcg'. I tried running that for
> xtensa-softmmu, arm-softmmu, and aarch64-softmmu, but they are always skipped.
> Digging into the Makefiles I found that there is some way to use the dockerfiles
> to run the test. Can someone elighten me on how to properly use this?
The configure script in tests/tcg/configure.sh will probe for available
cross compilers (or take a passed in one). Failing that you can fall
back to a docker image which has the compilers included.
The result should end up in:
$(BUILD_DIR)/tests/tcg/config-$(PROBE_TARGET).mak
Assuming you have a CROSS_CC_GUEST or DOCKER_IMAGE and
DOCKER_CROSS_CC_GUEST defined there the makefiles should allow building
of the tests.
For linux-user we include the tests/tcg/multiarch/Makefile.target as
well as the target specific one. The CC variable should already be setup
to build either via docker or using the installed setup.
We don't have a linker or assembler in the tooling so everything is
invoked via the compiler with the appropriate flags to call the
sub-tools if required. Most rules are single file compile and link.
For softmmu tests things are a bit more bespoke. The tooling will make
sure things are setup and then include
tests/tcg/multiarch/system/Makefile.softmmu-target and
tests/tcg/$ARCH/Makefile.softmmu-target. The main purpose of the arch
specific Makefile is to provide the appropriate build instructions to
build a system image for the multiarch tests and any target specific
tests.
To support the multiarch tests you need a boot.S and a kernel.ld that
defines a simple boot and a __sys_outc helper function. There is a
minilib which provides for a basic printf like output. The boot should
call main and then return the int code via some mechanism to signal the
pass/fail of the test. For aarch64 this is done with semihosting.
Please let me know if you have any more questions.
>
> Thanks and cheers,
> Bastian
>
> [1] https://lists.nongnu.org/archive/html/qemu-devel/2018-05/msg00074.html
--
Alex Bennée
next prev parent reply other threads:[~2020-06-03 10:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-03 9:51 How do I add my tcg tests to check-tcg? Bastian Koppelmann
2020-06-03 10:25 ` Alex Bennée [this message]
2020-06-04 9:05 ` Bastian Koppelmann
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=87v9k85tun.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=kbastian@mail.uni-paderborn.de \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).