qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>,
	qemu-devel@nongnu.org, jcmvbkbc@gmail.com
Cc: edgar.iglesias@gmail.com, qemu-arm@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 07/16] tests/tcg/xtensa: enable system tests
Date: Thu, 28 Feb 2019 23:54:02 +0100	[thread overview]
Message-ID: <71a55c0c-3c09-edea-82a5-63fb0cfb4f12@redhat.com> (raw)
In-Reply-To: <20190228202537.4638-8-alex.bennee@linaro.org>

On 2/28/19 9:25 PM, Alex Bennée wrote:
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> 
> ---
> v2
>   - use cross CC for linker
>   - fix up test selection to skip linker.ld.S
> ---
>  tests/tcg/xtensa/Makefile                | 93 ------------------------
>  tests/tcg/xtensa/Makefile.softmmu-target | 40 ++++++++++
>  2 files changed, 40 insertions(+), 93 deletions(-)
>  delete mode 100644 tests/tcg/xtensa/Makefile
>  create mode 100644 tests/tcg/xtensa/Makefile.softmmu-target
> 
> diff --git a/tests/tcg/xtensa/Makefile b/tests/tcg/xtensa/Makefile
> deleted file mode 100644
> index 2f5691f75b..0000000000
> --- a/tests/tcg/xtensa/Makefile
> +++ /dev/null
> @@ -1,93 +0,0 @@
> --include ../../../config-host.mak
> -
> -CORE=dc232b
> -CROSS=xtensa-$(CORE)-elf-
> -
> -ifndef XT
> -SIM = ../../../xtensa-softmmu/qemu-system-xtensa
> -SIMFLAGS = -M sim -cpu $(CORE) -nographic -semihosting -icount 6 $(EXTFLAGS) -kernel
> -SIMDEBUG = -s -S
> -else
> -SIM = xt-run
> -SIMFLAGS = --xtensa-core=DC_B_232L --exit_with_target_code $(EXTFLAGS)
> -SIMDEBUG = --gdbserve=0

Max: I think it should be quite easy to port your simulator to Alex's
new Makefile.
One possibility is adding tests/tcg/xtensa/Makefile.xt-run which set few
variables, include Makefile.softmmu-target and overwrite variables if
necessary.

BTW is this simulator downloadable? I see the Zephyr project also uses
it, and I looked for it on https://ip.cadence.com/swdev but couldnt find
a (public) link.

> -endif
> -
> -HOST_CC = gcc
> -CC      = $(CROSS)gcc
> -AS      = $(CROSS)gcc -x assembler-with-cpp
> -LD      = $(CROSS)ld
> -
> -XTENSA_SRC_PATH = $(SRC_PATH)/tests/tcg/xtensa
> -INCLUDE_DIRS = $(XTENSA_SRC_PATH) $(SRC_PATH)/target/xtensa/core-$(CORE)
> -XTENSA_INC = $(addprefix -I,$(INCLUDE_DIRS))
> -
> -LDFLAGS = -Tlinker.ld
> -
> -CRT        = crt.o vectors.o
> -
> -TESTCASES += test_b.tst
> -TESTCASES += test_bi.tst
> -#TESTCASES += test_boolean.tst
> -TESTCASES += test_break.tst
> -TESTCASES += test_bz.tst
> -TESTCASES += test_cache.tst
> -TESTCASES += test_clamps.tst
> -TESTCASES += test_extui.tst
> -TESTCASES += test_fail.tst
> -TESTCASES += test_interrupt.tst
> -TESTCASES += test_loop.tst
> -TESTCASES += test_mac16.tst
> -TESTCASES += test_max.tst
> -TESTCASES += test_min.tst
> -TESTCASES += test_mmu.tst
> -TESTCASES += test_mul16.tst
> -TESTCASES += test_mul32.tst
> -TESTCASES += test_nsa.tst
> -TESTCASES += test_phys_mem.tst
> -ifdef XT
> -TESTCASES += test_pipeline.tst
> -endif
> -TESTCASES += test_quo.tst
> -TESTCASES += test_rem.tst
> -TESTCASES += test_rst0.tst
> -TESTCASES += test_s32c1i.tst
> -TESTCASES += test_sar.tst
> -TESTCASES += test_sext.tst
> -TESTCASES += test_shift.tst
> -TESTCASES += test_sr.tst
> -TESTCASES += test_timer.tst
> -TESTCASES += test_windowed.tst
> -
> -all: build
> -
> -linker.ld: $(XTENSA_SRC_PATH)/linker.ld.S
> -	$(HOST_CC) $(XTENSA_INC) -E -P $< -o $@
> -
> -%.o: $(XTENSA_SRC_PATH)/%.c
> -	$(CC) $(XTENSA_INC) $(CFLAGS) -c $< -o $@
> -
> -%.o: $(XTENSA_SRC_PATH)/%.S
> -	$(CC) $(XTENSA_INC) $(ASFLAGS) -c $< -o $@
> -
> -%.tst: %.o linker.ld $(XTENSA_SRC_PATH)/macros.inc $(CRT) Makefile
> -	$(LD) $(LDFLAGS) $(NOSTDFLAGS) $(CRT) $< -o $@
> -
> -build: $(TESTCASES)
> -
> -check: $(addprefix run-, $(TESTCASES))
> -
> -run-%.tst: %.tst
> -	$(SIM) $(SIMFLAGS) ./$<
> -
> -run-test_fail.tst: test_fail.tst
> -	! $(SIM) $(SIMFLAGS) ./$<
> -
> -debug-%.tst: %.tst
> -	$(SIM) $(SIMDEBUG) $(SIMFLAGS) ./$<
> -
> -host-debug-%.tst: %.tst
> -	gdb --args $(SIM) $(SIMFLAGS) ./$<
> -
> -clean:
> -	$(RM) -fr $(TESTCASES) $(CRT) linker.ld
> diff --git a/tests/tcg/xtensa/Makefile.softmmu-target b/tests/tcg/xtensa/Makefile.softmmu-target
> new file mode 100644
> index 0000000000..1a4014506f
> --- /dev/null
> +++ b/tests/tcg/xtensa/Makefile.softmmu-target
> @@ -0,0 +1,40 @@
> +#
> +# Xtensa softmmu tests
> +#
> +
> +ifneq ($(TARGET_WORDS_BIGENDIAN),y)
> +
> +XTENSA_SRC = $(SRC_PATH)/tests/tcg/xtensa
> +XTENSA_ALL = $(filter-out $(XTENSA_SRC)/linker.ld.S,$(wildcard $(XTENSA_SRC)/*.S))
> +XTENSA_TESTS = $(patsubst $(XTENSA_SRC)/%.S, %, $(XTENSA_ALL))
> +# Filter out common blobs and broken tests
> +XTENSA_BROKEN_TESTS  = crt vectors test_boolean test_pipeline test_fail
> +XTENSA_USABLE_TESTS = $(filter-out $(XTENSA_BROKEN_TESTS), $(XTENSA_TESTS))
> +
> +# add to the list of tests
> +TESTS += $(XTENSA_USABLE_TESTS)
> +VPATH += $(XTENSA_SRC)
> +
> +CORE=dc232b
> +QEMU_OPTS+=-M sim -cpu $(CORE) -nographic -semihosting -icount 6 $(EXTFLAGS) -kernel
> +
> +INCLUDE_DIRS = $(SRC_PATH)/target/xtensa/core-$(CORE)
> +XTENSA_INC = $(addprefix -I,$(INCLUDE_DIRS))
> +
> +LDFLAGS = -Tlinker.ld -nostartfiles -nostdlib
> +
> +CRT        = crt.o vectors.o
> +
> +linker.ld: linker.ld.S
> +	$(CC) $(XTENSA_INC) -E -P $< -o $@
> +
> +$(XTENSA_USABLE_TESTS): linker.ld macros.inc $(CRT) Makefile.softmmu-target
> +
> +# special rule for common blobs
> +%.o: %.S
> +	$(CC) $(XTENSA_INC) $(ASFLAGS) -c $< -o $@
> +
> +%: %.S
> +	$(CC) $(XTENSA_INC) $(ASFLAGS) $< -o $@ $(LDFLAGS) $(NOSTDFLAGS) $(CRT)
> +
> +endif
> 

  reply	other threads:[~2019-02-28 22:54 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28 20:25 [Qemu-devel] [PATCH v2 00/16] Enabling tcg/tests for cris and system mode xtensa & arm Alex Bennée
2019-02-28 20:25 ` [Qemu-devel] [PATCH v2 01/16] tests/tcg: add softmmu awareness to Makefile Alex Bennée
2019-02-28 20:25 ` [Qemu-devel] [PATCH v2 02/16] tests/tcg: enable tcg tests for softmmu Alex Bennée
2019-02-28 20:25 ` [Qemu-devel] [PATCH v2 03/16] tests/tcg: add QEMU_OPT option for test runner Alex Bennée
2019-02-28 20:25 ` [Qemu-devel] [PATCH v2 04/16] tests/tcg: add gdb runner variant Alex Bennée
2019-02-28 20:25 ` [Qemu-devel] [PATCH v2 05/16] tests/tcg/mips: fix hello-mips compilation Alex Bennée
2019-02-28 22:42   ` Philippe Mathieu-Daudé
2019-03-01  9:31     ` Alex Bennée
2019-02-28 20:25 ` [Qemu-devel] [PATCH v2 06/16] tests/docker: add debian-xtensa-cross image Alex Bennée
2019-02-28 20:25 ` [Qemu-devel] [PATCH v2 07/16] tests/tcg/xtensa: enable system tests Alex Bennée
2019-02-28 22:54   ` Philippe Mathieu-Daudé [this message]
2019-02-28 23:24     ` Max Filippov
2019-02-28 23:28       ` Philippe Mathieu-Daudé
2019-02-28 23:29   ` Max Filippov
2019-03-01  7:30     ` Alex Bennée
2019-02-28 20:25 ` [Qemu-devel] [PATCH v2 08/16] tests/tcg/arm: add ARMv6-M UNDEFINED 32-bit instruction test Alex Bennée
2019-02-28 22:56   ` Philippe Mathieu-Daudé
2019-03-01  7:32     ` Alex Bennée
2019-02-28 20:25 ` [Qemu-devel] [PATCH v2 09/16] tests/docker: add fedora-cris-cross compilers Alex Bennée
2019-02-28 20:25 ` [Qemu-devel] [PATCH v2 10/16] tests/tcg: split cris tests into bare and libc directories Alex Bennée
2019-02-28 23:07   ` Philippe Mathieu-Daudé
2019-02-28 23:21     ` Philippe Mathieu-Daudé
2019-02-28 20:25 ` [Qemu-devel] [PATCH v2 11/16] tests/tcg/cris: cleanup sys.c Alex Bennée
2019-02-28 20:25 ` [Qemu-devel] [PATCH v2 12/16] tests/tcg/cris: comment out the ccs test Alex Bennée
2019-02-28 20:25 ` [Qemu-devel] [PATCH v2 13/16] tests/tcg/cris: align mul operations Alex Bennée
2019-02-28 20:25 ` [Qemu-devel] [PATCH v2 14/16] tests/tcg: enable cris base user-mode tests Alex Bennée
2019-02-28 20:25 ` [Qemu-devel] [PATCH v2 15/16] .travis.yml: separate softfloat from check-tcg Alex Bennée
2019-02-28 20:25 ` [Qemu-devel] [PATCH v2 16/16] .travis.yml: add softmmu check-tcg tests Alex Bennée
2019-02-28 20:46 ` [Qemu-devel] [PATCH v2 00/16] Enabling tcg/tests for cris and system mode xtensa & arm no-reply

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=71a55c0c-3c09-edea-82a5-63fb0cfb4f12@redhat.com \
    --to=philmd@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=edgar.iglesias@gmail.com \
    --cc=jcmvbkbc@gmail.com \
    --cc=qemu-arm@nongnu.org \
    --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).