From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 968AE386F824 for ; Tue, 12 May 2020 13:00:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 968AE386F824 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 5F694AC51; Tue, 12 May 2020 13:00:08 +0000 (UTC) Date: Tue, 12 May 2020 15:00:03 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix incorrect string concat in jit-elf.exp Message-ID: <20200512130002.GA3290@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-19.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Tue, 12 May 2020 13:00:11 -0000 Hi, When running test-case gdb.base/jit-elf.exp with target board cc-with-gdb-index, we get: ... spawn -ignore SIGHUP gdb/contrib/cc-with-tweaks.sh -i gcc \ -fno-stack-protector src/gdb/testsuite/gdb.base/jit-elf-main.c \ -fdiagnostics-color=never -DATTACH=1 -DLOAD_ADDRESS=0x7000000 \ -DLOAD_INCREMENT=0x1000000 -g -lm \ -o outputs/gdb.base/jit-elf/jit-elf-main"-attach"^M outputs/gdb.base/jit-elf/.tmp/jit-elf-main-attach: \ No such file or directory.^M output is: outputs/gdb.base/jit-elf/.tmp/jit-elf-main-attach: \ No such file or directory.^M gdb compile failed, outputs/gdb.base/jit-elf/.tmp/jit-elf-main-attach: \ No such file or directory. UNTESTED: gdb.base/jit-elf.exp: failed to compile jit-elf-main"-attach" ... The problem is a string concat in jit-elf.exp: ... ${main_binfile}"-attach" ... which is intended to generate string 'jit-elf-main-attach' but instead generates string 'jit-elf-main"-attach"'. Fix this by using "${main_binfile}-attach" instead. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix incorrect string concat in jit-elf.exp gdb/testsuite/ChangeLog: 2020-05-12 Tom de Vries * gdb.base/jit-elf.exp: Fix string concat. --- gdb/testsuite/gdb.base/jit-elf.exp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.base/jit-elf.exp b/gdb/testsuite/gdb.base/jit-elf.exp index 68196a0a88..78a19c2c9a 100644 --- a/gdb/testsuite/gdb.base/jit-elf.exp +++ b/gdb/testsuite/gdb.base/jit-elf.exp @@ -147,7 +147,7 @@ if { [compile_jit_main ${main_srcfile} ${main_binfile} {}] == 0 } { # registered. We reuse the normal test, and detach/reattach at # specific interesting points. if {[can_spawn_for_attach]} { - if { [compile_jit_main ${main_srcfile} ${main_binfile}"-attach" \ + if { [compile_jit_main ${main_srcfile} "${main_binfile}-attach" \ {additional_flags=-DATTACH=1}] == 0 } { with_test_prefix attach { one_jit_test $jit_solibs_target "${hex} jit_function_0001\[\r\n\]+${hex} jit_function_0002" 1 @@ -155,7 +155,8 @@ if {[can_spawn_for_attach]} { } } -if { [compile_jit_main ${main_srcfile} ${main_binfile}"-pie" {additional_flags=-fPIE ldflags=-pie}] == 0 } { +if { [compile_jit_main ${main_srcfile} "${main_binfile}-pie" \ + {additional_flags=-fPIE ldflags=-pie}] == 0 } { with_test_prefix PIE { one_jit_test [lindex $jit_solibs_target 0] "${hex} jit_function_0001" 0 }