From b36ed5a90f93e6f951eb574bd62a78756aaca2a6 Mon Sep 17 00:00:00 2001 From: Hu Shuai Date: Thu, 15 Jun 2023 15:04:24 +0800 Subject: [PATCH] backingchain: slow down the process of blockcommit to check for allocation changes The blockcommit runs too fast with the default set, limiting the bandwidth to 10 MiB/s in order to observe the allocation change process Signed-off-by: Hu Shuai --- .../check_allocation_watermark_during_blockcommit.cfg | 4 ++-- .../check_allocation_watermark_during_blockcommit.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libvirt/tests/cfg/backingchain/blockcommit/check_allocation_watermark_during_blockcommit.cfg b/libvirt/tests/cfg/backingchain/blockcommit/check_allocation_watermark_during_blockcommit.cfg index 2be2bf3080..5609f7f89a 100644 --- a/libvirt/tests/cfg/backingchain/blockcommit/check_allocation_watermark_during_blockcommit.cfg +++ b/libvirt/tests/cfg/backingchain/blockcommit/check_allocation_watermark_during_blockcommit.cfg @@ -9,10 +9,10 @@ virsh_opt = " -k0" variants case: - inactive_layer: - commit_option = "--top ${target_disk}[3] --base ${target_disk}[1] --wait --verbose" + commit_option = "--top ${target_disk}[3] --base ${target_disk}[1] --wait --verbose --bandwidth 10" commit_success_msg = "Commit complete" - active_layer: - commit_option = " --wait --verbose --pivot " + commit_option = " --wait --verbose --pivot --bandwidth 10" commit_success_msg = "Successfully pivoted" variants: - file_disk: diff --git a/libvirt/tests/src/backingchain/blockcommit/check_allocation_watermark_during_blockcommit.py b/libvirt/tests/src/backingchain/blockcommit/check_allocation_watermark_during_blockcommit.py index 49bb067a78..1bed6dfcd7 100644 --- a/libvirt/tests/src/backingchain/blockcommit/check_allocation_watermark_during_blockcommit.py +++ b/libvirt/tests/src/backingchain/blockcommit/check_allocation_watermark_during_blockcommit.py @@ -84,6 +84,7 @@ def run_test(): test.fail("%s should keep changing during blockcommit %s." % ( disappear_alloc, virsh_session.get_stripped_output())) alloc_dict = alloc_new_dict + time.sleep(1) test.log.info("TEST_STEP3: Check %s should disappear" % disappear_alloc) if utils_misc.wait_for(lambda: commit_success_msg in