Skip to content

Commit 8014251

Browse files
authored
Added commands to kill crosvm and run_cvd processes (#4632)
Adds 'pkill crosvm' and 'pkill run_cvd' commands to stop_cuttlefish_device function to ensure complete shutdown of cuttlefish device.
1 parent 0180d11 commit 8014251

File tree

1 file changed

+7
-0
lines changed
  • src/clusterfuzz/_internal/platforms/android

1 file changed

+7
-0
lines changed

src/clusterfuzz/_internal/platforms/android/adb.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
GET_DEVICE_STATE_TIMEOUT = 20
5353
STOP_CVD_WAIT = 20
5454
LAUNCH_CVD_TIMEOUT = 2700
55+
CMD_KILL_CROSVM = 'pkill crosvm'
56+
CMD_KILL_RUN_CVD = 'pkill run_cvd'
5557

5658
# Output patterns to parse "lsusb" output.
5759
LSUSB_BUS_RE = re.compile(r'Bus\s+(\d+)\s+Device\s+(\d+):.*')
@@ -448,6 +450,11 @@ def stop_cuttlefish_device():
448450
stop_cvd_cmd, timeout=RECOVERY_CMD_TIMEOUT, on_cuttlefish_host=True)
449451
time.sleep(STOP_CVD_WAIT)
450452

453+
execute_command(
454+
CMD_KILL_CROSVM, timeout=RECOVERY_CMD_TIMEOUT, on_cuttlefish_host=True)
455+
execute_command(
456+
CMD_KILL_RUN_CVD, timeout=RECOVERY_CMD_TIMEOUT, on_cuttlefish_host=True)
457+
451458

452459
def restart_cuttlefish_device():
453460
"""Restarts the cuttlefish device."""

0 commit comments

Comments
 (0)