From patchwork Mon Apr 30 12:04:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Muldoon X-Patchwork-Id: 27032 Received: (qmail 125521 invoked by alias); 30 Apr 2018 12:04:09 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk 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 125506 invoked by uid 89); 30 Apr 2018 12:04:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=ditto, Ditto, ibp X-HELO: mail-wm0-f41.google.com Received: from mail-wm0-f41.google.com (HELO mail-wm0-f41.google.com) (74.125.82.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Apr 2018 12:04:07 +0000 Received: by mail-wm0-f41.google.com with SMTP id a137so9821286wme.1 for ; Mon, 30 Apr 2018 05:04:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:mime-version :content-language:content-transfer-encoding; bh=5wH23px/XvqxKctLk+PsMfZyHv15MabXxsWeipww7RU=; b=jS8OSGvsceUXEMqsk364+LKVUk4QhcJolwboKFh+Bhz8Wq21sDdMwf7Wf0upxm/vs2 n72MhRrqyl9Jjw7K+J3ukhZ8r5zHAt28TFuPQjgES/MxkuBr5S92+8Cx+rrr8fIEIljB sLAGrji/+AvEPL7+ECIO/uvBNPC6RY0gZ+hpforUsPeV0rBv/O3a9XyqXtTyAzMJz0xo xb0GRSfwToxSzDK4F8NJ9ZXUEyjso6X/PAw4SP+Wwfjj3XjprHNoPEFvI460+wXR8UnB aaJS7DPi0nBFXaNbxAOWjx+KGIx6dghK5ho0QmeFwOi5YHbNSOqksSw7eBU6xL6JIg3l egTA== X-Gm-Message-State: ALQs6tCx8K1RJuPjL7lOxtejZF1i049E+72UBvPWTcNIcWqEJP/O6tk2 1O4oIred/6wD7tUSufTu30ZGohrYrY0= X-Google-Smtp-Source: AB8JxZoDL2pYknTOHPV2FFGU1o4ojg/fUXyU/uiZpLeZFWnZBcdHsWStj0O78ARqPAeNs3qB7okkyg== X-Received: by 10.28.66.79 with SMTP id p76mr6804372wma.15.1525089844893; Mon, 30 Apr 2018 05:04:04 -0700 (PDT) Received: from ?IPv6:2a02:c7f:ae6a:ed00:4685:ff:fe66:9f4? ([2a02:c7f:ae6a:ed00:4685:ff:fe66:9f4]) by smtp.gmail.com with ESMTPSA id n4sm14426755wmg.29.2018.04.30.05.04.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Apr 2018 05:04:03 -0700 (PDT) To: "gdb-patches@sourceware.org" From: Phil Muldoon Subject: [patch][python] Consistently use $srcfile in py-breakpoint.exp Message-ID: <57bc7a73-cfb0-a2b5-f873-c48875dd66d4@redhat.com> Date: Mon, 30 Apr 2018 13:04:03 +0100 MIME-Version: 1.0 X-IsSubscribed: yes This patch replaces py-breakpoint.exp's inconsistent use of string literals for source file name checks and replaces all instances with checks against $srcfile. Cheers, Phil 2018-04-30 Phil Muldoon * gdb.python/py-breakpoint.exp (test_bkpt_basic): Use $srcfile over hard-coded test inferior source name. (test_bkpt_invisible): Ditto. (test_bkpt_temporary): Ditto. diff --git a/gdb/testsuite/gdb.python/py-breakpoint.exp b/gdb/testsuite/gdb.python/py-breakpoint.exp index e89b9b8446..1dc8b93313 100644 --- a/gdb/testsuite/gdb.python/py-breakpoint.exp +++ b/gdb/testsuite/gdb.python/py-breakpoint.exp @@ -70,7 +70,7 @@ proc_with_prefix test_bkpt_basic { } { "" "Check obj exists @mult_line" gdb_test "python print (blist\[1\].location)" \ - "py-breakpoint\.c:${mult_line}*" \ + "$srcfile:${mult_line}*" \ "check breakpoint location @mult_line" # Check hit and ignore counts. @@ -219,10 +219,10 @@ proc_with_prefix test_bkpt_invisible { } { gdb_test "python print (ilist\[0\])" \ "" "Check invisible bp obj exists 1" gdb_test "python print (ilist\[0\].location)" \ - "py-breakpoint\.c:$ibp_location*" "Check breakpoint location 1" + "$srcfile:$ibp_location*" "Check breakpoint location 1" gdb_test "python print (ilist\[0\].visible)" \ "True" "Check breakpoint visibility 1" - gdb_test "info breakpoints" "py-breakpoint\.c:$ibp_location.*" \ + gdb_test "info breakpoints" "$srcfile:$ibp_location.*" \ "Check info breakpoints shows visible breakpoints" delete_breakpoints gdb_py_test_silent_cmd "python ibp = gdb.Breakpoint(\"$ibp_location\", internal=True)" \ @@ -232,13 +232,13 @@ proc_with_prefix test_bkpt_invisible { } { gdb_test "python print (ilist\[0\])" \ "" "Check invisible bp obj exists 2" gdb_test "python print (ilist\[0\].location)" \ - "py-breakpoint\.c:$ibp_location*" "Check breakpoint location 2" + "$srcfile:$ibp_location*" "Check breakpoint location 2" gdb_test "python print (ilist\[0\].visible)" \ "False" "Check breakpoint visibility 2" gdb_test "info breakpoints" "No breakpoints or watchpoints.*" \ "Check info breakpoints does not show invisible breakpoints" gdb_test "maint info breakpoints" \ - "py-breakpoint\.c:$ibp_location.*" \ + "$srcfile:$ibp_location.*" \ "Check maint info breakpoints shows invisible breakpoints" } @@ -436,9 +436,9 @@ proc_with_prefix test_bkpt_temporary { } { gdb_py_test_silent_cmd "python ibp = temp_bp(\"$ibp_location\", temporary=True)" \ "Set temporary breakpoint" 0 gdb_test "info breakpoints" \ - "2.*breakpoint.*del.*py-breakpoint\.c:$ibp_location.*" \ + "2.*breakpoint.*del.*$srcfile:$ibp_location.*" \ "Check info breakpoints shows breakpoint with temporary status" - gdb_test "python print (ibp.location)" "py-breakpoint\.c:$ibp_location*" \ + gdb_test "python print (ibp.location)" "$srcfile:$ibp_location*" \ "Check temporary breakpoint location" gdb_test "python print (ibp.temporary)" "True" \ "Check breakpoint temporary status"