[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 4/6] tests/migration: Add some slack to auto converge
From: |
Juan Quintela |
Subject: |
[PULL 4/6] tests/migration: Add some slack to auto converge |
Date: |
Thu, 13 Feb 2020 14:20:28 +0100 |
From: "Dr. David Alan Gilbert" <address@hidden>
There's an assert in autoconverge that checks that we quit the
iteration when we go below the expected threshold. Philippe
saw a case where this assert fired with the measured value
slightly over the threshold. (about 3k out of a few million).
I can think of two reasons:
a) Rounding errors
b) That after we make the decision to quit iteration we do one
more sync and that sees a few more dirty pages.
So add 1% slack to the assertion, that should cover a and
most cases of b, probably all we'll see for the test.
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>
---
tests/qtest/migration-test.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index cf27ebbc9d..a78ac0c7da 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -1237,7 +1237,8 @@ static void test_migrate_auto_converge(void)
g_assert_cmpint(percentage, <=, max_pct);
remaining = read_ram_property_int(from, "remaining");
- g_assert_cmpint(remaining, <, expected_threshold);
+ g_assert_cmpint(remaining, <,
+ (expected_threshold + expected_threshold / 100));
migrate_continue(from, "pre-switchover");
--
2.24.1
- [PULL 0/6] Pull migration patches, Juan Quintela, 2020/02/13
- [PULL 1/6] migration: Maybe VM is paused when migration is cancelled, Juan Quintela, 2020/02/13
- [PULL 2/6] migration: Optimization about wait-unplug migration state, Juan Quintela, 2020/02/13
- [PULL 3/6] migration/rdma: rdma_accept_incoming_migration fix error handling, Juan Quintela, 2020/02/13
- [PULL 4/6] tests/migration: Add some slack to auto converge,
Juan Quintela <=
- [PULL 5/6] migration-test: fix some memleaks in migration-test, Juan Quintela, 2020/02/13
- [PULL 6/6] git: Make submodule check only needed modules, Juan Quintela, 2020/02/13
- Re: [PULL 0/6] Pull migration patches, Peter Maydell, 2020/02/14