From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127225 invoked by alias); 10 Apr 2015 08:06:51 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 127209 invoked by uid 89); 10 Apr 2015 08:06:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f46.google.com Received: from mail-pa0-f46.google.com (HELO mail-pa0-f46.google.com) (209.85.220.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 10 Apr 2015 08:06:50 +0000 Received: by paboj16 with SMTP id oj16so14566134pab.0 for ; Fri, 10 Apr 2015 01:06:48 -0700 (PDT) X-Received: by 10.70.136.106 with SMTP id pz10mr582385pdb.105.1428653208376; Fri, 10 Apr 2015 01:06:48 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id hv7sm1328853pdb.86.2015.04.10.01.06.46 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 10 Apr 2015 01:06:47 -0700 (PDT) From: Yao Qi To: "Gustavo\, Luis" Cc: "'gdb-patches\@sourceware.org'" Subject: Re: [PATCH] Harden gdb.base/coredump-filter.exp References: <5526D4A1.9090203@mentor.com> Date: Fri, 10 Apr 2015 08:06:00 -0000 In-Reply-To: <5526D4A1.9090203@mentor.com> (Luis Gustavo's message of "Thu, 9 Apr 2015 16:36:01 -0300") Message-ID: <86pp7cv23w.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00357.txt.bz2 Luis Gustavo writes: > diff --git a/gdb/testsuite/gdb.base/coredump-filter.exp b/gdb/testsuite/g= db.base/coredump-filter.exp > index f3203be..4c6c6ed 100644 > --- a/gdb/testsuite/gdb.base/coredump-filter.exp > +++ b/gdb/testsuite/gdb.base/coredump-filter.exp > @@ -15,6 +15,12 @@ >=20=20 > standard_testfile >=20=20 > +# This test is Linux-only. > +if ![istarget *-*-linux*] then { > + unsupported "coredump-filter.exp" > + return -1 > +} > + > if { [prepare_for_testing "failed to prepare" $testfile $srcfile debug] = } { > untested "could not compile test program" > return -1 > @@ -146,6 +152,11 @@ gdb_test_multiple "info inferiors" "getting inferior= pid" { > -re "process \($decimal\).*\r\n$gdb_prompt $" { > set infpid $expect_out(1,string) > } > + -re "Remote target.*$gdb_prompt $" { > + # If the target does not provide PID information (like QEMU), just bail FAOD, QEMU here is QEMU user mode, isn't? > + # out as the rest of the test may rely on it, giving spurious failures. > + return -1 > + } > } We can just bail out if infpid is still "" after this gdb_test_multiple. --=20 Yao (=E9=BD=90=E5=B0=A7)