Skip to content

Commit d78fb96

Browse files
committed
test: hugepages: use SSHConnection.check_output instead of run
Seems like it got missed during the big refactor that introduced `check_output` somehow. Fixes: acbef3c Signed-off-by: Patrick Roy <[email protected]>
1 parent 7a8148b commit d78fb96

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

tests/integration_tests/performance/test_huge_pages.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,7 @@ def test_hugetlbfs_diff_snapshot(microvm_factory, uvm_plain, uffd_handler_paths)
128128
uvm_plain.resume()
129129

130130
# Run command to dirty some pages
131-
rc, _, _ = uvm_plain.ssh.run("sync")
132-
assert not rc
131+
uvm_plain.ssh.check_output("sync")
133132

134133
snapshot_diff = uvm_plain.snapshot_diff()
135134
snapshot_merged = snapshot_diff.rebase_snapshot(base_snapshot)
@@ -181,13 +180,11 @@ def test_ept_violation_count(
181180

182181
# Wait for microvm to boot. Then spawn fast_page_fault_helper to setup an environment where we can trigger
183182
# a lot of fast_page_faults after restoring the snapshot.
184-
rc, _, _ = vm.ssh.run(
183+
vm.ssh.check_output(
185184
"nohup /usr/local/bin/fast_page_fault_helper >/dev/null 2>&1 </dev/null &"
186185
)
187-
assert not rc
188186

189-
rc, pid, _ = vm.ssh.run("pidof fast_page_fault_helper")
190-
assert not rc
187+
_, pid, _ = vm.ssh.check_output("pidof fast_page_fault_helper")
191188

192189
# Give the helper time to initialize
193190
time.sleep(5)
@@ -211,8 +208,7 @@ def test_ept_violation_count(
211208
vm.restore_from_snapshot(snapshot, resume=True, uffd_path=SOCKET_PATH)
212209

213210
# Verify if guest can run commands, and also wake up the fast page fault helper to trigger page faults.
214-
rc, _, _ = vm.ssh.run(f"kill -s {signal.SIGUSR1} {pid}")
215-
assert not rc
211+
vm.ssh.check_output(f"kill -s {signal.SIGUSR1} {pid}")
216212

217213
# Give the helper time to touch all its pages
218214
time.sleep(5)

0 commit comments

Comments
 (0)