Skip to content

Commit 11b2675

Browse files
committed
test: store uffd handler in microvm attribute
So that we can later refer to it in tests, for example to parse its logs. Signed-off-by: Patrick Roy <[email protected]>
1 parent a589520 commit 11b2675

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

tests/framework/microvm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ def __init__(
201201
self.ssh_key = None
202202
self.initrd_file = None
203203
self.boot_args = None
204+
self.uffd_handler = None
204205

205206
self.fc_binary_path = Path(fc_binary_path)
206207
assert fc_binary_path.exists()

tests/framework/utils_uffd.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ def spawn_pf_handler(vm, handler_path, mem_path):
8989
handler_name, SOCKET_PATH, jailed_mem, vm.chroot(), "uffd.log"
9090
)
9191
uffd_handler.spawn(vm.jailer.uid, vm.jailer.gid)
92+
vm.uffd_handler = uffd_handler
9293

9394
return uffd_handler
9495

0 commit comments

Comments
 (0)