From nobody Sun Feb 8 14:30:52 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1640021315; cv=none; d=zohomail.com; s=zohoarc; b=WdJZQ+LyF8Hlm4ojn2ytRJp0QzkHQFGoYb0ZZ/4WPP5chPg7ict9ypSyvEvX2rGbCsGufV+1YWsqJziJU1WL8FEjzX1JLg94TSOSkkATkr6Cxp/X/x54JKvthL+iBPk0rJDhL9QEjPbl/4jbgVj3zrqk5Ws8MfR7Wq4Z2Tmfoss= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640021315; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=3AwsPpgUuSNdDlOl1kFET+xP37V/yny9GnpG+Bw2PTE=; b=L6UJVI+EsO2XlfYiiIWvAeiFZTzk6e1+p9XhdopMyOmBBggbDN1LRdmpi8EedFt9X1OpXPi5JsaQ6i+Pdw5roEW7Pd7REr4l4xM0jOhEi3SWiUDCdKd+RPJ/EPQRG9l3CgyrmAtTwLdlCUWHePhKEX+fwORNU/NLNflySrFQeg4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1640021315185838.3568205775538; Mon, 20 Dec 2021 09:28:35 -0800 (PST) Received: from localhost ([::1]:37174 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzMSg-0002kL-8D for importer@patchew.org; Mon, 20 Dec 2021 12:28:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzKvQ-0008H3-Ok for qemu-devel@nongnu.org; Mon, 20 Dec 2021 10:50:08 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:40168) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzKvN-000475-8x for qemu-devel@nongnu.org; Mon, 20 Dec 2021 10:50:08 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-169-s-BxXuQDMXywehvCAfRYJg-1; Mon, 20 Dec 2021 05:28:03 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3D4811800D50 for ; Mon, 20 Dec 2021 10:28:02 +0000 (UTC) Received: from thuth.com (dhcp-192-183.str.redhat.com [10.33.192.183]) by smtp.corp.redhat.com (Postfix) with ESMTP id 48E614ABAD; Mon, 20 Dec 2021 10:28:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640015404; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3AwsPpgUuSNdDlOl1kFET+xP37V/yny9GnpG+Bw2PTE=; b=P7s9MFg5LWz6HntvObIPLbeReLiONWlKRpC+OESVFwC8aY/eqcZlh9KfXuBXk2gRg+hIpP Ug0JllVxEvzRZ/+SaEe22V3ctkHKW/OVkGd/38X8a0yl1caOhqXJmf4kguddSz+yLRMAfr 9lYBdc3X0V3xNoDkOyjEMBrjCA31qAk= X-MC-Unique: s-BxXuQDMXywehvCAfRYJg-1 From: Thomas Huth To: qemu-devel@nongnu.org, Laurent Vivier Subject: [PATCH] tests/qtest/virtio-net-failover: Use g_random_int() instead of g_test_rand_int() Date: Mon, 20 Dec 2021 11:27:59 +0100 Message-Id: <20211220102759.311224-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.209, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640021316212100001 g_test_rand_int() must not be called before g_test_init(), otherwise the glib will show a "g_rand_int: assertion 'rand !=3D NULL' failed" message in the log. So we could change the order here, but actually, g_test_rand_int() seems also the wrong choice here, since we're using it to create a temporary file name, which certainly should not depend on the "--seed" CLI option of the g_test suite. Thus let's use the g_random_int() function instead. Reported-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- tests/qtest/virtio-net-failover.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/virtio-net-failover.c b/tests/qtest/virtio-net-fai= lover.c index 4b2ba8a106..70b94bf18f 100644 --- a/tests/qtest/virtio-net-failover.c +++ b/tests/qtest/virtio-net-failover.c @@ -1308,7 +1308,7 @@ int main(int argc, char **argv) { const gchar *tmpdir =3D g_get_tmp_dir(); gchar *tmpfile =3D g_strdup_printf("%s/failover_test_migrate-%u-%u", - tmpdir, getpid(), g_test_rand_int()); + tmpdir, getpid(), g_random_int()); int ret; =20 g_test_init(&argc, &argv, NULL); --=20 2.27.0