From patchwork Thu Apr 23 13:35:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 47459 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 63A2D2121F for ; Thu, 23 Apr 2015 13:35:53 +0000 (UTC) Received: by wgiv13 with SMTP id v13sf4226721wgi.3 for ; Thu, 23 Apr 2015 06:35:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-subscribe:list-archive :list-post:list-help:sender:delivered-to:from:to:subject:date :message-id:x-original-sender:x-original-authentication-results; bh=qio+gjJpjlKrAR+hm1C4Gl+mIFBRxcc4wcBEG1SmyIc=; b=jw9otcKLnxlzYbUAOBlF6Q9n0XYVNP0WUDlzcrca8h4UGTAtuOEwxe+uuwuHiiozzI HoYXH8jUhgOzdBNIug5bk1oudJHhxu6gBEI+Ehec5zfFvW6bhaceWVc2AH4mrWOCdDVx ALXNy6zQGorcG4l4B9txn+xi+Ednd7zITsqk2yX9GXEfrqHjN80c7/pe4mPZ9uFT4TRa 5PvixdpCvqyjGE4kPi+sAPf7NZuNHy609wDQJQnwt/9ooEmqOGq5MKT3tQEIJWTM6yhT vKphLHsJgG1DxSHuSv4W8MNz1eiwNUQXgkJMuV7N4W1zp+j2shKXRJfRNL0Wp4riVgOx L5jQ== X-Gm-Message-State: ALoCoQmWameIPa3u15tG5R6trTwKnZrUPSuFAbxjzyC1vAoR384oJunCK/LJ32It1P8DTf4cicQJ X-Received: by 10.112.53.102 with SMTP id a6mr1456562lbp.16.1429796152366; Thu, 23 Apr 2015 06:35:52 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.42 with SMTP id u10ls317119laz.64.gmail; Thu, 23 Apr 2015 06:35:52 -0700 (PDT) X-Received: by 10.112.167.166 with SMTP id zp6mr2541073lbb.80.1429796152218; Thu, 23 Apr 2015 06:35:52 -0700 (PDT) Received: from mail-lb0-x22a.google.com (mail-lb0-x22a.google.com. [2a00:1450:4010:c04::22a]) by mx.google.com with ESMTPS id od5si5992681lbb.123.2015.04.23.06.35.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Apr 2015 06:35:52 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22a as permitted sender) client-ip=2a00:1450:4010:c04::22a; Received: by lbbqq2 with SMTP id qq2so13293488lbb.3 for ; Thu, 23 Apr 2015 06:35:52 -0700 (PDT) X-Received: by 10.112.199.133 with SMTP id jk5mr2600383lbc.32.1429796152137; Thu, 23 Apr 2015 06:35:52 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.67.65 with SMTP id l1csp578119lbt; Thu, 23 Apr 2015 06:35:51 -0700 (PDT) X-Received: by 10.70.98.197 with SMTP id ek5mr5315716pdb.109.1429796150361; Thu, 23 Apr 2015 06:35:50 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id nt13si12542698pab.124.2015.04.23.06.35.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Apr 2015 06:35:50 -0700 (PDT) Received-SPF: pass (google.com: domain of gdb-patches-return-122289-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 124213 invoked by alias); 23 Apr 2015 13:35:42 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list List-Id: List-Unsubscribe: , List-Subscribe: List-Archive: List-Post: , List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 124197 invoked by uid 89); 23 Apr 2015 13:35:42 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f46.google.com Received: from mail-pa0-f46.google.com (HELO mail-pa0-f46.google.com) (209.85.220.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 23 Apr 2015 13:35:41 +0000 Received: by pabtp1 with SMTP id tp1so18380866pab.2 for ; Thu, 23 Apr 2015 06:35:39 -0700 (PDT) X-Received: by 10.70.134.35 with SMTP id ph3mr5260008pdb.91.1429796139561; Thu, 23 Apr 2015 06:35:39 -0700 (PDT) Received: from E107787-LIN.cambridge.arm.com (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id e5sm8195134pdc.94.2015.04.23.06.35.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Apr 2015 06:35:38 -0700 (PDT) From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH] Skip setting HW watchpoint if skip_hw_watchpoint_multi_tests in gdb.base/break-idempotent.exp Date: Thu, 23 Apr 2015 14:35:34 +0100 Message-Id: <1429796134-25532-1-git-send-email-qiyaoltc@gmail.com> X-IsSubscribed: yes X-Original-Sender: qiyaoltc@gmail.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22a as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@sourceware.org; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com X-Google-Group-Id: 836684582541 From: Yao Qi Hi, I see this fails below on arm linux native testing and remote testing with "set remote hardware-watchpoint-limit 1", rwatch global^M There are not enough available hardware resources for this watchpoint.^M (gdb) FAIL: gdb.base/break-idempotent.exp: always-inserted off: rwatch: twice: rwatch global gdb.base/break-idempotent.exp sets two breakpoints/watchpoints on the same address. GDB isn't smart enough calculate these two HW watchpoints can fit in one HW debug register, so the error message above isn't necessary (there is one HW watchpoint register on arm). Because target_ops interface can_use_hardware_watchpoint doesn't pass enough information to the target backend. Note that if I don't "set remote hardware-watchpoint-limit 1" in remote testing, this test passes without fails. However without "set remote hardware-watchpoint-limit 1", many other watchpoint tests fail. This patch is to add a check to skip_hw_watchpoint_multi_tests for rwatch and awatch. We can add such check for watch as well, but GDB is able to switch to software watchpoint if HW resource isn't available, it doesn't cause any fail, I decide not to skip. gdb/testsuite: 2015-04-23 Yao Qi * gdb.base/break-idempotent.exp: If skip_hw_watchpoint_multi_tests returns true, skip the tests on "rwatch" and "awatch". --- gdb/testsuite/gdb.base/break-idempotent.exp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/break-idempotent.exp b/gdb/testsuite/gdb.base/break-idempotent.exp index c5dae96..1cff706 100644 --- a/gdb/testsuite/gdb.base/break-idempotent.exp +++ b/gdb/testsuite/gdb.base/break-idempotent.exp @@ -174,7 +174,8 @@ foreach always_inserted { "off" "on" } { test_break $always_inserted "watch" } - if {![skip_hw_watchpoint_access_tests]} { + if {![skip_hw_watchpoint_access_tests] + && ![skip_hw_watchpoint_multi_tests]} { test_break $always_inserted "rwatch" test_break $always_inserted "awatch" }