From patchwork Fri Dec 9 14:32:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 18324 Received: (qmail 1443 invoked by alias); 9 Dec 2016 14:32:33 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 1390 invoked by uid 89); 9 Dec 2016 14:32:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=20939, H*f:CAH, H*MI:CAH, H*f:sk:3dd7c6f X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 09 Dec 2016 14:32:20 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A67E7C0641E9; Fri, 9 Dec 2016 14:32:19 +0000 (UTC) Received: from [127.0.0.1] (ovpn03.gateway.prod.ext.phx2.redhat.com [10.5.9.3]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uB9EWITR031157; Fri, 9 Dec 2016 09:32:19 -0500 Subject: Re: [PATCH] Add test that exercises all bfd architecture, osabi, endian, etc. combinations To: Yao Qi References: <1457541365-5637-1-git-send-email-palves@redhat.com> <3dd7c6fe-b195-1b6a-4bf4-ffdae0bf7485@redhat.com> Cc: "gdb-patches@sourceware.org" From: Pedro Alves Message-ID: Date: Fri, 9 Dec 2016 14:32:18 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: On 12/09/2016 01:56 PM, Yao Qi wrote: > On Fri, Dec 9, 2016 at 1:11 PM, Pedro Alves wrote: >> (long time passed...) >> >> This test would have caught the rl78 and rx problems that Yao >> fixed today. Clearly I should have pushed it in earlier so we would >> have caught those regressions earlier. :-/ >> The only reason I didn't, was that minute mentioned above. >> I'm playing with splitting this test in 4 files, to bring that down >> in a parallel run. I'll repost with that. >> Below's what I had in mind. Splitting in 4 brings the time down to ~30 seconds for me, while splitting in 8 brings it to ~25 seconds. Looks like we hit diminishing returns, so I left it at 8. I also added kfail/skips for rl78 and rx, otherwise the test crashes GDB... Those can be removed as soon as your patches are in (I hope, I haven't tested whether the archs have further problems that would be exposed by this patch). WDYT? > > Never mind. It is still great to have it, and very appreciate you > write a such great test case! Thanks! > > I'll extend all-architectures.exp to have a test "disassemble 0x0,+4" > for PR 20939. GDB now aborts due to the "foreign frame" again. That seems more dependent on host architecture than target architecture, I think? I.e., cycling over target architectures and disassembling won't really add more coverage? From a71b3ff786ea63df7ad82a02ca59e362a58d6fb6 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Fri, 9 Dec 2016 14:16:40 +0000 Subject: [PATCH] split --- gdb/testsuite/gdb.base/all-architectures-0.exp | 17 +++++++++++ gdb/testsuite/gdb.base/all-architectures-1.exp | 17 +++++++++++ gdb/testsuite/gdb.base/all-architectures-2.exp | 17 +++++++++++ gdb/testsuite/gdb.base/all-architectures-3.exp | 17 +++++++++++ gdb/testsuite/gdb.base/all-architectures-4.exp | 17 +++++++++++ gdb/testsuite/gdb.base/all-architectures-5.exp | 17 +++++++++++ gdb/testsuite/gdb.base/all-architectures-6.exp | 17 +++++++++++ gdb/testsuite/gdb.base/all-architectures-7.exp | 17 +++++++++++ ...-architectures.exp => all-architectures.exp.in} | 34 ++++++++++++++++++++++ 9 files changed, 170 insertions(+) create mode 100644 gdb/testsuite/gdb.base/all-architectures-0.exp create mode 100644 gdb/testsuite/gdb.base/all-architectures-1.exp create mode 100644 gdb/testsuite/gdb.base/all-architectures-2.exp create mode 100644 gdb/testsuite/gdb.base/all-architectures-3.exp create mode 100644 gdb/testsuite/gdb.base/all-architectures-4.exp create mode 100644 gdb/testsuite/gdb.base/all-architectures-5.exp create mode 100644 gdb/testsuite/gdb.base/all-architectures-6.exp create mode 100644 gdb/testsuite/gdb.base/all-architectures-7.exp rename gdb/testsuite/gdb.base/{all-architectures.exp => all-architectures.exp.in} (91%) diff --git a/gdb/testsuite/gdb.base/all-architectures-0.exp b/gdb/testsuite/gdb.base/all-architectures-0.exp new file mode 100644 index 0000000..cd28390 --- /dev/null +++ b/gdb/testsuite/gdb.base/all-architectures-0.exp @@ -0,0 +1,17 @@ +# Copyright 2016 Free Software Foundation, Inc. + +# 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 . */ + +set test_slice 0 +source $srcdir/$subdir/all-architectures.exp.in diff --git a/gdb/testsuite/gdb.base/all-architectures-1.exp b/gdb/testsuite/gdb.base/all-architectures-1.exp new file mode 100644 index 0000000..034fbc4 --- /dev/null +++ b/gdb/testsuite/gdb.base/all-architectures-1.exp @@ -0,0 +1,17 @@ +# Copyright 2016 Free Software Foundation, Inc. + +# 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 . */ + +set test_slice 1 +source $srcdir/$subdir/all-architectures.exp.in diff --git a/gdb/testsuite/gdb.base/all-architectures-2.exp b/gdb/testsuite/gdb.base/all-architectures-2.exp new file mode 100644 index 0000000..142bc74 --- /dev/null +++ b/gdb/testsuite/gdb.base/all-architectures-2.exp @@ -0,0 +1,17 @@ +# Copyright 2016 Free Software Foundation, Inc. + +# 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 . */ + +set test_slice 2 +source $srcdir/$subdir/all-architectures.exp.in diff --git a/gdb/testsuite/gdb.base/all-architectures-3.exp b/gdb/testsuite/gdb.base/all-architectures-3.exp new file mode 100644 index 0000000..02ebf14 --- /dev/null +++ b/gdb/testsuite/gdb.base/all-architectures-3.exp @@ -0,0 +1,17 @@ +# Copyright 2016 Free Software Foundation, Inc. + +# 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 . */ + +set test_slice 3 +source $srcdir/$subdir/all-architectures.exp.in diff --git a/gdb/testsuite/gdb.base/all-architectures-4.exp b/gdb/testsuite/gdb.base/all-architectures-4.exp new file mode 100644 index 0000000..1041869 --- /dev/null +++ b/gdb/testsuite/gdb.base/all-architectures-4.exp @@ -0,0 +1,17 @@ +# Copyright 2016 Free Software Foundation, Inc. + +# 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 . */ + +set test_slice 4 +source $srcdir/$subdir/all-architectures.exp.in diff --git a/gdb/testsuite/gdb.base/all-architectures-5.exp b/gdb/testsuite/gdb.base/all-architectures-5.exp new file mode 100644 index 0000000..9a524d4 --- /dev/null +++ b/gdb/testsuite/gdb.base/all-architectures-5.exp @@ -0,0 +1,17 @@ +# Copyright 2016 Free Software Foundation, Inc. + +# 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 . */ + +set test_slice 5 +source $srcdir/$subdir/all-architectures.exp.in diff --git a/gdb/testsuite/gdb.base/all-architectures-6.exp b/gdb/testsuite/gdb.base/all-architectures-6.exp new file mode 100644 index 0000000..35092e9 --- /dev/null +++ b/gdb/testsuite/gdb.base/all-architectures-6.exp @@ -0,0 +1,17 @@ +# Copyright 2016 Free Software Foundation, Inc. + +# 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 . */ + +set test_slice 6 +source $srcdir/$subdir/all-architectures.exp.in diff --git a/gdb/testsuite/gdb.base/all-architectures-7.exp b/gdb/testsuite/gdb.base/all-architectures-7.exp new file mode 100644 index 0000000..a1702bf --- /dev/null +++ b/gdb/testsuite/gdb.base/all-architectures-7.exp @@ -0,0 +1,17 @@ +# Copyright 2016 Free Software Foundation, Inc. + +# 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 . */ + +set test_slice 7 +source $srcdir/$subdir/all-architectures.exp.in diff --git a/gdb/testsuite/gdb.base/all-architectures.exp b/gdb/testsuite/gdb.base/all-architectures.exp.in similarity index 91% rename from gdb/testsuite/gdb.base/all-architectures.exp rename to gdb/testsuite/gdb.base/all-architectures.exp.in index 9748304..4a8099c 100644 --- a/gdb/testsuite/gdb.base/all-architectures.exp +++ b/gdb/testsuite/gdb.base/all-architectures.exp.in @@ -34,6 +34,11 @@ # This test catches the issue when run against gdb linked with # libmcheck, or run under Valgrind. +# Note: this test is actually split in several driver .exp files, in +# order to be able to parallelize the work. Each driver .exp file +# exercises a different slice of the supported architectures. See +# all-architectures-*.exp and the TEST_SLICE variable. + clean_restart # By default, preparation steps don't output a PASS message. This is @@ -181,13 +186,42 @@ proc gdb_test_no_output_osabi {cmd test} { # of writting, it'd jump from 20s to 4min on x86-64 GNU/Linux with # --enable-targets=all. +set num_slices 8 +set num_archs [llength $supported_archs] +set archs_per_slice [expr (($num_archs + $num_slices - 1) / $num_slices)] + with_test_prefix "tests" { foreach_with_prefix osabi $supported_osabis { gdb_test_no_output_osabi "set osabi $osabi" \ "set osabi" + set arch_count 0 foreach_with_prefix arch $supported_archs { + + incr arch_count + + # Skip architectures outside our slice. + if {$arch_count < [expr $test_slice * $archs_per_slice]} { + continue + } + if {$arch_count >= [expr ($test_slice + 1) * $archs_per_slice]} { + continue + } + + if {$arch == "rl78"} { + if {$want_tests_messages} { + kfail "set architecture rl78" "gdb/20953" + } + continue + } + if {$arch == "rx"} { + if {$want_tests_messages} { + kfail "set architecture rx" "gdb/20954" + } + continue + } + if {$arch == "auto"} { continue }