From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4755 invoked by alias); 26 Jul 2003 23:24:57 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 4748 invoked from network); 26 Jul 2003 23:24:57 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 26 Jul 2003 23:24:57 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h6QNOuH05386 for ; Sat, 26 Jul 2003 19:24:56 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h6QNOuI10598 for ; Sat, 26 Jul 2003 19:24:56 -0400 Received: from localhost.redhat.com (romulus-int.sfbay.redhat.com [172.16.27.46]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h6QNOtv28737; Sat, 26 Jul 2003 19:24:55 -0400 Received: by localhost.redhat.com (Postfix, from userid 469) id BF8492CB2D; Sat, 26 Jul 2003 19:32:08 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16163.3960.590580.651826@localhost.redhat.com> Date: Sat, 26 Jul 2003 23:24:00 -0000 To: Daniel Jacobowitz Cc: Elena Zannoni , gdb-patches@sources.redhat.com Subject: Re: RFC: Some expect cleanups for the threads tests In-Reply-To: <20030726224952.GA13161@nevyn.them.org> References: <20030726160438.GA1513@nevyn.them.org> <16163.1777.606195.333160@localhost.redhat.com> <20030726224952.GA13161@nevyn.them.org> X-SW-Source: 2003-07/txt/msg00469.txt.bz2 Daniel Jacobowitz writes: > On Sat, Jul 26, 2003 at 06:55:45PM -0400, Elena Zannoni wrote: > > Daniel Jacobowitz writes: > > > These patches fix some testsuite problems on my setup - compiler and > > > assembler both support TLS, but the C library doesn't. I think you get a > > > different error (earlier) if the kernel doesn't support TLS; I'll have to > > > check at some point. > > > > > > Elena, how do the two TLS changes look? The print-threads.exp just handles > > > the case where we weren't switching threads before reporting the SIGTRAP, so > > > the zombie notice was never printed. If you say "info threads" at that > > > point GDB crashes. I'll get that one later today. > > > > > > -- > > > Daniel Jacobowitz > > > MontaVista Software Debian GNU/Linux Developer > > > > > > 2003-07-26 Daniel Jacobowitz > > > > > > * gdb.threads/print-threads.exp (test_all_threads): Loosen KFAIL > > > pattern. > > > * gdb.threads/tls-shared.exp: Don't use gdb_suppress_entire_file. > > > * gdb.threads/tls.exp: Recognize one case of the host library not > > > supporting TLS. > > > > > > Index: gdb/testsuite/gdb.threads/print-threads.exp > > > =================================================================== > > > RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/print-threads.exp,v > > > retrieving revision 1.4 > > > diff -u -p -r1.4 print-threads.exp > > > --- gdb/testsuite/gdb.threads/print-threads.exp 29 Jun 2003 19:29:42 -0000 1.4 > > > +++ gdb/testsuite/gdb.threads/print-threads.exp 26 Jul 2003 16:00:40 -0000 > > > @@ -94,7 +94,7 @@ proc test_all_threads { name kill } { > > > fail "all threads ran once ($name) (total $i threads ran)" > > > } > > > } > > > - -re "Program received signal SIGTRAP.*Thread \[0-9\]* \\(zombie\\).*$gdb_prompt $" { > > > + -re "Program received signal SIGTRAP.*(Thread \[0-9\]* \\(zombie\\)|0x00000000 in ).*$gdb_prompt $" { > > > if { $kill == 1 } { > > > kfail "gdb/1265" "Running threads ($name) (zombie thread)" > > > } else { > > > Index: gdb/testsuite/gdb.threads/tls-shared.exp > > > =================================================================== > > > RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/tls-shared.exp,v > > > retrieving revision 1.1 > > > diff -u -p -r1.1 tls-shared.exp > > > --- gdb/testsuite/gdb.threads/tls-shared.exp 22 Jul 2003 15:49:45 -0000 1.1 > > > +++ gdb/testsuite/gdb.threads/tls-shared.exp 26 Jul 2003 16:00:40 -0000 > > > @@ -78,7 +78,7 @@ if { ($gcc_compiled > > > } > > > > > > if {[gdb_compile_pthreads "${objdir}/${subdir}/${testfile}.o ${objdir}/${subdir}/${libfile}.so" "${binfile}" executable [list debug $additional_flags]] != ""} { > > > - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." > > > + return -1 > > > } > > > > > > > > > > Doh, of course. > > > > > Index: gdb/testsuite/gdb.threads/tls.exp > > > =================================================================== > > > RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/tls.exp,v > > > retrieving revision 1.2 > > > diff -u -p -r1.2 tls.exp > > > --- gdb/testsuite/gdb.threads/tls.exp 23 Jul 2003 03:08:26 -0000 1.2 > > > +++ gdb/testsuite/gdb.threads/tls.exp 26 Jul 2003 16:00:40 -0000 > > > @@ -172,6 +172,10 @@ gdb_test "b [gdb_get_line_number "before > > > > > > send_gdb "continue\n" > > > gdb_expect { > > > + -re ".*Program received signal SIGSEGV.*a_thread_local = 0;.*$gdb_prompt $" { > > > + unsupported "continue to first thread: system does not support TLS" > > > + return -1 > > > + } > > > -re ".*Program exited normally.*$gdb_prompt $" { > > > fail "continue to first thread: program runaway" > > > } > > > > > > Yuck. Is this the failure mode? Nothing detects this earlier? Sigh. > > Yeah :(( > > If the kernel does not support TLS and glibc does, then the binary > won't start; you get an error about set_thread_area, I think. But if > the kernel _does_ support TLS and glibc doesn't, nothing goes wrong > until we access a thread local. Oh, ok. I only have a 0-1 configuration here. An old system with nothing that supports TLS, and a new system with all the bits. Maybe add your above explanation as a comment. Otherwise the test looks odd. elena > > -- > Daniel Jacobowitz > MontaVista Software Debian GNU/Linux Developer