This is the mail archive of the gdb-testers@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]

[binutils-gdb] Fix racy output matching in gdb.base/memattr.exp


*** TEST RESULTS FOR COMMIT 2c88253fc469fbf40be7f0d1f7060b81055f2eb1 ***

Author: Pedro Alves <palves@redhat.com>
Branch: master
Commit: 2c88253fc469fbf40be7f0d1f7060b81055f2eb1

Fix racy output matching in gdb.base/memattr.exp

Testing with:
 $ make check-read1 TESTS="gdb.base/memattr.exp"


Exposes a testcase bug that can result in racy fails:

  info mem
  Using user-defined memory regions.
  Num Enb Low Addr           High Addr          Attrs
  1   y   0x0000000000601060 0x0000000000601160 wo nocache
  2   y   0x0000000000601180 0x0000000000601280 ro nocache
  4   y   0x0000000000601280 0x0000000000601380 rw nocache
  3   y   0x0000000000601380 0x0000000000601480 rw nocache
  5   y   0x0000000000601480 0x0000000000601580 rw nocache
  (gdb) FAIL: gdb.base/memattr.exp: info mem (1)

The problem is that:

  "Attrs\[^\n\r]*.."

matches:

  "Attrs \r"

when the output buffer is filled with partial output like this:

  "info mem\r\nUsing user-defined memory regions.\r\nNum Enb Low Addr           High Addr          Attrs \r"

gdb/testsuite/ChangeLog:
2017-11-09  Pedro Alves  <palves@redhat.com>

	* gdb.base/memattr.exp: Tighten regexes to match the end line.


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