From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3242 invoked by alias); 31 May 2010 03:33:13 -0000 Received: (qmail 3232 invoked by uid 22791); 31 May 2010 03:33:12 -0000 X-SWARE-Spam-Status: No, hits=-5.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,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; Mon, 31 May 2010 03:33:04 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4V3Wp3U017738 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 30 May 2010 23:32:51 -0400 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4V3WnR8016336 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 30 May 2010 23:32:51 -0400 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o4V3Wnue024858; Mon, 31 May 2010 05:32:49 +0200 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o4V3WmYZ024857; Mon, 31 May 2010 05:32:48 +0200 Date: Mon, 31 May 2010 19:03:00 -0000 From: Jan Kratochvil To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [patch] testsuite: watchthreads-reorder: Linux kernel compat. Message-ID: <20100531033247.GA24597@host0.dyn.jankratochvil.net> References: <20100530211326.GA12218@host0.dyn.jankratochvil.net> <201005310310.08126.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201005310310.08126.pedro@codesourcery.com> User-Agent: Mutt/1.5.20 (2009-12-10) 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: 2010-05/txt/msg00697.txt.bz2 On Mon, 31 May 2010 04:10:07 +0200, Pedro Alves wrote: > I tried to understand why you did this within proc_string, but I don't > think I got it, since proc_string is used to extract other lines, not > just the "State:" line. Why not do this within state_wait? Okay with > that change. I fully agree, thanks for catching it. Checked-in with that change. Regards, Jan http://sourceware.org/ml/gdb-cvs/2010-05/msg00255.html --- src/gdb/testsuite/ChangeLog 2010/05/28 23:47:40 1.2293 +++ src/gdb/testsuite/ChangeLog 2010/05/31 03:31:16 1.2294 @@ -1,3 +1,11 @@ +2010-05-31 Jan Kratochvil + + Accept the new Linux kernel "t (tracing stop)" string. + * gdb.threads/watchthreads-reorder.c (thread1_func, thread2_func): + Update comment. + (state_wait) : New. + (main): Update the state_wait expect string. + 2010-05-28 Pedro Alves * limits.c, limits.exp: Delete files. --- src/gdb/testsuite/gdb.threads/watchthreads-reorder.c 2010/01/20 21:09:30 1.3 +++ src/gdb/testsuite/gdb.threads/watchthreads-reorder.c 2010/05/31 03:31:17 1.4 @@ -99,7 +99,7 @@ rwatch_store = thread1_rwatch; - /* Be sure the "T (tracing stop)" test can proceed for both threads. */ + /* Be sure the "t (tracing stop)" test can proceed for both threads. */ timed_mutex_lock (&terminate_mutex); i = pthread_mutex_unlock (&terminate_mutex); assert (i == 0); @@ -125,7 +125,7 @@ rwatch_store = thread2_rwatch; - /* Be sure the "T (tracing stop)" test can proceed for both threads. */ + /* Be sure the "t (tracing stop)" test can proceed for both threads. */ timed_mutex_lock (&terminate_mutex); i = pthread_mutex_unlock (&terminate_mutex); assert (i == 0); @@ -211,6 +211,13 @@ do { state = proc_string (filename, "State:\t"); + + /* torvalds/linux-2.6.git 464763cf1c6df632dccc8f2f4c7e50163154a2c0 + has changed "T (tracing stop)" to "t (tracing stop)". Make the GDB + testcase backward compatible with older Linux kernels. */ + if (strcmp (state, "T (tracing stop)") == 0) + state = "t (tracing stop)"; + if (strcmp (state, wanted) == 0) { free (filename); @@ -336,9 +343,9 @@ { /* s390x-unknown-linux-gnu will fail with "R (running)". */ - state_wait (thread1_tid, "T (tracing stop)"); + state_wait (thread1_tid, "t (tracing stop)"); - state_wait (thread2_tid, "T (tracing stop)"); + state_wait (thread2_tid, "t (tracing stop)"); } cleanup ();