Skip to content

Commit 8b089ce

Browse files
committed
refactor(test): Have Microvm.screen_pid return int instead of str
A PID is an integer, so return it as one. Having it be a string means it cannot be directly passed to things such as `os.kill`. Signed-off-by: Patrick Roy <[email protected]>
1 parent 5c9842c commit 8b089ce

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/framework/microvm.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,9 +490,11 @@ def screen_log(self):
490490
return f"/tmp/screen-{self.screen_session}.log"
491491

492492
@property
493-
def screen_pid(self):
493+
def screen_pid(self) -> Optional[int]:
494494
"""Get the screen PID."""
495-
return self._screen_pid
495+
if self._screen_pid:
496+
return int(self._screen_pid)
497+
return None
496498

497499
def pin_vmm(self, cpu_id: int) -> bool:
498500
"""Pin the firecracker process VMM thread to a cpu list."""

0 commit comments

Comments
 (0)