public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Do some changes in gdb/testsuite/gdb.base/a2-run.exp
@ 2021-11-18 11:59 Tiezhu Yang
  2021-11-18 11:59 ` [PATCH 1/2] gdb: testsuite: no need to setup_xfail "arm-*-coff" in a2-run.exp Tiezhu Yang
  2021-11-18 11:59 ` [PATCH 2/2] gdb: testsuite: specify two args for "set args" command " Tiezhu Yang
  0 siblings, 2 replies; 15+ messages in thread
From: Tiezhu Yang @ 2021-11-18 11:59 UTC (permalink / raw)
  To: gdb-patches

Tiezhu Yang (2):
  gdb: testsuite: no need to setup_xfail "arm-*-coff" in a2-run.exp
  gdb: testsuite: specify two args for "set args" command in a2-run.exp

 gdb/testsuite/gdb.base/a2-run.exp | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

-- 
2.1.0


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 1/2] gdb: testsuite: no need to setup_xfail "arm-*-coff" in a2-run.exp
  2021-11-18 11:59 [PATCH 0/2] Do some changes in gdb/testsuite/gdb.base/a2-run.exp Tiezhu Yang
@ 2021-11-18 11:59 ` Tiezhu Yang
  2021-11-18 15:26   ` Tom Tromey
  2021-11-18 11:59 ` [PATCH 2/2] gdb: testsuite: specify two args for "set args" command " Tiezhu Yang
  1 sibling, 1 reply; 15+ messages in thread
From: Tiezhu Yang @ 2021-11-18 11:59 UTC (permalink / raw)
  To: gdb-patches

After commit 2ac93be70641 ("Remove arm-aout and arm-coff support"),
there is no need to setup_xfail "arm-*-coff", just remove them in
a2-run.exp.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
 gdb/testsuite/gdb.base/a2-run.exp | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/gdb/testsuite/gdb.base/a2-run.exp b/gdb/testsuite/gdb.base/a2-run.exp
index cf35f67..2042c26 100644
--- a/gdb/testsuite/gdb.base/a2-run.exp
+++ b/gdb/testsuite/gdb.base/a2-run.exp
@@ -130,21 +130,16 @@ if [target_info exists noargs] then {
 }
 
 # Now run with some arguments
-setup_xfail "arm-*-coff"
 gdb_run_cmd 5
 gdb_test_stdio "" "120" "" "run \"$testfile\" with arg"
 
 # Run again with same arguments.
 gdb_run_cmd 5
-
-setup_xfail "arm-*-coff"
 gdb_test_stdio "" "120" "" "run \"$testfile\" again with same args"
 
 # Use "set args" command to specify no arguments as default and run again.
 gdb_test_no_output "set args"
-
 gdb_run_cmd
-
 gdb_test_stdio "" "usage:  factorial <number>" "" "run after setting args to nil"
 
 # The remaining tests pass inferior arguments through GDB, so doesn't
@@ -158,10 +153,7 @@ if [use_gdb_stub] {
 
 # Use "set args" command to specify an argument and run again.
 gdb_test_no_output "set args 6"
-
 gdb_run_cmd
-
-setup_xfail "arm-*-coff"
 gdb_test_stdio "" "720" "" "run \"$testfile\" again after setting args"
 
 # GOAL: Test that shell is being used with "run".  For remote debugging
-- 
2.1.0


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 2/2] gdb: testsuite: specify two args for "set args" command in a2-run.exp
  2021-11-18 11:59 [PATCH 0/2] Do some changes in gdb/testsuite/gdb.base/a2-run.exp Tiezhu Yang
  2021-11-18 11:59 ` [PATCH 1/2] gdb: testsuite: no need to setup_xfail "arm-*-coff" in a2-run.exp Tiezhu Yang
@ 2021-11-18 11:59 ` Tiezhu Yang
  2021-11-18 15:28   ` Tom Tromey
  1 sibling, 1 reply; 15+ messages in thread
From: Tiezhu Yang @ 2021-11-18 11:59 UTC (permalink / raw)
  To: gdb-patches

In order to improve test coverage, add a testcase to specify two args
for "set args" command in a2-run.exp.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
 gdb/testsuite/gdb.base/a2-run.exp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gdb/testsuite/gdb.base/a2-run.exp b/gdb/testsuite/gdb.base/a2-run.exp
index 2042c26..fc9fa58 100644
--- a/gdb/testsuite/gdb.base/a2-run.exp
+++ b/gdb/testsuite/gdb.base/a2-run.exp
@@ -156,6 +156,11 @@ gdb_test_no_output "set args 6"
 gdb_run_cmd
 gdb_test_stdio "" "720" "" "run \"$testfile\" again after setting args"
 
+# Use "set args" command to specify two arguments and run again.
+gdb_test_no_output "set args 6 7"
+gdb_run_cmd
+gdb_test_stdio "" "usage:  factorial <number>" "" "run after setting two args"
+
 # GOAL: Test that shell is being used with "run".  For remote debugging
 # targets, there is no guarantee that a "shell" (whatever that is) is used.
 if ![is_remote target] then {
-- 
2.1.0


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 1/2] gdb: testsuite: no need to setup_xfail "arm-*-coff" in a2-run.exp
  2021-11-18 11:59 ` [PATCH 1/2] gdb: testsuite: no need to setup_xfail "arm-*-coff" in a2-run.exp Tiezhu Yang
@ 2021-11-18 15:26   ` Tom Tromey
  2021-11-18 15:35     ` Luis Machado
  0 siblings, 1 reply; 15+ messages in thread
From: Tom Tromey @ 2021-11-18 15:26 UTC (permalink / raw)
  To: Tiezhu Yang; +Cc: gdb-patches

>>>>> ">" == Tiezhu Yang <yangtiezhu@loongson.cn> writes:

>> After commit 2ac93be70641 ("Remove arm-aout and arm-coff support"),
>> there is no need to setup_xfail "arm-*-coff", just remove them in
>> a2-run.exp.

Interesting.  I did "git grep -i 'arm.*coff' -- gdb" and found some
other stuff we could maybe remove:

    gdb/arm-tdep.c:/* arm_coff_make_msymbol_special()

Presumably this function isn't needed.

I think the entire arm-wince-tdep.c file can be removed.

What do you think?

>> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
>> ---
>>  gdb/testsuite/gdb.base/a2-run.exp | 8 --------
>>  1 file changed, 8 deletions(-)

This is ok.  Thank you.

Tom

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 2/2] gdb: testsuite: specify two args for "set args" command in a2-run.exp
  2021-11-18 11:59 ` [PATCH 2/2] gdb: testsuite: specify two args for "set args" command " Tiezhu Yang
@ 2021-11-18 15:28   ` Tom Tromey
  2021-11-19  1:17     ` Tiezhu Yang
  0 siblings, 1 reply; 15+ messages in thread
From: Tom Tromey @ 2021-11-18 15:28 UTC (permalink / raw)
  To: Tiezhu Yang; +Cc: gdb-patches

>>>>> ">" == Tiezhu Yang <yangtiezhu@loongson.cn> writes:

>> In order to improve test coverage, add a testcase to specify two args
>> for "set args" command in a2-run.exp.

When you say to improve coverage -- did you do before/after coverage
runs and see some improvement?  If so, could you say where?

I tend to suspect there are other spots testing 'set args'.

thanks,
Tom

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 1/2] gdb: testsuite: no need to setup_xfail "arm-*-coff" in a2-run.exp
  2021-11-18 15:26   ` Tom Tromey
@ 2021-11-18 15:35     ` Luis Machado
  2021-11-18 15:44       ` Tom Tromey
  0 siblings, 1 reply; 15+ messages in thread
From: Luis Machado @ 2021-11-18 15:35 UTC (permalink / raw)
  To: Tom Tromey, Tiezhu Yang; +Cc: gdb-patches

On 11/18/21 12:26 PM, Tom Tromey wrote:
>>>>>> ">" == Tiezhu Yang <yangtiezhu@loongson.cn> writes:
> 
>>> After commit 2ac93be70641 ("Remove arm-aout and arm-coff support"),
>>> there is no need to setup_xfail "arm-*-coff", just remove them in
>>> a2-run.exp.
> 
> Interesting.  I did "git grep -i 'arm.*coff' -- gdb" and found some
> other stuff we could maybe remove:
> 
>      gdb/arm-tdep.c:/* arm_coff_make_msymbol_special()
> 
> Presumably this function isn't needed.
> 
> I think the entire arm-wince-tdep.c file can be removed.
> 
> What do you think?
> 

I think so too. Is wince in the deprecation list (if we even have one)? 
I don't recall if we have a policy for deprecating things and how long 
to wait for it.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 1/2] gdb: testsuite: no need to setup_xfail "arm-*-coff" in a2-run.exp
  2021-11-18 15:35     ` Luis Machado
@ 2021-11-18 15:44       ` Tom Tromey
  2021-11-18 15:46         ` Luis Machado
  2021-11-19 13:45         ` Luis Machado
  0 siblings, 2 replies; 15+ messages in thread
From: Tom Tromey @ 2021-11-18 15:44 UTC (permalink / raw)
  To: Luis Machado via Gdb-patches; +Cc: Tom Tromey, Tiezhu Yang, Luis Machado

>>>>> "Luis" == Luis Machado via Gdb-patches <gdb-patches@sourceware.org> writes:

Luis> I think so too. Is wince in the deprecation list (if we even have
Luis> one)? I don't recall if we have a policy for deprecating things and
Luis> how long to wait for it.

I don't recall offhand, either, but if the BFD support is gone, then
presumably this code already can't work.

Tom

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 1/2] gdb: testsuite: no need to setup_xfail "arm-*-coff" in a2-run.exp
  2021-11-18 15:44       ` Tom Tromey
@ 2021-11-18 15:46         ` Luis Machado
  2021-11-19  1:38           ` Tiezhu Yang
  2021-11-19 13:45         ` Luis Machado
  1 sibling, 1 reply; 15+ messages in thread
From: Luis Machado @ 2021-11-18 15:46 UTC (permalink / raw)
  To: Tom Tromey, Luis Machado via Gdb-patches; +Cc: Tiezhu Yang

On 11/18/21 12:44 PM, Tom Tromey wrote:
>>>>>> "Luis" == Luis Machado via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
> Luis> I think so too. Is wince in the deprecation list (if we even have
> Luis> one)? I don't recall if we have a policy for deprecating things and
> Luis> how long to wait for it.
> 
> I don't recall offhand, either, but if the BFD support is gone, then
> presumably this code already can't work.

Indeed. I'm thinking of doing a cleanup for this so we can get rid of 
dead code.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 2/2] gdb: testsuite: specify two args for "set args" command in a2-run.exp
  2021-11-18 15:28   ` Tom Tromey
@ 2021-11-19  1:17     ` Tiezhu Yang
  2021-11-23 12:36       ` Tiezhu Yang
  0 siblings, 1 reply; 15+ messages in thread
From: Tiezhu Yang @ 2021-11-19  1:17 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches

On 11/18/2021 11:28 PM, Tom Tromey wrote:
>>>>>> ">" == Tiezhu Yang <yangtiezhu@loongson.cn> writes:
>>> In order to improve test coverage, add a testcase to specify two args
>>> for "set args" command in a2-run.exp.
> When you say to improve coverage -- did you do before/after coverage
> runs and see some improvement?  If so, could you say where?
>
> I tend to suspect there are other spots testing 'set args'.
>
> thanks,
> Tom

Hi Tom,
Thank you very much for your reply.
It was intended to test the following case in gdb/testsuite/gdb.base/run.c:
if (argc != 2) {
printf ("usage: factorial <number>\n");
return 1;
}
Additionally, I do not find a test case with two args for "set args"command,
maybe am I missing something?
$ grep -r "set args"gdb/testsuite/gdb.base
gdb/testsuite/gdb.base/gdb_history:set args
gdb/testsuite/gdb.base/setshow.exp: gdb_test_no_output "set args ~"
gdb/testsuite/gdb.base/setshow.exp: #test set args
gdb/testsuite/gdb.base/setshow.exp: gdb_test_no_output "set args foo bar 
blup baz bubble""set args"
gdb/testsuite/gdb.base/jit-elf-so.exp: # Poke desired values directly 
into inferior instead of using "set args"
gdb/testsuite/gdb.base/jit-elf-so.exp: # because "set args"does not work 
under gdbserver.
gdb/testsuite/gdb.base/sigbpt.exp: set args [concat $args "*[at_segv]"]
gdb/testsuite/gdb.base/inferior-args.exp: } elseif { $method == "set 
args"} {
gdb/testsuite/gdb.base/inferior-args.exp: # Using "set args"does not 
make sense with a stub.
gdb/testsuite/gdb.base/inferior-args.exp: gdb_test_no_output "set args 
$inferior_args"
gdb/testsuite/gdb.base/inferior-args.exp:foreach_with_prefix method { 
"start""starti""run""set args"} {
gdb/testsuite/gdb.base/jit-elf.exp: # Poke desired values directly into 
inferior instead of using "set args"
gdb/testsuite/gdb.base/jit-elf.exp: # because "set args"does not work 
under gdbserver.
gdb/testsuite/gdb.base/a2-run.exp:# Use "set args"command to specify no 
arguments as default and run again.
gdb/testsuite/gdb.base/a2-run.exp:gdb_test_no_output "set args"
gdb/testsuite/gdb.base/a2-run.exp:# Use "set args"command to specify an 
argument and run again.
gdb/testsuite/gdb.base/a2-run.exp:gdb_test_no_output "set args 6"
gdb/testsuite/gdb.base/info-proc.exp:# cmdline". However, if we're using 
a stub, then "set args" would not
gdb/testsuite/gdb.base/info-proc.exp: gdb_test_no_output "set args 
$cmdline""set args"
gdb/testsuite/gdb.base/gcore-buffer-overflow.exp:gdb_test_no_output "set 
args ${pattern}"\
gdb/testsuite/gdb.base/pie-execl.exp:# In remote mode we cannot use the 
'set args'command, and this
gdb/testsuite/gdb.base/pie-execl.exp:gdb_test_no_output "set args 
${binfile2}""set args ${binfile2_test_msg}"
gdb/testsuite/gdb.base/break-interp.exp: gdb_test_no_output "set args segv"
gdb/testsuite/gdb.base/break-interp.exp: gdb_test_no_output "set args 
[standard_output_file $binfile_test]"\
gdb/testsuite/gdb.base/break-interp.exp: "set args 
OBJDIR/${subdir}/$binfile_test"
gdb/testsuite/gdb.base/default.exp:#test set args
gdb/testsuite/gdb.base/default.exp:gdb_test_no_output "set args""set args"
gdb/testsuite/gdb.base/startup-with-shell.exp: gdb_test_no_output "set 
args $run_args"\
gdb/testsuite/gdb.base/startup-with-shell.exp: "set args \$run_args"


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 1/2] gdb: testsuite: no need to setup_xfail "arm-*-coff" in a2-run.exp
  2021-11-18 15:46         ` Luis Machado
@ 2021-11-19  1:38           ` Tiezhu Yang
  2021-11-19 11:41             ` Luis Machado
  0 siblings, 1 reply; 15+ messages in thread
From: Tiezhu Yang @ 2021-11-19  1:38 UTC (permalink / raw)
  To: Luis Machado, Tom Tromey, Luis Machado via Gdb-patches

On 11/18/2021 11:46 PM, Luis Machado wrote:
> On 11/18/21 12:44 PM, Tom Tromey wrote:
>>>>>>> "Luis" == Luis Machado via Gdb-patches 
>>>>>>> <gdb-patches@sourceware.org> writes:
>>
>> Luis> I think so too. Is wince in the deprecation list (if we even have
>> Luis> one)? I don't recall if we have a policy for deprecating things 
>> and
>> Luis> how long to wait for it.
>>
>> I don't recall offhand, either, but if the BFD support is gone, then
>> presumably this code already can't work.
>
> Indeed. I'm thinking of doing a cleanup for this so we can get rid of 
> dead code.

Hi Tom and Luis,
Thank you very much for your discussions and suggestions.
If you are OK, should I update this patch or send a new patch to do the
following changes:
(1) remove the related code about arm_coff_make_msymbol_special() in 
gdb/arm-tdep.c
diff --git a/gdb/arm-tdep.cb/gdb/arm-tdep.c
index 7495434..3664045100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -8678,8+8678,7@@ coff_sym_is_thumb (int val)
|| val == C_THUMBLABEL);
}
-/* arm_coff_make_msymbol_special()
- arm_elf_make_msymbol_special()
+/* arm_elf_make_msymbol_special()
These functions test whether the COFF or ELF symbol corresponds to
an address in thumb code, and set a "special"bit in a minimal
@@ -8696,13+8695,6@@ arm_elf_make_msymbol_special(asymbol *sym, struct 
minimal_symbol *msym)
}
static void
-arm_coff_make_msymbol_special(int val, struct minimal_symbol *msym)
-{
- if (coff_sym_is_thumb (val))
- MSYMBOL_SET_SPECIAL (msym);
-}
-
-static void
arm_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile,
asymbol *sym)
{
@@ -9582,8+9574,6@@ arm_gdbarch_init (struct gdbarch_info info, struct 
gdbarch_list *arches)
/* Minsymbol frobbing. */
set_gdbarch_elf_make_msymbol_special (gdbarch, 
arm_elf_make_msymbol_special);
- set_gdbarch_coff_make_msymbol_special (gdbarch,
- arm_coff_make_msymbol_special);
set_gdbarch_record_special_symbol (gdbarch, arm_record_special_symbol);
/* Thumb-2IT block support. */
(2) remove gdb/arm-wince-tdep.c


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 1/2] gdb: testsuite: no need to setup_xfail "arm-*-coff" in a2-run.exp
  2021-11-19  1:38           ` Tiezhu Yang
@ 2021-11-19 11:41             ` Luis Machado
  0 siblings, 0 replies; 15+ messages in thread
From: Luis Machado @ 2021-11-19 11:41 UTC (permalink / raw)
  To: Tiezhu Yang, Tom Tromey, Luis Machado via Gdb-patches

On 11/18/21 10:38 PM, Tiezhu Yang wrote:
> On 11/18/2021 11:46 PM, Luis Machado wrote:
>> On 11/18/21 12:44 PM, Tom Tromey wrote:
>>>>>>>> "Luis" == Luis Machado via Gdb-patches 
>>>>>>>> <gdb-patches@sourceware.org> writes:
>>>
>>> Luis> I think so too. Is wince in the deprecation list (if we even have
>>> Luis> one)? I don't recall if we have a policy for deprecating things 
>>> and
>>> Luis> how long to wait for it.
>>>
>>> I don't recall offhand, either, but if the BFD support is gone, then
>>> presumably this code already can't work.
>>
>> Indeed. I'm thinking of doing a cleanup for this so we can get rid of 
>> dead code.
> 
> Hi Tom and Luis,
> Thank you very much for your discussions and suggestions.
> If you are OK, should I update this patch or send a new patch to do the
> following changes:
> (1) remove the related code about arm_coff_make_msymbol_special() in 
> gdb/arm-tdep.c

There may be more to remove after that one. Let me check if this is 
really not being used first.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 1/2] gdb: testsuite: no need to setup_xfail "arm-*-coff" in a2-run.exp
  2021-11-18 15:44       ` Tom Tromey
  2021-11-18 15:46         ` Luis Machado
@ 2021-11-19 13:45         ` Luis Machado
  2021-11-19 20:39           ` Tom Tromey
  1 sibling, 1 reply; 15+ messages in thread
From: Luis Machado @ 2021-11-19 13:45 UTC (permalink / raw)
  To: Tom Tromey, Luis Machado via Gdb-patches; +Cc: Tiezhu Yang

On 11/18/21 12:44 PM, Tom Tromey wrote:
>>>>>> "Luis" == Luis Machado via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
> Luis> I think so too. Is wince in the deprecation list (if we even have
> Luis> one)? I don't recall if we have a policy for deprecating things and
> Luis> how long to wait for it.
> 
> I don't recall offhand, either, but if the BFD support is gone, then
> presumably this code already can't work.

I did some research and Windows Embedded Compact 2013 has extended 
support until October 10th, 2023. I still see some references of 
regression testing with arm-wince-pe. So presumably BFD support is still 
there.

Though I think this is fairly untested on GDB's side, and we removed the 
gdbserver support.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 1/2] gdb: testsuite: no need to setup_xfail "arm-*-coff" in a2-run.exp
  2021-11-19 13:45         ` Luis Machado
@ 2021-11-19 20:39           ` Tom Tromey
  0 siblings, 0 replies; 15+ messages in thread
From: Tom Tromey @ 2021-11-19 20:39 UTC (permalink / raw)
  To: Luis Machado via Gdb-patches; +Cc: Tom Tromey, Luis Machado, Tiezhu Yang

Luis> I did some research and Windows Embedded Compact 2013 has extended
Luis> support until October 10th, 2023. I still see some references of 
Luis> regression testing with arm-wince-pe. So presumably BFD support is
Luis> still there.

Yeah, but the original patch pointed out that commit 2ac93be70641
removed arm-aout and arm-coff from BFD.  Without arm-coff in BFD, it
seems to me that this line in arm-wince-tdep.c will never cause the
sniffer to run:

  gdbarch_register_osabi_sniffer (bfd_arch_arm, bfd_target_coff_flavour,
				  arm_wince_osabi_sniffer);

Then, since that's the only thing that can return GDB_OSABI_WINCE, I
think the rest of the file must also be unusable.

thanks,
Tom

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 2/2] gdb: testsuite: specify two args for "set args" command in a2-run.exp
  2021-11-19  1:17     ` Tiezhu Yang
@ 2021-11-23 12:36       ` Tiezhu Yang
  2022-01-05  6:16         ` Tiezhu Yang
  0 siblings, 1 reply; 15+ messages in thread
From: Tiezhu Yang @ 2021-11-23 12:36 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches, Luis Machado

On 11/19/2021 09:17 AM, Tiezhu Yang wrote:
> On 11/18/2021 11:28 PM, Tom Tromey wrote:
>>>>>>> ">" == Tiezhu Yang <yangtiezhu@loongson.cn> writes:
>>>> In order to improve test coverage, add a testcase to specify two args
>>>> for "set args" command in a2-run.exp.
>> When you say to improve coverage -- did you do before/after coverage
>> runs and see some improvement?  If so, could you say where?
>>
>> I tend to suspect there are other spots testing 'set args'.
>>
>> thanks,
>> Tom
>
> Hi Tom,
> Thank you very much for your reply.
> It was intended to test the following case in gdb/testsuite/gdb.base/run.c:
> if (argc != 2) {
> printf ("usage: factorial <number>\n");
> return 1;
> }
> Additionally, I do not find a test case with two args for "set
> args"command,
> maybe am I missing something?
> $ grep -r "set args"gdb/testsuite/gdb.base
> gdb/testsuite/gdb.base/gdb_history:set args
> gdb/testsuite/gdb.base/setshow.exp: gdb_test_no_output "set args ~"
> gdb/testsuite/gdb.base/setshow.exp: #test set args
> gdb/testsuite/gdb.base/setshow.exp: gdb_test_no_output "set args foo bar
> blup baz bubble""set args"
> gdb/testsuite/gdb.base/jit-elf-so.exp: # Poke desired values directly
> into inferior instead of using "set args"
> gdb/testsuite/gdb.base/jit-elf-so.exp: # because "set args"does not work
> under gdbserver.
> gdb/testsuite/gdb.base/sigbpt.exp: set args [concat $args "*[at_segv]"]
> gdb/testsuite/gdb.base/inferior-args.exp: } elseif { $method == "set
> args"} {
> gdb/testsuite/gdb.base/inferior-args.exp: # Using "set args"does not
> make sense with a stub.
> gdb/testsuite/gdb.base/inferior-args.exp: gdb_test_no_output "set args
> $inferior_args"
> gdb/testsuite/gdb.base/inferior-args.exp:foreach_with_prefix method {
> "start""starti""run""set args"} {
> gdb/testsuite/gdb.base/jit-elf.exp: # Poke desired values directly into
> inferior instead of using "set args"
> gdb/testsuite/gdb.base/jit-elf.exp: # because "set args"does not work
> under gdbserver.
> gdb/testsuite/gdb.base/a2-run.exp:# Use "set args"command to specify no
> arguments as default and run again.
> gdb/testsuite/gdb.base/a2-run.exp:gdb_test_no_output "set args"
> gdb/testsuite/gdb.base/a2-run.exp:# Use "set args"command to specify an
> argument and run again.
> gdb/testsuite/gdb.base/a2-run.exp:gdb_test_no_output "set args 6"
> gdb/testsuite/gdb.base/info-proc.exp:# cmdline". However, if we're using
> a stub, then "set args" would not
> gdb/testsuite/gdb.base/info-proc.exp: gdb_test_no_output "set args
> $cmdline""set args"
> gdb/testsuite/gdb.base/gcore-buffer-overflow.exp:gdb_test_no_output "set
> args ${pattern}"\
> gdb/testsuite/gdb.base/pie-execl.exp:# In remote mode we cannot use the
> 'set args'command, and this
> gdb/testsuite/gdb.base/pie-execl.exp:gdb_test_no_output "set args
> ${binfile2}""set args ${binfile2_test_msg}"
> gdb/testsuite/gdb.base/break-interp.exp: gdb_test_no_output "set args segv"
> gdb/testsuite/gdb.base/break-interp.exp: gdb_test_no_output "set args
> [standard_output_file $binfile_test]"\
> gdb/testsuite/gdb.base/break-interp.exp: "set args
> OBJDIR/${subdir}/$binfile_test"
> gdb/testsuite/gdb.base/default.exp:#test set args
> gdb/testsuite/gdb.base/default.exp:gdb_test_no_output "set args""set args"
> gdb/testsuite/gdb.base/startup-with-shell.exp: gdb_test_no_output "set
> args $run_args"\
> gdb/testsuite/gdb.base/startup-with-shell.exp: "set args \$run_args"
>

Hi,

If this small patchset looks good to you, could you please apply them
to binutils-gdb.git? Maybe other cleanup about arm-coff could be done
in the future.

[PATCH 0/2] Do some changes in gdb/testsuite/gdb.base/a2-run.exp
https://sourceware.org/pipermail/gdb-patches/2021-November/183525.html

[PATCH 1/2] gdb: testsuite: no need to setup_xfail "arm-*-coff" in 
a2-run.exp
https://sourceware.org/pipermail/gdb-patches/2021-November/183524.html

[PATCH 2/2] gdb: testsuite: specify two args for "set args" command in 
a2-run.exp
https://sourceware.org/pipermail/gdb-patches/2021-November/183523.html

Thanks,
Tiezhu


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 2/2] gdb: testsuite: specify two args for "set args" command in a2-run.exp
  2021-11-23 12:36       ` Tiezhu Yang
@ 2022-01-05  6:16         ` Tiezhu Yang
  0 siblings, 0 replies; 15+ messages in thread
From: Tiezhu Yang @ 2022-01-05  6:16 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches, Luis Machado

On 11/23/21 20:36, Tiezhu Yang wrote:
> On 11/19/2021 09:17 AM, Tiezhu Yang wrote:
>> On 11/18/2021 11:28 PM, Tom Tromey wrote:
>>>>>>>> ">" == Tiezhu Yang <yangtiezhu@loongson.cn> writes:
>>>>> In order to improve test coverage, add a testcase to specify two args
>>>>> for "set args" command in a2-run.exp.
>>> When you say to improve coverage -- did you do before/after coverage
>>> runs and see some improvement?  If so, could you say where?
>>>
>>> I tend to suspect there are other spots testing 'set args'.
>>>
>>> thanks,
>>> Tom
>>
>> Hi Tom,
>> Thank you very much for your reply.
>> It was intended to test the following case in 
>> gdb/testsuite/gdb.base/run.c:
>> if (argc != 2) {
>> printf ("usage: factorial <number>\n");
>> return 1;
>> }
>> Additionally, I do not find a test case with two args for "set
>> args"command,
>> maybe am I missing something?
>> $ grep -r "set args"gdb/testsuite/gdb.base
>> gdb/testsuite/gdb.base/gdb_history:set args
>> gdb/testsuite/gdb.base/setshow.exp: gdb_test_no_output "set args ~"
>> gdb/testsuite/gdb.base/setshow.exp: #test set args
>> gdb/testsuite/gdb.base/setshow.exp: gdb_test_no_output "set args foo bar
>> blup baz bubble""set args"
>> gdb/testsuite/gdb.base/jit-elf-so.exp: # Poke desired values directly
>> into inferior instead of using "set args"
>> gdb/testsuite/gdb.base/jit-elf-so.exp: # because "set args"does not work
>> under gdbserver.
>> gdb/testsuite/gdb.base/sigbpt.exp: set args [concat $args "*[at_segv]"]
>> gdb/testsuite/gdb.base/inferior-args.exp: } elseif { $method == "set
>> args"} {
>> gdb/testsuite/gdb.base/inferior-args.exp: # Using "set args"does not
>> make sense with a stub.
>> gdb/testsuite/gdb.base/inferior-args.exp: gdb_test_no_output "set args
>> $inferior_args"
>> gdb/testsuite/gdb.base/inferior-args.exp:foreach_with_prefix method {
>> "start""starti""run""set args"} {
>> gdb/testsuite/gdb.base/jit-elf.exp: # Poke desired values directly into
>> inferior instead of using "set args"
>> gdb/testsuite/gdb.base/jit-elf.exp: # because "set args"does not work
>> under gdbserver.
>> gdb/testsuite/gdb.base/a2-run.exp:# Use "set args"command to specify no
>> arguments as default and run again.
>> gdb/testsuite/gdb.base/a2-run.exp:gdb_test_no_output "set args"
>> gdb/testsuite/gdb.base/a2-run.exp:# Use "set args"command to specify an
>> argument and run again.
>> gdb/testsuite/gdb.base/a2-run.exp:gdb_test_no_output "set args 6"
>> gdb/testsuite/gdb.base/info-proc.exp:# cmdline". However, if we're using
>> a stub, then "set args" would not
>> gdb/testsuite/gdb.base/info-proc.exp: gdb_test_no_output "set args
>> $cmdline""set args"
>> gdb/testsuite/gdb.base/gcore-buffer-overflow.exp:gdb_test_no_output "set
>> args ${pattern}"\
>> gdb/testsuite/gdb.base/pie-execl.exp:# In remote mode we cannot use the
>> 'set args'command, and this
>> gdb/testsuite/gdb.base/pie-execl.exp:gdb_test_no_output "set args
>> ${binfile2}""set args ${binfile2_test_msg}"
>> gdb/testsuite/gdb.base/break-interp.exp: gdb_test_no_output "set args 
>> segv"
>> gdb/testsuite/gdb.base/break-interp.exp: gdb_test_no_output "set args
>> [standard_output_file $binfile_test]"\
>> gdb/testsuite/gdb.base/break-interp.exp: "set args
>> OBJDIR/${subdir}/$binfile_test"
>> gdb/testsuite/gdb.base/default.exp:#test set args
>> gdb/testsuite/gdb.base/default.exp:gdb_test_no_output "set args""set 
>> args"
>> gdb/testsuite/gdb.base/startup-with-shell.exp: gdb_test_no_output "set
>> args $run_args"\
>> gdb/testsuite/gdb.base/startup-with-shell.exp: "set args \$run_args"
>>
> 
> Hi,
> 
> If this small patchset looks good to you, could you please apply them
> to binutils-gdb.git? Maybe other cleanup about arm-coff could be done
> in the future.
> 
> [PATCH 0/2] Do some changes in gdb/testsuite/gdb.base/a2-run.exp
> https://sourceware.org/pipermail/gdb-patches/2021-November/183525.html
> 
> [PATCH 1/2] gdb: testsuite: no need to setup_xfail "arm-*-coff" in 
> a2-run.exp
> https://sourceware.org/pipermail/gdb-patches/2021-November/183524.html
> 
> [PATCH 2/2] gdb: testsuite: specify two args for "set args" command in 
> a2-run.exp
> https://sourceware.org/pipermail/gdb-patches/2021-November/183523.html
> 
> Thanks,
> Tiezhu

Gentle ping.

Thanks,
Tiezhu


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-01-05  6:16 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-18 11:59 [PATCH 0/2] Do some changes in gdb/testsuite/gdb.base/a2-run.exp Tiezhu Yang
2021-11-18 11:59 ` [PATCH 1/2] gdb: testsuite: no need to setup_xfail "arm-*-coff" in a2-run.exp Tiezhu Yang
2021-11-18 15:26   ` Tom Tromey
2021-11-18 15:35     ` Luis Machado
2021-11-18 15:44       ` Tom Tromey
2021-11-18 15:46         ` Luis Machado
2021-11-19  1:38           ` Tiezhu Yang
2021-11-19 11:41             ` Luis Machado
2021-11-19 13:45         ` Luis Machado
2021-11-19 20:39           ` Tom Tromey
2021-11-18 11:59 ` [PATCH 2/2] gdb: testsuite: specify two args for "set args" command " Tiezhu Yang
2021-11-18 15:28   ` Tom Tromey
2021-11-19  1:17     ` Tiezhu Yang
2021-11-23 12:36       ` Tiezhu Yang
2022-01-05  6:16         ` Tiezhu Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).