Skip to content

Commit 4f26549

Browse files
committed
refactor(test): set Microvm.uffd_handler from restore_from_snapshot
It's a bit weird to have this attribute set from outside the microvm class. Signed-off-by: Patrick Roy <[email protected]>
1 parent 5a762e2 commit 4f26549

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

tests/framework/microvm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ def restore_from_snapshot(
986986
jailed_snapshot = snapshot.copy_to_chroot(Path(self.chroot()))
987987

988988
if uffd_handler_name:
989-
spawn_pf_handler(
989+
self.uffd_handler = spawn_pf_handler(
990990
self,
991991
uffd_handler(uffd_handler_name, binary_dir=self.fc_binary_path.parent),
992992
jailed_snapshot,

tests/framework/utils_uffd.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ def spawn_pf_handler(vm, handler_path, jailed_snapshot):
9494
handler_name, SOCKET_PATH, jailed_snapshot, vm.chroot(), "uffd.log"
9595
)
9696
uffd_handler.spawn(vm.jailer.uid, vm.jailer.gid)
97-
vm.uffd_handler = uffd_handler
9897

9998
return uffd_handler
10099

0 commit comments

Comments
 (0)