From 0f555602c7430ae55b5a4bacf39ce9e483e11193 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 12 Dec 2019 02:17:58 +0100 Subject: tests: use g_test_rand_int g_test_rand_int provides a reproducible random integer number, using a different number seed every time but allowing reproduction using the --seed command line option. It is thus better suited to tests than g_random_int or random. Signed-off-by: Paolo Bonzini Message-Id: <1576113478-42926-1-git-send-email-pbonzini@redhat.com> Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Signed-off-by: Thomas Huth --- tests/test-qga.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/test-qga.c') diff --git a/tests/test-qga.c b/tests/test-qga.c index 1ca49bb..d2b2435 100644 --- a/tests/test-qga.c +++ b/tests/test-qga.c @@ -143,7 +143,7 @@ static void qmp_assertion_message_error(const char *domain, static void test_qga_sync_delimited(gconstpointer fix) { const TestFixture *fixture = fix; - guint32 v, r = g_random_int(); + guint32 v, r = g_test_rand_int(); unsigned char c; QDict *ret; @@ -186,7 +186,7 @@ static void test_qga_sync_delimited(gconstpointer fix) static void test_qga_sync(gconstpointer fix) { const TestFixture *fixture = fix; - guint32 v, r = g_random_int(); + guint32 v, r = g_test_rand_int(); QDict *ret; /* -- cgit v1.1