From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id yHvwEYYN9F8wNAAAWB0awg (envelope-from ) for ; Tue, 05 Jan 2021 01:56:06 -0500 Received: by simark.ca (Postfix, from userid 112) id 470631F0AA; Tue, 5 Jan 2021 01:56:06 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id DDCB21E552 for ; Tue, 5 Jan 2021 01:56:01 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1853038A28BF; Tue, 5 Jan 2021 06:56:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1853038A28BF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1609829761; bh=w8EtCJWrYIFnum1LDNuzKH/T/BnoArb2KgjWPrGuCEg=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=otJLk7IpbqhFlwhOrUB+hrQFxmGYdRnzFqFDpvTmJqIuiLpPSZh4WzIUJkdtbYn9m qHUWY+P6TxDhudrcB0P0iZTCTZWkRgpWK1PeOfRsuZiDeyvmwD5vkq4ZOpD6nYuHip pmflfTxR1OPzGPXSe2f6ucivgO9kD1Bp0NOwHFis= Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 5FEEE388701B for ; Tue, 5 Jan 2021 06:55:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5FEEE388701B Received: from vapier.lan (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 732E233BEF1 for ; Tue, 5 Jan 2021 06:55:53 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [PATCH 2/2] sim: m32r: clean up redundant test coverage Date: Tue, 5 Jan 2021 01:55:48 -0500 Message-Id: <20210105065548.9260-2-vapier@gentoo.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210105065548.9260-1-vapier@gentoo.org> References: <20210105065548.9260-1-vapier@gentoo.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" The m32r-elf subdir contained three tests: * exit47: A program to test exit status of 47 from sim. * hello: Standard "hello world" output program. * loop: An infinite loop program. There's already a sim/m32r/hello.ms test that does exactly the same thing as m32r-elf/hello.s, so we can delete that. The loop.s test is never referenced anywhere, and is all of 2 lines. Anyone who really needs a while(1); test case and re-implement it themselves locally. That leaves the single exit47 test. Now that the sim test harness supports testing for custom exit status, we can easily move that to sim/m32r/exit47.ms to maintain test coverage. The remaining differences between m32r-elf & sim/m32r are: * m32r-elf/ runs for m32r-*-elf while sim/m32r/ runs for m32r*-*-*. * m32r-elf/ runs "*.s" files while sim/m32r/ runs "*.ms" files. On closer inspection, these are also meaningless distinctions: * There is nothing specific to the tests that require an *-elf target. Normally that would mean newlib+libgloss type stuff, but there's no such requirement in m32r-elf/. * The ".s" suffix is the standard "this is an assembly file" suffix. Turns out ".ms" is just how sim/m32r/ (and a few other CGEN based targets) categorize/bucket test cases. It simply means "miscellaneous .s" as in "this is an assembly file, and run/bucket its test results in the miscellaneous category". So moving m32r-elf/exit47.s to sim/m32r/exit47.ms makes sense and simplifies things quite a bit for the target while also slightly increasing the coverage for some tuples. --- sim/testsuite/ChangeLog | 6 + sim/testsuite/configure | 5 - sim/testsuite/configure.ac | 3 - sim/testsuite/m32r-elf/ChangeLog | 18 - sim/testsuite/m32r-elf/Makefile.in | 156 - sim/testsuite/m32r-elf/configure | 2984 ----------------- sim/testsuite/m32r-elf/configure.ac | 18 - sim/testsuite/m32r-elf/hello.s | 17 - sim/testsuite/m32r-elf/loop.s | 2 - .../{m32r-elf/exit47.s => sim/m32r/exit47.ms} | 4 + 10 files changed, 10 insertions(+), 3203 deletions(-) delete mode 100644 sim/testsuite/m32r-elf/ChangeLog delete mode 100644 sim/testsuite/m32r-elf/Makefile.in delete mode 100755 sim/testsuite/m32r-elf/configure delete mode 100644 sim/testsuite/m32r-elf/configure.ac delete mode 100644 sim/testsuite/m32r-elf/hello.s delete mode 100644 sim/testsuite/m32r-elf/loop.s rename sim/testsuite/{m32r-elf/exit47.s => sim/m32r/exit47.ms} (66%) diff --git a/sim/testsuite/ChangeLog b/sim/testsuite/ChangeLog index b792e283853b..0f122037fb5c 100644 --- a/sim/testsuite/ChangeLog +++ b/sim/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2021-01-05 Mike Frysinger + + * configure.ac (target): Delete m32r-*-elf case. + * configure: Regenerate. + * m32r-elf/: Delete directory. + 2021-01-04 Mike Frysinger * configure: Regenerate. diff --git a/sim/testsuite/configure b/sim/testsuite/configure index 6f0464dc14a6..c6c0c5cac8b5 100755 --- a/sim/testsuite/configure +++ b/sim/testsuite/configure @@ -647,7 +647,6 @@ host_alias target_alias' ac_subdirs_all='d10v-elf frv-elf -m32r-elf mips64el-elf' # Initialize some variables set by options. @@ -1839,10 +1838,6 @@ subdirs="$subdirs d10v-elf" frv-*-elf ) subdirs="$subdirs frv-elf" - ;; - m32r-*-elf ) - subdirs="$subdirs m32r-elf" - ;; mips64el-*-elf ) subdirs="$subdirs mips64el-elf" diff --git a/sim/testsuite/configure.ac b/sim/testsuite/configure.ac index faaf38dc8879..962c0930d63b 100644 --- a/sim/testsuite/configure.ac +++ b/sim/testsuite/configure.ac @@ -19,9 +19,6 @@ case ${target} in frv-*-elf ) AC_CONFIG_SUBDIRS(frv-elf) ;; - m32r-*-elf ) - AC_CONFIG_SUBDIRS(m32r-elf) - ;; mips64el-*-elf ) AC_CONFIG_SUBDIRS(mips64el-elf) ;; diff --git a/sim/testsuite/m32r-elf/ChangeLog b/sim/testsuite/m32r-elf/ChangeLog deleted file mode 100644 index 78512ec30f54..000000000000 --- a/sim/testsuite/m32r-elf/ChangeLog +++ /dev/null diff --git a/sim/testsuite/m32r-elf/Makefile.in b/sim/testsuite/m32r-elf/Makefile.in deleted file mode 100644 index f6a84ff1113e..000000000000 --- a/sim/testsuite/m32r-elf/Makefile.in +++ /dev/null @@ -1,156 +0,0 @@ -# Makefile for regression testing the m32r simulator. -# Copyright (C) 1998-2021 Free Software Foundation, Inc. - -# This file is part of GDB. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -VPATH = @srcdir@ -srcdir = @srcdir@ -srcroot = $(srcdir)/../../.. - -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -host_alias = @host_alias@ -target_alias = @target_alias@ -program_transform_name = @program_transform_name@ -build_canonical = @build@ -host_canonical = @host@ -target_canonical = @target@ -target_cpu = @target_cpu@ - - -SHELL = @SHELL@ -SUBDIRS = @subdirs@ -RPATH_ENVVAR = @RPATH_ENVVAR@ - -EXPECT = `if [ -f ../../../expect/expect ] ; then \ - echo ../../../expect/expect ; \ - else echo expect ; fi` - -RUNTEST = $(RUNTEST_FOR_TARGET) - -RUNTESTFLAGS = - -RUNTEST_FOR_TARGET = `\ - if [ -f $${srcroot}/dejagnu/runtest ]; then \ - echo $${srcroot}/dejagnu/runtest; \ - else \ - if [ "$(host_canonical)" = "$(target_canonical)" ]; then \ - echo runtest; \ - else \ - t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \ - fi; \ - fi` - - -AS_FOR_TARGET = `\ - if [ -x ../../../gas/as-new ]; then \ - echo ../../../gas/as-new ; \ - else \ - echo $(target_alias)-as ; \ - fi` - -LD_FOR_TARGET = `\ - if [ -x ../../../ld/ld-new ]; then \ - echo ../../../ld/ld-new ; \ - else \ - echo $(target_alias)-ld ; \ - fi` - -RUN_FOR_TARGET = `\ - if [ -x ../../../sim/${target_cpu}/run ]; then \ - echo ../../../sim/${target_cpu}/run ; \ - else \ - echo $(target_alias)-run ; \ - fi` - -TESTS = \ - hello.ok \ - exit47.ko - -check: sanity $(TESTS) -sanity: - @eval echo AS_FOR_TARGET = $(AS_FOR_TARGET) - @eval echo LD_FOR_TARGET = $(LD_FOR_TARGET) - @eval echo RUN_FOR_TARGET = $(RUN_FOR_TARGET) - - - -# Rules for running all the tests, put into three types -# exit success, exit fail, print "Hello World" - -.u.log: - uudecode $*.u - $(RUN_FOR_TARGET) $* > $*.log - - -# Rules for running the tests - -.SUFFIXES: .u .ok .run .hi .ko -.run.ok: - rm -f tmp-$* $*.hi - ulimit -t 5 ; $(RUN_FOR_TARGET) $*.run > tmp-$* - mv tmp-$* $*.ok -.run.hi: - rm -f tmp-$* $*.hi diff-$* - ulimit -t 5 ; $(RUN_FOR_TARGET) $*.run > tmp-$* - echo "Hello World" | diff - tmp-$* > diff-$* - cat tmp-$* diff-$* > $*.hi -.run.ko: - rm -f tmp-$* $*.ko - set +e ; \ - ulimit -t 5 ; $(RUN_FOR_TARGET) $*.run > tmp-$* ; \ - if [ $$? -eq 47 ] ; then \ - exit 0 ; \ - else \ - exit 1 ; \ - fi - mv tmp-$* $*.ko - - -# Rules for building all the tests and packing them into -# uuencoded files. - -uuencode: em-pstr.u em-e0.u em-e47.u em-pchr.u - -.SUFFIXES: .u .s .run -.s.u: - rm -f $*.o $*.run - $(AS_FOR_TARGET) $(srcdir)/$*.s -o $*.o - $(LD_FOR_TARGET) -o $* $*.o - uuencode < $* $* > $*.u - rm -f $*.o $* -.s.run: - rm -f $*.o $*.run - $(AS_FOR_TARGET) $(srcdir)/$*.s -o $*.o - $(LD_FOR_TARGET) -o $*.run $*.o - rm -f $*.o $* - - -clean mostlyclean: - rm -f *~ core *.o a.out - rm -f $(TESTS) - -distclean maintainer-clean realclean: clean - rm -f *~ core - rm -f Makefile config.status *-init.exp - rm -fr *.log summary detail *.plog *.sum *.psum site.* - -Makefile : Makefile.in config.status - $(SHELL) config.status - -config.status: configure - $(SHELL) config.status --recheck diff --git a/sim/testsuite/m32r-elf/configure.ac b/sim/testsuite/m32r-elf/configure.ac deleted file mode 100644 index 278d84d0e825..000000000000 --- a/sim/testsuite/m32r-elf/configure.ac +++ /dev/null @@ -1,18 +0,0 @@ -dnl Process this file file with autoconf to produce a configure script. -dnl This file is a shell script fragment that supplies the information -dnl necessary to tailor a template configure script into the configure -dnl script appropriate for this directory. For more information, check -dnl any existing configure script. - -dnl FIXME - think of a truly uniq file to this directory -AC_INIT(Makefile.in) - -CC=${CC-cc} -AC_SUBST(CC) -AC_CONFIG_AUX_DIR(../../..) -AC_CANONICAL_SYSTEM - -AC_SUBST(target_cpu) - - -AC_OUTPUT(Makefile) diff --git a/sim/testsuite/m32r-elf/hello.s b/sim/testsuite/m32r-elf/hello.s deleted file mode 100644 index a61693462fba..000000000000 --- a/sim/testsuite/m32r-elf/hello.s +++ /dev/null @@ -1,17 +0,0 @@ - - .globl _start -_start: - -; write (hello world) - ldi8 r3,#14 - ld24 r2,#hello - ldi8 r1,#1 - ldi8 r0,#5 - trap #0 -; exit (0) - ldi8 r1,#0 - ldi8 r0,#1 - trap #0 - -length: .long 14 -hello: .ascii "Hello World!\r\n" diff --git a/sim/testsuite/m32r-elf/loop.s b/sim/testsuite/m32r-elf/loop.s deleted file mode 100644 index b24cfb41fddc..000000000000 --- a/sim/testsuite/m32r-elf/loop.s +++ /dev/null @@ -1,2 +0,0 @@ - .globl _start -_start: bra _start diff --git a/sim/testsuite/m32r-elf/exit47.s b/sim/testsuite/sim/m32r/exit47.ms similarity index 66% rename from sim/testsuite/m32r-elf/exit47.s rename to sim/testsuite/sim/m32r/exit47.ms index ab814e3ab9a4..20074f6e7b2c 100644 --- a/sim/testsuite/m32r-elf/exit47.s +++ b/sim/testsuite/sim/m32r/exit47.ms @@ -1,3 +1,7 @@ +# mach(): m32r m32rx +# status: 47 +# output: + ;; Return with exit code 47. .globl _start -- 2.28.0