bug in TestMiGdbSetShow.test_lldbmi_gdb_set_target_async_off?

Packages/Python/lldbsuite/test/tools/lldb-mi/TestMiGdbSetShow.py, in test_lldbmi_gdb_set_target_async_off we have this code:

self.runCmd(“-gdb-set target-async off”)

self.runCmd(“-exec-run”)

unexpected = [ “*running” ] # “*running” is async notification

it = self.expect(unexpected + [ “@"argc=1\\r\\n” ])

if it < len(unexpected):

self.fail(“unexpected found: %s” % unexpected[it])

But lldb-mi does the right thing, expect won’t match “running”, so the self.expect command fails, which causes the test to error out. Shouldn’t the self.expect be in a try, with an except being a pass?

Hi Ted!

As noted in the copied code, *running is async notification and it only must be shown in async mode. The test checks that it’s not being shown in sync mode. So the test is correct.