Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>
Subject: Re: [patch] testsuite: watchthreads-reorder: Linux kernel compat.
Date: Mon, 31 May 2010 03:33:00 -0000	[thread overview]
Message-ID: <201005310310.08126.pedro@codesourcery.com> (raw)
In-Reply-To: <20100530211326.GA12218@host0.dyn.jankratochvil.net>

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  <jan.kratochvil@redhat.com>
> 
> 	Accept the new Linux kernel "t (tracing stop)" string.
> 	* gdb.threads/watchthreads-reorder.c (thread1_func, thread2_func):
> 	Update comment.
> 	(proc_string) <T (tracing stop)>: 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


  reply	other threads:[~2010-05-31  2:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-31  2:10 Jan Kratochvil
2010-05-31  3:33 ` Pedro Alves [this message]
2010-05-31 19:03   ` Jan Kratochvil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201005310310.08126.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox