llvm-project/lldb/test/API/driver/quit_speed/TestQuitWithProcess.py
Omair Javaid cc76b20ec4
[lldb][test] TestQuitWithProcess: Increase timeout to fix ARM flakiness (#181660)
TestQuitWithProcess.py is randomly failing on Arm Linux buildbot. The
test validates LLDB's ability to quit cleanly killing active processes
with a timeout value set to 15 seconds which could be insufficient for
any resource limited platforms under heavy load.

This patch increase the timeout to 30 seconds to accommodate any
resource limits.

https://lab.llvm.org/buildbot/#/builders/18/builds/24801
2026-02-17 17:27:03 +05:00

61 lines
1.8 KiB
Python

"""
Test that killing the target while quitting doesn't stall
"""
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
from lldbsuite.test.lldbpexpect import PExpectTest
class DriverQuitSpeedTest(PExpectTest):
source = "main.c"
@skipIfAsan
def test_run_quit(self):
"""Test that the lldb driver's batch mode works correctly."""
import pexpect
self.build()
exe = self.getBuildArtifact("a.out")
# Turn on auto-confirm removes the wait for the prompt.
self.launch(executable=exe, extra_args=["-O", "settings set auto-confirm 1"])
child = self.child
# Launch the process without a TTY so we don't have to interrupt:
child.sendline("process launch -n")
print("launched process")
child.expect(r"Process ([\d]*) launched:")
print("Got launch message")
child.sendline("quit")
print("sent quit")
child.expect(pexpect.EOF, timeout=30)
@skipIfAsan
def test_run_quit_with_prompt(self):
"""Test that the lldb driver's batch mode works correctly with trailing space in confimation."""
import pexpect
self.build()
exe = self.getBuildArtifact("a.out")
self.launch(executable=exe)
child = self.child
# Launch the process without a TTY so we don't have to interrupt:
child.sendline("process launch -n")
print("launched process")
child.expect(r"Process ([\d]*) launched:")
print("Got launch message")
child.sendline("quit")
print("sent quit")
child.expect(r".*LLDB will kill one or more processes.*")
# add trailing space to the confirmation.
child.sendline("yEs ")
child.expect(pexpect.EOF, timeout=30)