From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: Luis Machado <luis.machado@linaro.org>,
Andrew Burgess <andrew.burgess@embecosm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH master + gdb-10-branch] gdb: fix getting range of flexible array member in Python
Date: Thu, 22 Apr 2021 15:47:33 -0400 [thread overview]
Message-ID: <b9aea74b-0533-9cc2-e880-b19df4bad28a@polymtl.ca> (raw)
In-Reply-To: <3ac122fc-234a-9131-fe23-95962bf9d8ef@linaro.org>
On 2021-04-22 3:40 p.m., Luis Machado wrote:
> Hi Simon,
>
> On 4/22/21 4:07 PM, Simon Marchi via Gdb-patches wrote:
>> On 2021-04-22 1:50 p.m., Andrew Burgess wrote:
>>>> diff --git a/gdb/testsuite/gdb.python/flexible-array-member.c b/gdb/testsuite/gdb.python/flexible-array-member.c
>>>> new file mode 100644
>>>> index 000000000000..79815e2d38e0
>>>> --- /dev/null
>>>> +++ b/gdb/testsuite/gdb.python/flexible-array-member.c
>>>> @@ -0,0 +1,70 @@
>>>> +/* This testcase is part of GDB, the GNU debugger.
>>>> +
>>>> + Copyright 2020-2021 Free Software Foundation, Inc.
>>>
>>> In this file and the .exp the date range is 2020-2021, is this
>>> correct?
>>
>> Since I copied it from gdb.base/flexible-array-member.c, it should
>> retain the original copyright date.
>>
>>> Otherwise, looks good.
>>
>> Thanks, pushed to both branches!
>>
>> Simon
>>
>
> I notice this test being executed without python support. I think we need this guard:
>
> # Skip all tests if Python scripting is not enabled.
> if { [skip_python_tests] } { continue }
You're right, thanks for noticing. I pushed the patch below in the two
branches:
From a87caa6d523e573ab71694233a7501c6b5b5b9f7 Mon Sep 17 00:00:00 2001
From: Simon Marchi <simon.marchi@polymtl.ca>
Date: Thu, 22 Apr 2021 15:45:34 -0400
Subject: [PATCH] gdb/testsuite: add Python support check in
gdb.python/flexible-array-member.exp
We don't want to execute this test if Python support is not compiled in
GDB, add the necessary check.
gdb/testsuite/ChangeLog:
* gdb.python/flexible-array-member.exp: Add check for Python
support.
Change-Id: I853b937d2a193a0bb216566bef1a35354264b1c5
---
gdb/testsuite/ChangeLog | 5 +++++
gdb/testsuite/gdb.python/flexible-array-member.exp | 3 +++
2 files changed, 8 insertions(+)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 9730658299bf..266645bd6ad6 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2021-04-22 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * gdb.python/flexible-array-member.exp: Add check for Python
+ support.
+
2021-04-22 Simon Marchi <simon.marchi@polymtl.ca>
PR gdb/27757
diff --git a/gdb/testsuite/gdb.python/flexible-array-member.exp b/gdb/testsuite/gdb.python/flexible-array-member.exp
index 3739c9a9e5c0..349670cb7e72 100644
--- a/gdb/testsuite/gdb.python/flexible-array-member.exp
+++ b/gdb/testsuite/gdb.python/flexible-array-member.exp
@@ -22,6 +22,9 @@ if { [prepare_for_testing "failed to prepare" \
return
}
+# Skip all tests if Python scripting is not enabled.
+if { [skip_python_tests] } { continue }
+
if { ![runto break_here] } {
untested "could not run to break_here"
return
--
2.30.1
prev parent reply other threads:[~2021-04-22 19:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-22 15:59 Simon Marchi via Gdb-patches
2021-04-22 16:48 ` Andrew Burgess
2021-04-22 17:19 ` Simon Marchi via Gdb-patches
2021-04-22 17:50 ` Andrew Burgess
2021-04-22 19:07 ` Simon Marchi via Gdb-patches
2021-04-22 19:40 ` Luis Machado via Gdb-patches
2021-04-22 19:47 ` Simon Marchi via Gdb-patches [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b9aea74b-0533-9cc2-e880-b19df4bad28a@polymtl.ca \
--to=gdb-patches@sourceware.org \
--cc=andrew.burgess@embecosm.com \
--cc=luis.machado@linaro.org \
--cc=simon.marchi@polymtl.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox