From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38051 invoked by alias); 25 Feb 2015 15:50:12 -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 37944 invoked by uid 89); 25 Feb 2015 15:50:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-pd0-f174.google.com Received: from mail-pd0-f174.google.com (HELO mail-pd0-f174.google.com) (209.85.192.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 25 Feb 2015 15:50:09 +0000 Received: by pdbfl12 with SMTP id fl12so5737304pdb.2; Wed, 25 Feb 2015 07:50:07 -0800 (PST) X-Received: by 10.68.221.34 with SMTP id qb2mr6384019pbc.47.1424879407593; Wed, 25 Feb 2015 07:50:07 -0800 (PST) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id zs8sm42826096pac.9.2015.02.25.07.50.04 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 25 Feb 2015 07:50:06 -0800 (PST) From: Yao Qi To: Andy Wingo Cc: gdb-patches@sourceware.org, jan.kratochvil@redhat.com, sanjoyd@sourceware.org Subject: Re: Missing test cases for jit-reader interface References: <87oaolx6xy.fsf@igalia.com> <87k2z8ydq4.fsf@igalia.com> Date: Wed, 25 Feb 2015 15:50:00 -0000 In-Reply-To: <87k2z8ydq4.fsf@igalia.com> (Andy Wingo's message of "Mon, 23 Feb 2015 14:11:31 +0100") Message-ID: <86y4nmvvme.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-02/txt/msg00717.txt.bz2 Andy Wingo writes: > I think it was Sanjoy who forgot to commit these. Anyway, here is an > updated version of the same patch, which passes tests for me. WDYT? > Yes, we should add them back since they were reviewed and approved. > --- /dev/null > +++ b/gdb/testsuite/gdb.base/jit-protocol.h > @@ -0,0 +1,54 @@ > +/* Copyright (C) 2009-2013 Free Software Foundation, Inc. It should be 2009-2013. > diff --git a/gdb/testsuite/gdb.base/jit-reader.exp b/gdb/testsuite/gdb.ba= se/jit-reader.exp > new file mode 100644 > index 0000000..6080564 > --- /dev/null > +++ b/gdb/testsuite/gdb.base/jit-reader.exp > @@ -0,0 +1,80 @@ > +# Copyright 2012 Free Software Foundation, Inc. Likewise. > + > +# 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 . > + > +standard_testfile jithost.c > + > +if { (![istarget x86_64-*-*] && ![istarget i?86-*-*]) || ![is_lp64_targe= t] } { > + return -1; > +} I don't see any reason why this test is arch specific. We can remove such checking, IMO. > + > +if {[skip_shlib_tests]} { > + return -1 > +} > + > +if { ![isnative] } { > + return -1 > +} and remove it too. > + > +if {[get_compiler_info]} { > + untested "could not get compiler info" > + return 1 > +} > + > +set jit_host_src ${srcfile} > +set jit_host_bin ${binfile} > + > +# We inject the complete path to jit-reader.h into the source file > +# lest we end up (incorrectly) building against a system-installed > +# version. > +set jit_reader_header [standard_output_file "../../../gdb/jit-reader.h"] > +set jit_reader_flag "-DJIT_READER_H=3D\"$jit_reader_header\"" > + > +if { [gdb_compile "${srcdir}/${subdir}/${jit_host_src}" "${jit_host_bin= }" \ > + executable [list debug additional_flags=3D$jit_reader_flag]] != =3D "" } { > + untested jit-reader.exp > + return -1 > +} > + > +set jit_reader jitreader > +set jit_reader_src ${jit_reader}.c > +set jit_reader_bin [standard_output_file ${jit_reader}.so] > + > +if { [gdb_compile_shlib "${srcdir}/${subdir}/${jit_reader_src}" "${jit_r= eader_bin}" \ > + [list debug additional_flags=3D$jit_reader_flag]] !=3D "" } { > + untested jit-reader.exp > + return -1 > +} > + > +gdb_load_shlibs "${jit_reader_bin}" > + It should be moved into jit_reader_test, after clean_restart, otherwise, we'll get the following errors if I run it with --target_board=3Dnative-gdb= server. ERROR: tcl error sourcing /home/yao/SourceCode/gnu/gdb/git/gdb/testsuite/gd= b.base/jit-reader.exp. ERROR: can't read "use_gdb_stub": no such variable while executing "if {$use_gdb_stub && [regexp -nocase {^\s*(r|run|star|start|at|att|atta|attac|attach)\M} $c= ommand]} { error "gdbserver does not support $command wi..." (procedure "gdb_test_multiple" line 21) invoked from within "gdb_test_multiple $command $message { -re "\[\r\n\]*($pattern)\[\r\n\]+$gdb_prompt $" { if ![string match "" $message] then { pass "$message" ..." (procedure "gdb_test" line 22) invoked from within --=20 Yao (=E9=BD=90=E5=B0=A7)