Received: from eggs.gnu.org ([209.51.188.92]:49317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hDmV3-00044C-07 for qemu-devel@nongnu.org; Tue, 09 Apr 2019 04:53:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hDmV2-0002u0-3a for qemu-devel@nongnu.org; Tue, 09 Apr 2019 04:53:00 -0400 From: Thomas Huth Date: Tue, 9 Apr 2019 10:52:42 +0200 Message-Id: <20190409085245.31548-3-thuth@redhat.com> In-Reply-To: <20190409085245.31548-1-thuth@redhat.com> References: <20190409085245.31548-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH for-4.1 2/5] tests/megasas: Make test independent of global_qtest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: lvivier@redhat.com, Paolo Bonzini , John Snow , qemu-block@nongnu.org, armbru@redhat.com, Thomas Huth , "Dr. David Alan Gilbert" , eblake@redhat.com, Hannes Reinecke The test uses memwrite() and thus relies on global_qtest. Let's replace i= t with qtest_memwrite(), so that we are independent from global_qtest here. Signed-off-by: Thomas Huth --- tests/megasas-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/megasas-test.c b/tests/megasas-test.c index 33aa97042c..1111d331d3 100644 --- a/tests/megasas-test.c +++ b/tests/megasas-test.c @@ -66,7 +66,7 @@ static void megasas_pd_get_info_fuzz(void *obj, void *d= ata, QGuestAllocator *all context[7] =3D cpu_to_le32(0); =20 context_pa =3D guest_alloc(alloc, sizeof(context)); - memwrite(context_pa, context, sizeof(context)); + qtest_memwrite(dev->bus->qts, context_pa, context, sizeof(context)); qpci_io_writel(dev, bar, 0x40, context_pa); } =20 --=20 2.21.0