Skip to content
Commit 0fbd03fd authored by Thiago Jung Bauermann's avatar Thiago Jung Bauermann
Browse files

gdb/testsuite: Fix testing of "info copying"



gdb.base/default.exp has an incomplete test for the "info copying" command,
as poetically pointed out by the FIXME removed by this patch.

The test omits the pattern argument to gdb_test, which causes it to just
check for a GDB prompt at the end of the command output.

The problem is that the command output is the whole GPLv3 license, which
due to its size causes the test to fail sometimes, making the testcase to
be out of sync with GDB's output and failing the tests that follow
it. E.g.,

  FAIL: gdb.base/default.exp: info copying (timeout)
  FAIL: gdb.base/default.exp: info display
  FAIL: gdb.base/default.exp: info frame "f" abbreviation
  PASS: gdb.base/default.exp: info frame
  FAIL: gdb.base/default.exp: info files
  FAIL: gdb.base/default.exp: info float
  FAIL: gdb.base/default.exp: info functions
  FAIL: gdb.base/default.exp: info locals
  FAIL: gdb.base/default.exp: info program
  FAIL: gdb.base/default.exp: info registers
  FAIL: gdb.base/default.exp: info stack "s" abbreviation

Fix by by checking for a few excerpts at the beginning, middle and end of
the license text.  This makes the test consume the command's output in
smallish chunks.

Reviewed-by: default avatarKeith Seitz <keiths@redhat.com>
Approved-By: default avatarTom Tromey <tom@tromey.com>
parent 7f26d260
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment