]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/testsuite] Remove wait in gdb.tui/pr30056.exp
authorTom de Vries <tdevries@suse.de>
Fri, 26 Sep 2025 23:13:16 +0000 (01:13 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 26 Sep 2025 23:13:16 +0000 (01:13 +0200)
commit8e2233c36a0f8ae98e7607de9822c1bc4284fa1e
tree4e9e0db0d6b2a02142aef6efe65ab116e8dbca7c
parentefdb47cc20cd335706e7547c8bc41b65a99ff341
[gdb/testsuite] Remove wait in gdb.tui/pr30056.exp

In test-case gdb.tui/pr30056.exp, we have:
...
    # Send arrow-right.
    send_gdb "\033\[C"

    # We need the arrow-right to be processed by readline, before we
    # send the following ^C.  Waiting 1 ms seems to do that.
    after 1
...

Waiting for an effect by sleeping is fragile.

The reason we're doing so is that we're waiting for an effect that is not
visible: the arrow-right is meant to horizontally scroll the source window,
but since there's no source, nothing happens.

Fix this by using an executable in the test-case, with a source file
containing a comment long enough to make horizontal scrolling possible.

Fixing this means we no longer run into PR33371, so that PR will need its own
test-case.

Tested on x86_64-linux.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/gdb.tui/pr30056.exp
gdb/testsuite/gdb.tui/tui-long-line.c [new file with mode: 0644]