From nobody Sun Nov 9 23:43:11 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 155241171184344.29939448900336; Tue, 12 Mar 2019 10:28:31 -0700 (PDT) Received: from localhost ([127.0.0.1]:56407 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3lCW-0006Zt-Mu for importer@patchew.org; Tue, 12 Mar 2019 13:28:28 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3l2h-0005Wi-Oh for qemu-devel@nongnu.org; Tue, 12 Mar 2019 13:18:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3kzm-0003tY-ON for qemu-devel@nongnu.org; Tue, 12 Mar 2019 13:15:21 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:38493) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h3kzm-0003ok-Ar for qemu-devel@nongnu.org; Tue, 12 Mar 2019 13:15:18 -0400 Received: by mail-wm1-x342.google.com with SMTP id a188so3440887wmf.3 for ; Tue, 12 Mar 2019 10:15:12 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id g3sm2785015wmk.32.2019.03.12.10.15.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2019 10:15:09 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5DB341FFA5; Tue, 12 Mar 2019 17:09:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TFgvWlZV7wudN7pQg0ACCe0vgpMyhTrD5jIa/sEuDDw=; b=zfc1EiAv96w3fhVsGN2evI1VMUhpmSusdzHp+4JfYpLeBOS1abrlMgzayve/qdyq1d XJVdNV2jFBZEO2h3qgqpj1GnPRUikUueF6MANHprFeO7Q33bYr/v9k4gChVR6xsXSdmP tFF1NnNRRULvDGrKBpdFteWsoh+hnu+OSE/6gLGG6Sj7Eokgg0GSoRQ8gla9SoBoRTFj 2HPjke4c8EZVRDDuTZJWYamhXWiEULlAPN405PCJBLslsUtCrIuaXvPJd78OwI1Ir5js vjlpYY6/koqv4ddY1NphbBMGgfohYdERs2qS+7OIUjA43lBD3jVGJEyBl8MSt1HAF16S v+ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TFgvWlZV7wudN7pQg0ACCe0vgpMyhTrD5jIa/sEuDDw=; b=anPsdAdt4D9Z1RyFmY/nBDPxmVJvxBJ9uksDIsDwLbDc68EsDCJ7PAqKkCIDEcEUAd Y+JWfP6ZebkwyQQ12llSH/Vfl1/fhFCM9/tUgUcibSu8Af+hei1qhejMiCYZkhkkUuH/ imRI+pMKHySLBwka9o/pqy+3DOmFrgHYM+8FukS6HNceHhKmCinykPhObsmGEt5nyU+8 MVMeSlXvOx1Mai13/N795j53eL1n8ibUIjtcuKQpiYZekknzKlMTfWZsYQRW2AIWFO6D wbP6hXqarfxi4TEhPLSA36ktL/64cMJBrXvaYJxC5FOZrkuLnyaGwXsEOWoJK2DxHry1 7S2Q== X-Gm-Message-State: APjAAAW5HfwAeUW/l+DTL8aZtd6g7OJnWa2TrgSapGCYt289s1oetwGt IQ00uHPNhidbCSOoniWcJz+ZWg== X-Google-Smtp-Source: APXvYqxSg3DyTaP1UF3j0gmrj5ngtIin18ZawqMO9C5c0GqWIu3D3p7pVyc3440++D+uW4MqhGLkZg== X-Received: by 2002:a1c:4406:: with SMTP id r6mr3148838wma.114.1552410910916; Tue, 12 Mar 2019 10:15:10 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Tue, 12 Mar 2019 17:09:25 +0000 Message-Id: <20190312170931.25013-21-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190312170931.25013-1-alex.bennee@linaro.org> References: <20190312170931.25013-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::342 Subject: [Qemu-devel] [PULL 20/26] tests/tcg: enable cris base user-mode tests X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This converts the existing Makefile into a Makefile.target and updates it so it can be called by the tcg build system. The original Makefile didn't set -cpu except for the v17 tests however that has broken (I assume because linux-user is a "max" cpu) so here I force it to be crisv17. I've also replicated the GNU simulator targets (run-FOO-on-sim). Signed-off-by: Alex Benn=C3=A9e diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 83d43c50e4..60314d293a 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -116,6 +116,7 @@ docker-image-tricore-cross: docker-image-debian9 DOCKER_PARTIAL_IMAGES +=3D debian-alpha-cross debian-hppa-cross debian-m68= k-cross debian-sh4-cross DOCKER_PARTIAL_IMAGES +=3D debian-sparc64-cross debian-mips64-cross debian= -riscv64-cross DOCKER_PARTIAL_IMAGES +=3D debian-tricore-cross debian-powerpc-cross fedor= a-i386-cross +DOCKER_PARTIAL_IMAGES +=3D fedora-cris-cross =20 # Rules for building linux-user powered images # diff --git a/tests/tcg/cris/Makefile b/tests/tcg/cris/Makefile deleted file mode 100644 index 664b30ce81..0000000000 --- a/tests/tcg/cris/Makefile +++ /dev/null @@ -1,168 +0,0 @@ --include ../../../config-host.mak - -CROSS=3Dcrisv32-axis-linux-gnu- -SIM=3D../../../cris-linux-user/qemu-cris -L ./ -SIMG=3Dcris-axis-linux-gnu-run --sysroot=3D./ - -CC =3D $(CROSS)gcc -#AS =3D $(CROSS)as -AS =3D $(CC) -x assembler-with-cpp -SIZE =3D $(CROSS)size -LD =3D $(CC) -OBJCOPY =3D $(CROSS)objcopy - -# we rely on GCC inline:ing the stuff we tell it to in many places here. -CFLAGS =3D -Winline -Wall -g -O2 -static -NOSTDFLAGS =3D -nostartfiles -nostdlib -ASFLAGS +=3D -g -Wa,-I,$(SRC_PATH)/tests/tcg/cris/ -LDLIBS =3D -NOSTDLIBS =3D -lgcc - -CRT =3D crt.o -SYS =3D sys.o -TESTCASES +=3D check_abs.tst -TESTCASES +=3D check_addc.tst -TESTCASES +=3D check_addcm.tst -TESTCASES +=3D check_addcv17.tst -TESTCASES +=3D check_addo.tst -TESTCASES +=3D check_addoq.tst -TESTCASES +=3D check_addi.tst -TESTCASES +=3D check_addiv32.tst -TESTCASES +=3D check_addm.tst -TESTCASES +=3D check_addr.tst -TESTCASES +=3D check_addq.tst -TESTCASES +=3D check_addxc.tst -TESTCASES +=3D check_addxm.tst -TESTCASES +=3D check_addxr.tst -TESTCASES +=3D check_andc.tst -TESTCASES +=3D check_andm.tst -TESTCASES +=3D check_andr.tst -TESTCASES +=3D check_andq.tst -TESTCASES +=3D check_asr.tst -TESTCASES +=3D check_ba.tst -TESTCASES +=3D check_bas.tst -TESTCASES +=3D check_bcc.tst -TESTCASES +=3D check_bound.tst -TESTCASES +=3D check_boundc.tst -TESTCASES +=3D check_boundr.tst -TESTCASES +=3D check_btst.tst -TESTCASES +=3D check_clearfv32.tst -TESTCASES +=3D check_cmpc.tst -TESTCASES +=3D check_cmpr.tst -TESTCASES +=3D check_cmpq.tst -TESTCASES +=3D check_cmpm.tst -TESTCASES +=3D check_cmpxc.tst -TESTCASES +=3D check_cmpxm.tst -TESTCASES +=3D check_cmp-2.tst -TESTCASES +=3D check_clrjmp1.tst -TESTCASES +=3D check_dstep.tst -TESTCASES +=3D check_ftag.tst -TESTCASES +=3D check_int64.tst -# check_jsr is broken. -#TESTCASES +=3D check_jsr.tst -TESTCASES +=3D check_mcp.tst -TESTCASES +=3D check_movei.tst -TESTCASES +=3D check_mover.tst -TESTCASES +=3D check_moverm.tst -TESTCASES +=3D check_moveq.tst -TESTCASES +=3D check_movemr.tst -TESTCASES +=3D check_movemrv32.tst -TESTCASES +=3D check_movecr.tst -TESTCASES +=3D check_movmp.tst -TESTCASES +=3D check_movpr.tst -TESTCASES +=3D check_movprv32.tst -TESTCASES +=3D check_movdelsr1.tst -TESTCASES +=3D check_movpmv32.tst -TESTCASES +=3D check_movsr.tst -TESTCASES +=3D check_movsm.tst -TESTCASES +=3D check_movscr.tst -TESTCASES +=3D check_movur.tst -TESTCASES +=3D check_movum.tst -TESTCASES +=3D check_movucr.tst -TESTCASES +=3D check_mulx.tst -TESTCASES +=3D check_mulv32.tst -TESTCASES +=3D check_neg.tst -TESTCASES +=3D check_not.tst -TESTCASES +=3D check_lz.tst -TESTCASES +=3D check_lapc.tst -TESTCASES +=3D check_lsl.tst -TESTCASES +=3D check_lsr.tst -TESTCASES +=3D check_orc.tst -TESTCASES +=3D check_orm.tst -TESTCASES +=3D check_orr.tst -TESTCASES +=3D check_orq.tst -TESTCASES +=3D check_ret.tst -TESTCASES +=3D check_swap.tst -TESTCASES +=3D check_scc.tst -TESTCASES +=3D check_subc.tst -TESTCASES +=3D check_subq.tst -TESTCASES +=3D check_subr.tst -TESTCASES +=3D check_subm.tst -TESTCASES +=3D check_glibc_kernelversion.tst -TESTCASES +=3D check_xarith.tst - -TESTCASES +=3D check_hello.ctst -TESTCASES +=3D check_stat1.ctst -TESTCASES +=3D check_stat2.ctst -TESTCASES +=3D check_stat3.ctst -TESTCASES +=3D check_stat4.ctst -TESTCASES +=3D check_openpf1.ctst -TESTCASES +=3D check_openpf2.ctst -TESTCASES +=3D check_openpf3.ctst -TESTCASES +=3D check_openpf5.ctst -TESTCASES +=3D check_mapbrk.ctst -TESTCASES +=3D check_mmap1.ctst -TESTCASES +=3D check_mmap2.ctst -TESTCASES +=3D check_mmap3.ctst -TESTCASES +=3D check_sigalrm.ctst -TESTCASES +=3D check_time2.ctst -TESTCASES +=3D check_settls1.ctst - -TESTCASES +=3D check_gcctorture_pr28634-1.ctst -#TESTCASES +=3D check_gcctorture_pr28634.ctst - -all: build - -%.o: $(SRC_PATH)/tests/tcg/cris/%.c - $(CC) $(CFLAGS) -c $< -o $@ - -%.o: $(SRC_PATH)/tests/tcg/cris/%.s - $(AS) $(ASFLAGS) -c $< -o $@ - -%.tst: %.o - $(CC) $(CFLAGS) $(NOSTDFLAGS) $(LDLIBS) $(NOSTDLIBS) $(CRT) $< $(SYS) -o = $@ - -%.ctst: %.o - $(CC) $(CFLAGS) $(LDLIBS) $< -o $@ - - -sysv10.o: sys.c - $(CC) $(CFLAGS) -mcpu=3Dv10 -c $< -o $@ - -crtv10.o: crt.s - $(AS) $(ASFLAGS) -mcpu=3Dv10 -c $< -o $@ - -check_addcv17.tst: ASFLAGS +=3D -mcpu=3Dv10 -check_addcv17.tst: CRT :=3D crtv10.o -check_addcv17.tst: SYS :=3D sysv10.o -check_addcv17.tst: crtv10.o sysv10.o - -build: $(CRT) $(SYS) $(TESTCASES) - -check: $(CRT) $(SYS) $(TESTCASES) - @printf "\nQEMU simulator.\n" - for case in $(TESTCASES); do \ - printf %s "$$case "; \ - SIMARGS=3D; \ - case $$case in *v17*) SIMARGS=3D"-cpu crisv17";; esac; \ - $(SIM) $$SIMARGS ./$$case; \ - done -check-g: $(CRT) $(SYS) $(TESTCASES) - @printf "\nGDB simulator.\n" - @for case in $(TESTCASES); do \ - printf %s "$$case "; \ - $(SIMG) $$case; \ - done - -clean: - $(RM) -fr $(TESTCASES) *.o diff --git a/tests/tcg/cris/Makefile.include b/tests/tcg/cris/Makefile.incl= ude new file mode 100644 index 0000000000..1c037824bf --- /dev/null +++ b/tests/tcg/cris/Makefile.include @@ -0,0 +1,6 @@ +# +# Makefile.include for all CRIS targets +# + +DOCKER_IMAGE=3Dfedora-cris-cross +DOCKER_CROSS_COMPILER=3Dcris-linux-gnu-gcc diff --git a/tests/tcg/cris/Makefile.target b/tests/tcg/cris/Makefile.target new file mode 100644 index 0000000000..c1173ead42 --- /dev/null +++ b/tests/tcg/cris/Makefile.target @@ -0,0 +1,58 @@ +# -*- Mode: makefile -*- +# +# Cris tests +# +# Currently we can only build the "bare" tests with the docker +# supplied cross-compiler. +# + +CRIS_SRC =3D $(SRC_PATH)/tests/tcg/cris/bare +CRIS_ALL =3D $(wildcard $(CRIS_SRC)/*.s) +CRIS_TESTS =3D $(patsubst $(CRIS_SRC)/%.s, %, $(CRIS_ALL)) +# Filter out common blobs and broken tests +CRIS_BROKEN_TESTS =3D crt check_jsr +# upstream GCC doesn't support v32 +CRIS_BROKEN_TESTS +=3D check_mcp check_mulv32 check_addiv32 check_movpmv32 +CRIS_BROKEN_TESTS +=3D check_movprv32 check_clearfv32 check_movemrv32 chec= k_bas +CRIS_BROKEN_TESTS +=3D check_lapc check_movei +# no sure why +CRIS_BROKEN_TESTS +=3D check_scc check_xarith + +CRIS_USABLE_TESTS =3D $(filter-out $(CRIS_BROKEN_TESTS), $(CRIS_TESTS)) +CRIS_RUNS =3D $(patsubst %, run-%, $(CRIS_USABLE_TESTS)) + +# override the list of tests, as we can't build the multiarch tests +TESTS =3D $(CRIS_USABLE_TESTS) +VPATH =3D $(CRIS_SRC) + +AS =3D $(CC) -x assembler-with-cpp +LD =3D $(CC) + +# we rely on GCC inline:ing the stuff we tell it to in many places here. +CFLAGS =3D -Winline -Wall -g -O2 -static +NOSTDFLAGS =3D -nostartfiles -nostdlib +ASFLAGS +=3D -mcpu=3Dv10 -g -Wa,-I,$(SRC_PATH)/tests/tcg/cris/bare +CRT_FILES =3D crt.o sys.o + +# stop make deleting crt files if build fails +.PRECIOUS: $(CRT_FILES) + +%.o: %.c + $(CC) -c $< -o $@ + +%.o: %.s + $(AS) $(ASFLAGS) -c $< -o $@ + +%: %.s $(CRT_FILES) + $(CC) $(ASFLAGS) $< -o $@ $(LDFLAGS) $(NOSTDFLAGS) $(CRT_FILES) + +# The default CPU breaks (possibly as it's max?) so force crisv17 +$(CRIS_RUNS): QEMU_OPTS=3D-cpu crisv17 + +# Additional runners to run under GNU SIM +CRIS_RUNS_ON_SIM=3D$(patsubst %, %-on-sim, $(CRIS_RUNS)) +SIMG:=3Dcris-axis-linux-gnu-run + +# e.g.: make -f ../../tests/tcg/Makefile run-check_orm-on-sim +run-%-on-sim: + $(call run-test, $<, $(SIMG) $<, "$< on $(TARGET_NAME) with SIM") --=20 2.20.1