public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
From: sergiodj+buildbot@sergiodj.net
To: gdb-testers@sourceware.org
Subject: [binutils-gdb] Fix racy output matching in gdb.asm/asm-source.exp
Date: Thu, 09 Nov 2017 23:12:00 -0000	[thread overview]
Message-ID: <f29f4b6ba198674096fddf2aa38fa8d028d387b2@gdb-build> (raw)

*** TEST RESULTS FOR COMMIT f29f4b6ba198674096fddf2aa38fa8d028d387b2 ***

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

Fix racy output matching in gdb.asm/asm-source.exp

Testing with:
 $ make check-read1 TESTS="gdb.asm/asm-source.exp"

Exposes a testcase bug that can result in racy fails:

 (gdb) PASS: gdb.asm/asm-source.exp: next over foo3
 return
 Make selected stack frame return now? (y or n) y
 n
 #0  main () at /home/pedro/gdb/mygit/src/gdb/testsuite/gdb.asm/asmsrc1.s:53
 53              gdbasm_exit0
 (gdb) FAIL: gdb.asm/asm-source.exp: return from foo2 (got interactive prompt)
 n

The problem is that the "return now\?.*" regex can match partial
output like this:

 "Make selected stack frame return no"

and then we send the 'y' too early, and then the next time around we
hit gdb_test_multiple's internal "got interactive prompt" regex.

Also, note we match "return no" instead of "return now" because the
regex is missing one quote level.

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

	* gdb.asm/asm-source.exp ("kill" test): Match the whole query
	output.  Fix '?' match.


             reply	other threads:[~2017-11-09 23:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-09 23:12 sergiodj+buildbot [this message]
2017-11-09 23:12 ` Failures on Fedora-x86_64-native-gdbserver-m64, branch master sergiodj+buildbot
2017-11-09 23:12 ` Failures on Fedora-x86_64-m64, " sergiodj+buildbot
2017-11-09 23:14 ` Failures on Fedora-s390x-m64, " sergiodj+buildbot
2017-11-09 23:23 ` Failures on Ubuntu-AArch64-native-gdbserver-m64, " sergiodj+buildbot
2017-11-09 23:28 ` Failures on Fedora-i686, " sergiodj+buildbot
2017-11-09 23:52 ` Failures on Ubuntu-AArch64-m64, " sergiodj+buildbot
2017-11-09 23:58 ` Failures on Fedora-x86_64-cc-with-index, " sergiodj+buildbot
2017-11-10  3:10 ` Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, " sergiodj+buildbot
2017-11-10  3:38 ` Failures on Ubuntu-AArch32-native-gdbserver-m32, " sergiodj+buildbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f29f4b6ba198674096fddf2aa38fa8d028d387b2@gdb-build \
    --to=sergiodj+buildbot@sergiodj.net \
    --cc=gdb-testers@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).