Skip to content

Commit

Permalink
[lldb] Make TestGuiBasicDebug more lenient
Browse files Browse the repository at this point in the history
Matt's change to the register allocator in 89baeae changed where we
end up after the `finish`. Before we'd end up on line 4.

* thread #1, queue = 'com.apple.main-thread', stop reason = step out
Return value: (int) $0 = 1
    frame #0: 0x0000000100003f7d a.out`main(argc=1, argv=0x00007ffeefbff630) at main.c:4:3
   1    extern int func();
   2
   3    int main(int argc, char **argv) {
-> 4      func(); // Break here
   5      func(); // Second
   6      return 0;
   7    }

Now, we end up on line 5.

* thread #1, queue = 'com.apple.main-thread', stop reason = step out
Return value: (int) $0 = 1

    frame #0: 0x0000000100003f8d a.out`main(argc=1, argv=0x00007ffeefbff630) at main.c:5:3
   2
   3    int main(int argc, char **argv) {
   4      func(); // Break here
-> 5      func(); // Second
   6      return 0;
   7    }

Given that this is not expected stable to be stable I've made the test a
bit more lenient to accept both scenarios.
  • Loading branch information
JDevlieghere committed Oct 1, 2020
1 parent bc43ddf commit d689570
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lldb/test/API/commands/gui/basicdebug/TestGuiBasicDebug.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ def test_gui(self):
self.child.send("d") # down
self.child.expect_exact("return 1; // In function")
self.child.send("f") # finish
self.child.expect("func\(\); // Break here[^\r\n]+<<< Thread 1: step out")
self.child.expect("<<< Thread 1: step out")
self.child.send("s") # move onto the second one
self.child.expect("func\(\); // Second[^\r\n]+<<< Thread 1: step in")
self.child.expect("<<< Thread 1: step in")
self.child.send("n") # step over
self.child.expect("return 0;[^\r\n]+<<< Thread 1: step over")
self.child.expect("<<< Thread 1: step over")

# Press escape to quit the gui
self.child.send(escape_key)
Expand Down

0 comments on commit d689570

Please sign in to comment.