This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 17/17] infrun: scheduler-locking reverse


On 09/16/2015 01:44 PM, Metzger, Markus T wrote:

> +     For all-stop targets, we only step INFERIOR_PTID and continue others.  */
> +  if (!target_is_non_stop_p () && ptid_match (inferior_ptid, ptid))
> +    {

I'd remove that ptid_match.

> +with_test_prefix "schedlock-reverse" {
> +    gdb_test_no_output "set scheduler-locking reverse"
> +
> +    test_navigate
> +    test_step
> +    test_cont
> +    test_rstep
> +    test_goto_end
> +}
> +
> +with_test_prefix "schedlock-on" {
> +    gdb_test_no_output "set scheduler-locking on"
> +
> +    test_navigate
> +    test_step
> +    test_cont
> +    test_rstep
> +    test_goto_end
> +}
> +
> +with_test_prefix "schedlock-step" {
> +    gdb_test_no_output "set scheduler-locking step"
> +
> +    test_navigate
> +    test_step
> +    test_cont_all
> +    test_rstep
> +    test_goto_end
> +}

You can fold all these using foreach.  E.g.,

foreach schedlock {"reverse" "on" "step"} {
  with_test_prefix "schedlock-$schedlock" {
    gdb_test_no_output "set scheduler-locking $schedlock"

    test_navigate
    test_step
    test_cont_all
    test_rstep
    test_goto_end
  }
}

Otherwise LGTM.

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]