From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12681 invoked by alias); 23 Apr 2003 19:22:27 -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 12674 invoked from network); 23 Apr 2003 19:22:27 -0000 Received: from unknown (HELO touchme.toronto.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 23 Apr 2003 19:22:27 -0000 Received: from redhat.com (toocool.toronto.redhat.com [172.16.14.72]) by touchme.toronto.redhat.com (Postfix) with ESMTP id D7F51800095 for ; Wed, 23 Apr 2003 15:22:26 -0400 (EDT) Message-ID: <3EA6E7F2.7090301@redhat.com> Date: Wed, 23 Apr 2003 19:53:00 -0000 From: "J. Johnston" Organization: Red Hat Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: RFA: nptl threading support for schedlock.exp Content-Type: multipart/mixed; boundary="------------070708070403010709040601" X-SW-Source: 2003-04/txt/msg00443.txt.bz2 This is a multi-part message in MIME format. --------------070708070403010709040601 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 707 The following changes schedlock.exp for running with nptl threads. Under the nptl model, a very small time slice is not divided up equally as it was in the past with linuxthreads. The test case is also changed to ensure that one of the child threads is used to test schedule locking instead of the main thread. In early testing with nptl, a kernel problem was identified when the main thread was locked and an interrupt signal was sent. Ok to commit? -- Jeff J. 2003-04-23 Jeff Johnston * gdb.threads/schedlock.exp: Remove assumption that all threads will run in a particular small time slice. Also ensure we break in one of the child threads rather than the main thread. --------------070708070403010709040601 Content-Type: text/plain; name="schedlock.nptl.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="schedlock.nptl.patch" Content-length: 1499 Index: schedlock.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/schedlock.exp,v retrieving revision 1.3 diff -u -r1.3 schedlock.exp --- schedlock.exp 4 Jan 2003 23:05:05 -0000 1.3 +++ schedlock.exp 23 Apr 2003 18:31:05 -0000 @@ -112,8 +112,8 @@ stop_process "stop all threads ($msg)" - # Make sure we're in one of the looping threads. - gdb_breakpoint [gdb_get_line_number "schedlock.exp: main loop"] + # Make sure we're in one of the non-main looping threads. + gdb_breakpoint [concat [gdb_get_line_number "schedlock.exp: main loop"] " if arg != 5"] gdb_continue_to_breakpoint "return to loop ($msg)" delete_breakpoints } @@ -230,12 +230,11 @@ set start_args $cont_args set cont_args [get_args] +set num_other_threads 0 for {set i 0} {[expr $i < 6]} {set i [expr $i + 1]} { if {[lindex $start_args $i] == [lindex $cont_args $i]} { if {$i == $curthread} { fail "current thread stepped (didn't run)" - } else { - fail "other thread $i ran (didn't run) (1)" } } else { if {$i == $curthread} { @@ -245,9 +244,14 @@ fail "current thread stepped (wrong amount)" } } else { - pass "other thread $i ran (1)" + set num_other_threads [expr $num_other_threads + 1] } } +} +if {$num_other_threads > 0} { + pass "other threads ran (1)" +} else { + fail "other threads ran (no other threads ran) (1)" } # Test continue with scheduler locking --------------070708070403010709040601--