From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12616 invoked by alias); 31 May 2010 02:10:42 -0000 Received: (qmail 12597 invoked by uid 22791); 31 May 2010 02:10:38 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 31 May 2010 02:10:25 +0000 Received: (qmail 540 invoked from network); 31 May 2010 02:10:23 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 31 May 2010 02:10:23 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [patch] testsuite: watchthreads-reorder: Linux kernel compat. Date: Mon, 31 May 2010 03:33:00 -0000 User-Agent: KMail/1.13.2 (Linux/2.6.32-22-generic; KDE/4.4.2; x86_64; ; ) Cc: Jan Kratochvil References: <20100530211326.GA12218@host0.dyn.jankratochvil.net> In-Reply-To: <20100530211326.GA12218@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201005310310.08126.pedro@codesourcery.com> 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/msg00696.txt.bz2 On Sunday 30 May 2010 22:13:26, Jan Kratochvil wrote: > OK to check-in? 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. Okay as is too if there's a good reason to do it as is. > > > Thanks, > Jan > > > 2010-05-30 Jan Kratochvil > > Accept the new Linux kernel "t (tracing stop)" string. > * gdb.threads/watchthreads-reorder.c (thread1_func, thread2_func): > Update comment. > (proc_string) : New. > (main): Update the state_wait expect string. > > --- a/gdb/testsuite/gdb.threads/watchthreads-reorder.c > +++ b/gdb/testsuite/gdb.threads/watchthreads-reorder.c > @@ -99,7 +99,7 @@ thread1_func (void *unused) > > 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 @@ thread2_func (void *unused) > > 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); > @@ -165,6 +165,12 @@ proc_string (const char *filename, const char *line) > exit (EXIT_FAILURE); > } > > + /* 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 (&buf[line_len], "T (tracing stop)") == 0) > + buf[line_len] = 't'; > + > return &buf[line_len]; > } > if (errno != 0) > @@ -336,9 +342,9 @@ main (int argc, char **argv) > { > /* 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 (); > -- Pedro Alves