From patchwork Tue Sep 27 17:46:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kratochvil X-Patchwork-Id: 16079 Received: (qmail 100838 invoked by alias); 27 Sep 2016 17:46:19 -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 100821 invoked by uid 89); 27 Sep 2016 17:46:18 -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=deficiency, mar, Hx-languages-length:2504 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; Tue, 27 Sep 2016 17:46:16 +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 83F392F02DF; Tue, 27 Sep 2016 17:46:15 +0000 (UTC) Received: from host1.jankratochvil.net (ovpn-116-55.ams2.redhat.com [10.36.116.55]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8RHkBrO021344 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 27 Sep 2016 13:46:14 -0400 Date: Tue, 27 Sep 2016 19:46:11 +0200 From: Jan Kratochvil To: Pedro Alves Cc: gdb-patches@sourceware.org, Yichao Yu Subject: [testsuite bugreport] gdb.base/jit.exp has false PASSes, probably [Re: [PATCH 2/3] Make gdb.base/jit.exp binaries unique] Message-ID: <20160927174611.GA1325@host1.jankratochvil.net> References: <1458739792-9864-1-git-send-email-palves@redhat.com> <1458739792-9864-3-git-send-email-palves@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1458739792-9864-3-git-send-email-palves@redhat.com> User-Agent: Mutt/1.7.0 (2016-08-17) X-IsSubscribed: yes On Wed, 23 Mar 2016 14:29:51 +0100, Pedro Alves wrote: > This testcase compiles the same program and library differently > multiple times using the same file names. Make them unique, to make > it easier to debug test problems. > > gdb/testsuite/ChangeLog: > 2016-03-23 Pedro Alves > > PR gdb/19858 > * gdb.base/jit.exp (compile_jit_test): Add intro comment. Add > BINSUFFIX parameter, and handle it. > (top level): Adjust calls compile_jit_test. commit 40dea8cbf6b40f159bdfab4f3d8ec9010c293e84 Author: Pedro Alves Date: Thu Mar 31 19:28:47 2016 +0100 Make gdb.base/jit.exp binaries unique Message-Id: <1458739792-9864-3-git-send-email-palves@redhat.com> This change is wrong as it sets variable $binfile to the new filename but the variable $binfile is never used. Therefore the testcase still uses the unsuffixed binary even for testcases where a suffixed binary should be used. The proper fix - to use the new $binfile value - is OK for this commit (it has no effect on the testfile results). But the later patch commit 64cdf930d9ed85e93ae55adbc20b0f9848ef863b Author: Pedro Alves Date: Thu Mar 31 19:28:47 2016 +0100 Add regression test for PR gdb/19858 (JIT code registration on attach) depends on this testfile deficiency and so with the proper use of suffixed $binfile it starts to FAIL. Jan diff --git a/gdb/testsuite/gdb.base/jit.exp b/gdb/testsuite/gdb.base/jit.exp index 3e12301..568fb50 100644 --- a/gdb/testsuite/gdb.base/jit.exp +++ b/gdb/testsuite/gdb.base/jit.exp @@ -42,6 +42,7 @@ proc compile_jit_test {testname binsuffix options} { untested $testname return -1 } + set binfile foo${binfile}bar set solib_testfile "jit-solib" set solib_srcfile "${srcdir}/${subdir}/${solib_testfile}.c" diff --git a/gdb/testsuite/gdb.base/jit.exp b/gdb/testsuite/gdb.base/jit.exp index 3e12301..d2c4605 100644 --- a/gdb/testsuite/gdb.base/jit.exp +++ b/gdb/testsuite/gdb.base/jit.exp @@ -68,9 +68,9 @@ proc compile_jit_test {testname binsuffix options} { proc one_jit_test {count match_str} { with_test_prefix "one_jit_test-$count" { - global verbose testfile solib_binfile_target solib_binfile_test_msg + global verbose binfile solib_binfile_target solib_binfile_test_msg - clean_restart $testfile + clean_restart [file tail $binfile] # This is just to help debugging when things fail if {$verbose > 0} {