From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 76251 invoked by alias); 6 Jul 2018 13:59:56 -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 75863 invoked by uid 89); 6 Jul 2018 13:59:55 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=neglected, honestly, credit X-HELO: mail-wm0-f68.google.com Received: from mail-wm0-f68.google.com (HELO mail-wm0-f68.google.com) (74.125.82.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Jul 2018 13:59:54 +0000 Received: by mail-wm0-f68.google.com with SMTP id z13-v6so14595261wma.5 for ; Fri, 06 Jul 2018 06:59:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=OqMatyESouGVcQ+S7Wfoxc8dSG1NBupojuuUcK6PLyw=; b=eoKovNC4rOOimpyRiN4J//52iAdt8q007kFneaLie0zrIcNMYobXgOaFR9N3X4JTSA Tohw0T2I+qHiaJjmTpbXICbt73rWbeaZsRR3IGLtbiMSPjGbB0VsoC8qXneQrFTL97Lu /C3QIIBZD30bEWtpTUuetDpX5m5SewtdqqcTINlhHDz6awwWlp/oiowf5p9ouy+EyLlC 6J5hMtFO4pYIoDnLCKfd387Kx6XQZiskat3WHRJyatJjCfkw16pbaFtDf86l9t7/SQip rpNSH6IWskJKZG7i5I+uWky94RxSusU5rn/AWDF9y80Xp7bgvAK768wzwiHn/T1L8CE3 OarQ== Return-Path: Received: from localhost (host86-164-199-62.range86-164.btcentralplus.com. [86.164.199.62]) by smtp.gmail.com with ESMTPSA id q17-v6sm11448762wrr.7.2018.07.06.06.59.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Jul 2018 06:59:51 -0700 (PDT) Date: Fri, 06 Jul 2018 13:59:00 -0000 From: Andrew Burgess To: Simon Marchi Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] gdb/testsuite: Run test when software watchpoints are used Message-ID: <20180706135950.GM2675@embecosm.com> References: <20180704164017.5849-1-andrew.burgess@embecosm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Fortune: You'll be sorry... X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2018-07/txt/msg00147.txt.bz2 * Simon Marchi [2018-07-05 22:53:54 -0400]: > On 2018-07-04 12:40 PM, Andrew Burgess wrote: > > The test gdb.base/watchpoint-reuse-slot.exp can be run when software > > watchpoints are in use, we just need to update one test pattern to > > look for 'Watchpoint' instead of 'Hardware watchpoint' in one case. > > > > gdb/testsuite/ChangeLog: > > > > * gdb.base/watchpoint-reuse-slot.exp: Test can be run using > > software watchpoints, we just need to update a test pattern in one > > place. > > Hi Andrew, > > Reading the test description, it seems like it exists specifically to > check the hardware watchpoint mechanisms of the targets. Did you > find it would also be useful to run it with software watchpoints? > What was the idea that motivated to do this change in the first > place? I think you give me too much credit! What happened was I had a target without h/w watchpoints, I ran the GDB testsuite and had a set of passes and fails. After some investigation I realised that I'd neglected to mark the target as not supporting h/w watchpoints in the board file. Once I'd added the no h/w watchpoint flag in the board file I reran the tests, and mostly things looked better. Failures, or unresolved tests had become unsupported. However.... in watchpoint-reuse-slot.exp a number of tests that used to pass had gone away, so I went looking at the test script. What I saw was that though the test declared a need for h/w watchpoints, the test would run perfectly fine without them. You'll notice that with my change if the board file says that h/w watchpoints are supported then we still look for the full "Hardware watchpoint" pattern in the output, that is, my change does not mean that if GDB broke and h/w watchpoints changed to s/w watchpoints (when they shouldn't) the test would pass. I think that after my change all targets that previously ran this test are just as well tested as they ever were. But, we have additional s/w watchpoint testing for targets that don't support h/w watchpoints. Is this testing anything that's not covered elsewhere? Honestly, I don't know. There probably is a lot of test duplication, but I can't guarantee that there's nothing unique in here. I guess my question is, what's the harm from broadening the test in this way? If I've missed something and this change could mean a bug can now slip into GDB then absolutely, this is not acceptable. But, I can't see how (yet)... Thanks, Andrew