From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18956 invoked by alias); 16 Mar 2015 14:01:32 -0000 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 Received: (qmail 18944 invoked by uid 89); 16 Mar 2015 14:01:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-pd0-f171.google.com Received: from mail-pd0-f171.google.com (HELO mail-pd0-f171.google.com) (209.85.192.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 16 Mar 2015 14:01:30 +0000 Received: by pdbni2 with SMTP id ni2so59234104pdb.1 for ; Mon, 16 Mar 2015 07:01:28 -0700 (PDT) X-Received: by 10.70.37.73 with SMTP id w9mr60645904pdj.83.1426514488699; Mon, 16 Mar 2015 07:01:28 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id h9sm4314906pdo.5.2015.03.16.07.01.26 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 16 Mar 2015 07:01:27 -0700 (PDT) From: Yao Qi To: Pedro Alves Cc: Yao Qi , gdb-patches@sourceware.org Subject: Re: [PATCH 1/2] watchpoint-reuse-slot.exp: skip some tests on targets have different wp and bp registers References: <1426257692-30461-1-git-send-email-qiyaoltc@gmail.com> <5506CDF2.4090400@redhat.com> Date: Mon, 16 Mar 2015 14:01:00 -0000 In-Reply-To: <5506CDF2.4090400@redhat.com> (Pedro Alves's message of "Mon, 16 Mar 2015 12:34:58 +0000") Message-ID: <864mplghxp.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00453.txt.bz2 Pedro Alves writes: > Hmm, is this just to save test time? If so, I'd prefer not skipping, > as it may always catch other bugs, in the target backends or > the kernel. No, watchpoint-reuse-slot.exp sets some HW breakpoint/watchpoint on some address doesn't meet the alignment requirements by kernel, kernel will reject the ptrace (PTRACE_SETHBPREGS) call, and some fails are caused, for example: (gdb) PASS: gdb.base/watchpoint-reuse-slot.exp: always-inserted off: watch = x hbreak: : width 1, iter 0: base + 0: delete $bpnum hbreak *(buf.byte + 0 + 1)^M Hardware assisted breakpoint 80 at 0x410a61^M (gdb) PASS: gdb.base/watchpoint-reuse-slot.exp: always-inserted off: watch = x hbreak: : width 1, iter 0: base + 1: hbreak *(buf.byte + 0 + 1) stepi^M Warning:^M Cannot insert hardware breakpoint 80.^M Could not insert hardware breakpoints:^M You may have requested too many hardware breakpoints/watchpoints.^M ^M (gdb) FAIL: gdb.base/watchpoint-reuse-slot.exp: always-inserted off: watch = x hbreak: : width 1, iter 0: base + 1: stepi advanced hbreak *(buf.byte + 0 + 1)^M Hardware assisted breakpoint 440 at 0x410a61^M Warning:^M Cannot insert hardware breakpoint 440.^M Could not insert hardware breakpoints:^M You may have requested too many hardware breakpoints/watchpoints.^M ^M (gdb) FAIL: gdb.base/watchpoint-reuse-slot.exp: always-inserted on: watch x= hbreak: : width 1, iter 0: base + 1: hbreak *(buf.byte + 0 + 1) Do you suggest that we don't skip these tests even requested breakpoint/watchpoint don't go in the same slot (debugging register)? so that the test can cover more. If the requested address of HW breakpoint/watchpoint doesn't meet the arch/kernel requirements, we can skip it, is it OK? The inner loop of test has two parts, "base + 0" and "base + 1", append prefix "$cmd1 x $cmd2: " with_test_prefix "$prefix: width $width, iter $x" { with_test_prefix "base + 0" { watch_command $cmd1 $x 0 $width stepi gdb_test_no_output "delete \$bpnum" } with_test_prefix "base + 1" { watch_command $cmd2 $x 1 $width stepi gdb_test_no_output "delete \$bpnum" } } if we skip "base + 1" part, do we skip "base + 0" too? if not, prefix in test summary "$cmd1 x $cmd2: " doesn't reflect the fact. > > Despite the test's file name, the test doesn't actually create two > breakpoints/watchpoints at the same time, as mentioned at the top > of the file. Yes, only one breakpoint/watchpoint is inserted at a time. --=20 Yao (=E9=BD=90=E5=B0=A7)