qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I add my tcg tests to check-tcg?


From: Alex Bennée
Subject: Re: How do I add my tcg tests to check-tcg?
Date: Wed, 03 Jun 2020 11:25:36 +0100
User-agent: mu4e 1.5.1; emacs 28.0.50

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]