From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19927 invoked by alias); 3 Jun 2012 17:17:20 -0000 Received: (qmail 19918 invoked by uid 22791); 3 Jun 2012 17:17:20 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 03 Jun 2012 17:17:07 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q53HH642031705 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 3 Jun 2012 13:17:07 -0400 Received: from host2.jankratochvil.net (ovpn-116-47.ams2.redhat.com [10.36.116.47]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q53HH1FT006133 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Sun, 3 Jun 2012 13:17:03 -0400 Date: Sun, 03 Jun 2012 17:17:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [commit 2/2] testsuite: code_elim.exp: Fix false FAIL Message-ID: <20120603171700.GB20314@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 X-SW-Source: 2012-06/txt/msg00066.txt.bz2 Hi, with Fedora 18 x86_64 (Rawhide) there is a false FAIl since: 2167931cf70f91206efb8b01e848a55d82a347ce is the first bad commit Author: Tom Tromey Date: Fri May 18 15:31:39 2012 +0000 http://sourceware.org/bugzilla/show_bug.cgi?id=13907 print &my_global_symbol -$1 = (int *) 0x804a004 -(gdb) PASS: gdb.base/code_elim.exp: get address of my_global_symbol +$1 = (int *) 0x804a004 +(gdb) FAIL: gdb.base/code_elim.exp: get address of my_global_symbol Nothing really changed, just GDB now prints and the testcase expects either none or suffix. This is because the two symbol files (their sections .data/.bss) have overlapped so GDB chooses randomly which symbol to display. And since Fedora 18 GCC puts there that "completed.5732" symbol. This may be because add-symbol-file FILE ADDR relocates to ADDR on the .text section and leaves other sections at their original place, which is IMO a bit unexpected; it is a FAQ people expect more ADDR to be relocation displacement (and not relative to .text and not limited to .text). But this is really outside of the scope of this testcase false FAIL. Checked in. Thanks, Jan http://sourceware.org/ml/gdb-cvs/2012-06/msg00012.html --- src/gdb/testsuite/ChangeLog 2012/06/03 17:06:04 1.3210 +++ src/gdb/testsuite/ChangeLog 2012/06/03 17:10:28 1.3211 @@ -11,6 +11,16 @@ (get address of my_global_func, get address of main): Wrap them to 'order1' and 'order2'. + * gdb.base/code_elim.exp + (add-symbol-file ${testfile1} 0x100000) + (add-symbol-file ${testfile2} 0x200000): Wrap them to 'order1' and + 'order2'. + (order1: add-symbol-file ${testfile1} 0x100000) + (order1: add-symbol-file ${testfile2} 0x200000) + (order2: add-symbol-file ${testfile2} 0x200000) + (order2: add-symbol-file ${testfile1} 0x100000): Add -s .data and -s + .bss as appropriate. + 2012-05-28 Jan Kratochvil * gdb.server/solib-list-lib.c: New file. --- src/gdb/testsuite/gdb.base/code_elim.exp 2012/06/03 17:06:04 1.5 +++ src/gdb/testsuite/gdb.base/code_elim.exp 2012/06/03 17:10:28 1.6 @@ -128,19 +128,19 @@ gdb_exit gdb_start -gdb_test "add-symbol-file ${binfile1} 0x100000" \ - "Reading symbols from .*${testfile1}\\.\\.\\.done\\." \ - "add-symbol-file ${testfile1} 0x100000" \ - "add symbol table from file \".*${testfile1}\" at\[ \t\r\n\]+\.text_addr = 0x100000\[\r\n\]+\\(y or n\\) " \ - "y" - -gdb_test "add-symbol-file ${binfile2} 0x200000" \ - "Reading symbols from .*${testfile2}\\.\\.\\.done\\." \ - "add-symbol-file ${testfile2} 0x200000" \ - "add symbol table from file \".*${testfile2}\" at\[ \t\r\n\]+\.text_addr = 0x200000\[\r\n\]+\\(y or n\\) " \ - "y" - with_test_prefix "order1" { + gdb_test "add-symbol-file ${binfile1} 0x100000 -s .bss 0x120000" \ + "Reading symbols from .*${testfile1}\\.\\.\\.done\\." \ + "add-symbol-file ${testfile1} 0x100000" \ + "add symbol table from file \".*${testfile1}\" at.*\\(y or n\\) " \ + "y" + + gdb_test "add-symbol-file ${binfile2} 0x200000 -s .data 0x210000 -s .bss 0x220000" \ + "Reading symbols from .*${testfile2}\\.\\.\\.done\\." \ + "add-symbol-file ${testfile2} 0x200000" \ + "add symbol table from file \".*${testfile2}\" at.*\\(y or n\\) " \ + "y" + not_null_var_address my_global_symbol not_null_var_address my_static_symbol not_null_var_address my_global_func @@ -152,19 +152,19 @@ gdb_exit gdb_start -gdb_test "add-symbol-file ${binfile2} 0x200000" \ - "Reading symbols from .*${testfile2}\\.\\.\\.done\\." \ - "add-symbol-file ${testfile2} 0x200000" \ - "add symbol table from file \".*${testfile2}\" at\[ \t\r\n\]+\.text_addr = 0x200000\[\r\n\]+\\(y or n\\) " \ - "y" - -gdb_test "add-symbol-file ${binfile1} 0x100000" \ - "Reading symbols from .*${testfile1}\\.\\.\\.done\\." \ - "add-symbol-file ${testfile1} 0x100000" \ - "add symbol table from file \".*${testfile1}\" at\[ \t\r\n\]+\.text_addr = 0x100000\[\r\n\]+\\(y or n\\) " \ - "y" - with_test_prefix "order2" { + gdb_test "add-symbol-file ${binfile2} 0x200000 -s .data 0x210000 -s .bss 0x220000" \ + "Reading symbols from .*${testfile2}\\.\\.\\.done\\." \ + "add-symbol-file ${testfile2} 0x200000" \ + "add symbol table from file \".*${testfile2}\" at.*\\(y or n\\) " \ + "y" + + gdb_test "add-symbol-file ${binfile1} 0x100000 -s .bss 0x120000" \ + "Reading symbols from .*${testfile1}\\.\\.\\.done\\." \ + "add-symbol-file ${testfile1} 0x100000" \ + "add symbol table from file \".*${testfile1}\" at.*\\(y or n\\) " \ + "y" + not_null_var_address my_global_symbol not_null_var_address my_static_symbol not_null_var_address my_global_func