From: Thomas Huth <thuth@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"Daniel P . Berrangé" <berrange@redhat.com>
Subject: [PULL 1/5] tests/migration: Tweek auto converge limits check
Date: Mon, 13 Mar 2023 15:10:53 +0100 [thread overview]
Message-ID: <20230313141057.230810-2-thuth@redhat.com> (raw)
In-Reply-To: <20230313141057.230810-1-thuth@redhat.com>
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Thomas found an autoconverge test failure where the
migration completed before the autoconverge had kicked in.
To try and avoid this again:
a) Reduce the usleep in test_migrate_auto_converge
so that it should exit quicker when autoconverge kicks in
b) Make the loop exit immediately rather than have the sleep
when it does start autoconverge, otherwise the autoconverge
might succeed during the sleep.
c) Reduce inc_pct so auto converge happens more slowly
d) Reduce the max-bandwidth in migrate_ensure_non_converge
to make the ensure more ensure.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20230306152612.52291-1-dgilbert@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/migration-test.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index d4ab3934ed..75d4f1d4a9 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -408,8 +408,8 @@ static void migrate_set_parameter_str(QTestState *who, const char *parameter,
static void migrate_ensure_non_converge(QTestState *who)
{
- /* Can't converge with 1ms downtime + 30 mbs bandwidth limit */
- migrate_set_parameter_int(who, "max-bandwidth", 30 * 1000 * 1000);
+ /* Can't converge with 1ms downtime + 3 mbs bandwidth limit */
+ migrate_set_parameter_int(who, "max-bandwidth", 3 * 1000 * 1000);
migrate_set_parameter_int(who, "downtime-limit", 1);
}
@@ -1808,7 +1808,7 @@ static void test_migrate_auto_converge(void)
* E.g., with 1Gb/s bandwith migration may pass without throttling,
* so we need to decrease a bandwidth.
*/
- const int64_t init_pct = 5, inc_pct = 50, max_pct = 95;
+ const int64_t init_pct = 5, inc_pct = 25, max_pct = 95;
if (test_migrate_start(&from, &to, uri, &args)) {
return;
@@ -1835,13 +1835,16 @@ static void test_migrate_auto_converge(void)
/* Wait for throttling begins */
percentage = 0;
- while (percentage == 0) {
+ do {
percentage = read_migrate_property_int(from, "cpu-throttle-percentage");
- usleep(100);
+ if (percentage != 0) {
+ break;
+ }
+ usleep(20);
g_assert_false(got_stop);
- }
- /* The first percentage of throttling should be equal to init_pct */
- g_assert_cmpint(percentage, ==, init_pct);
+ } while (true);
+ /* The first percentage of throttling should be at least init_pct */
+ g_assert_cmpint(percentage, >=, init_pct);
/* Now, when we tested that throttling works, let it converge */
migrate_ensure_converge(from);
--
2.31.1
next prev parent reply other threads:[~2023-03-13 14:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-13 14:10 [PULL 0/5] s390x and test fixes for 8.0-rc0 Thomas Huth
2023-03-13 14:10 ` Thomas Huth [this message]
2023-03-13 14:10 ` [PULL 2/5] gitlab-ci: Remove job building EDK2 firmware binaries Thomas Huth
2023-03-13 14:10 ` [PULL 3/5] gitlab-ci.d/buildtest: Rework the target list of build-system-alpine Thomas Huth
2023-03-13 14:10 ` [PULL 4/5] target/s390x: Fix emulation of C(G)HRL Thomas Huth
2023-03-13 14:10 ` [PULL 5/5] tests/tcg/s390x: Add C(G)HRL test Thomas Huth
2023-03-14 10:08 ` [PULL 0/5] s390x and test fixes for 8.0-rc0 Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230313141057.230810-2-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=berrange@redhat.com \
--cc=dgilbert@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).