This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH,v2] Fix gdb.linespec/explicit.exp


Ping?

https://sourceware.org/ml/gdb-patches/2017-01/msg00657.html

On 01/31/2017 07:54 AM, Luis Machado wrote:
Changes in v2:

- Adjusted hex character pattern based on Keith Seitz's feedback and removed
  trailing whitespace.

I was chasing the cause of a few timeouts in this testcase (both on my local
machine, Ubuntu 16.04 x86-64, and on a aarch64-elf board) and managed to track
it down to this particular test:

	set tst "complete unique function name"
	send_gdb "break -function mai\t"
	gdb_test_multiple "" $tst {
	    "break -function mai\\\x07n " {
		send_gdb "\n"
		gdb_test "" ".*Breakpoint \[0-9\]+.*" $tst
		gdb_test_no_output "delete \$bpnum" "delete $tst breakpoint"
	    }
	}

FAIL: gdb.linespec/explicit.exp: complete unique function name (timeout)
FAIL: gdb.linespec/explicit.exp: complete non-unique function name (timeout)
FAIL: gdb.linespec/explicit.exp: complete non-existant function name (timeout)
FAIL: gdb.linespec/explicit.exp: complete unique file name (timeout)
FAIL: gdb.linespec/explicit.exp: complete non-unique file name (timeout)

There are 2 problems.

The first one is that i couldn't see the hex character x07 being ouput in both
of the above systems for this particular test. There is really only one
possible completion result for the main function. Maybe this character is
output in other systems?

So i started playing around with the regular expression to make x07 optional,
but no matter what pattern i used, it just didn't match.

It was then that i noticed we're missing a leading "-re" before the
gdb_test_multiple pattern to be matched, the second problem. I checked the
documentation for the command and did not find anything about the use
without "-re". So i assumed it is an oversight.

After the adjustments, i've made x07 optional and adjusted the pattern
according to Keith Seitz's feedback:

"break -function mai(\\\x07)?n"

I get full passes on Ubuntu 16.04 x86-64 and on aarch64-elf.

gdb/testsuite/ChangeLog

2017-01-31  Luis Machado  <lgustavo@codesourcery.com>

	* gdb.linespec/explicit.exp: Fix gdb_test_multiple calls missing
	the -re switch.
	Make the x07 character optional in the unique function name completion
	test.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]