]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb/testsuite: fix gdb.base/basic-edit-cmd.exp test
authorAndrew Burgess <aburgess@redhat.com>
Fri, 8 Nov 2024 11:19:33 +0000 (11:19 +0000)
committerAndrew Burgess <aburgess@redhat.com>
Fri, 8 Nov 2024 11:19:33 +0000 (11:19 +0000)
commitdbca1bef47fb51531dddee7271fd651a7bc6c986
tree03f4eb95d9b611ffbe2d1fd1cd7fc677f42789e6
parent31ada87f91b4c5306d81c8a896df9764c32941f3
gdb/testsuite: fix gdb.base/basic-edit-cmd.exp test

In the recent commit:

  commit 31ada87f91b4c5306d81c8a896df9764c32941f3
  Date:   Wed Nov 6 22:18:55 2024 +0000

      gdb: fixes and tests for the 'edit' command

the new gdb.base/basic-edit-cmd.exp was added.  The Linaro CI
highlighted an issue with the test which I failed to address before
pushing the above commit.

Part of the test loads a file into GDB and then uses the 'edit'
command with no arguments to edit the default location.  This default
location is expected to be the 'main' function.

On my local machine the line reported is the opening '{' of main, and
that is what the test checks for.

The Linaro CI though appears to see the first code line of main.

I think either result is fine as far as this test is concerned, so
I've expanded the test regexp to check for either line number.  This
should make the CI testing happy again.
gdb/testsuite/gdb.base/basic-edit-cmd.exp