From 0f06c00c840738198483e0d30209dbbb4d1f2fcd Mon Sep 17 00:00:00 2001 From: Nikita Kalyazin Date: Tue, 19 Aug 2025 12:26:50 +0000 Subject: [PATCH 1/2] test(diff_snapshot_works_after_error): do not rely on log Since we deliberately create a condition of no space, it is not guaranteed that Firecracker is able to produce complete log messages. Use the API error message instead. Signed-off-by: Nikita Kalyazin --- .../functional/test_snapshot_not_losing_dirty_pages.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tests/integration_tests/functional/test_snapshot_not_losing_dirty_pages.py b/tests/integration_tests/functional/test_snapshot_not_losing_dirty_pages.py index 79366f13f0b..fb18d333e73 100644 --- a/tests/integration_tests/functional/test_snapshot_not_losing_dirty_pages.py +++ b/tests/integration_tests/functional/test_snapshot_not_losing_dirty_pages.py @@ -51,13 +51,8 @@ def test_diff_snapshot_works_after_error( subprocess.check_call(f"fallocate -l {target_size} {fill}", shell=True) - try: + with pytest.raises(RuntimeError, match="No space left on device"): uvm.snapshot_diff() - except RuntimeError: - msg = "No space left on device" - uvm.check_log_message(msg) - else: - assert False, "This should fail" fill.unlink() From 10fb1fc2728e853f7f4b19862c6ac7d0295c319c Mon Sep 17 00:00:00 2001 From: Nikita Kalyazin Date: Tue, 19 Aug 2025 12:28:17 +0000 Subject: [PATCH 2/2] test(diff_snapshot_works_after_error): disable api timing check Since we deliberately create a condition of no space, it is not guaranteed that Firecracker is able to produce complete log messages. Signed-off-by: Nikita Kalyazin --- .../functional/test_snapshot_not_losing_dirty_pages.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integration_tests/functional/test_snapshot_not_losing_dirty_pages.py b/tests/integration_tests/functional/test_snapshot_not_losing_dirty_pages.py index fb18d333e73..8e7bad0f0d5 100644 --- a/tests/integration_tests/functional/test_snapshot_not_losing_dirty_pages.py +++ b/tests/integration_tests/functional/test_snapshot_not_losing_dirty_pages.py @@ -37,6 +37,7 @@ def test_diff_snapshot_works_after_error( ) vm_mem_size = 128 + uvm.time_api_requests = False # The log may be incomplete due to lack of space uvm.spawn() uvm.basic_config(mem_size_mib=vm_mem_size, track_dirty_pages=True) uvm.add_net_iface()