From nobody Sun Nov 9 22:26:49 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1551981505312878.2278778006443; Thu, 7 Mar 2019 09:58:25 -0800 (PST) Received: from localhost ([127.0.0.1]:56472 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1xHi-0000hz-AU for importer@patchew.org; Thu, 07 Mar 2019 12:58:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1wr6-0003Yt-F7 for qemu-devel@nongnu.org; Thu, 07 Mar 2019 12:30:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h1wr5-0008Np-Gk for qemu-devel@nongnu.org; Thu, 07 Mar 2019 12:30:52 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:45220) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h1wr5-0008Mx-8O for qemu-devel@nongnu.org; Thu, 07 Mar 2019 12:30:51 -0500 Received: by mail-wr1-x436.google.com with SMTP id w17so18399344wrn.12 for ; Thu, 07 Mar 2019 09:30:51 -0800 (PST) Received: from 640k.localdomain ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id d206sm9979753wmc.11.2019.03.07.09.30.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Mar 2019 09:30:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=u8iIezkWn7T/enQENb6Ms0kkFpoH/Vshk52lH6nhSt4=; b=MlYokvKPq2roH4b7NAbBW6nzjNxKL3AItK9/YwWxj+NQwu9ZMueAk7zntSA5PUtmr6 8M2Ad1Dn2OWR2eHj4/VCihy5jTiMe6ZrQp0dcGqhGuhHAtnVuG/2eVBmlh17ExFDcwkB WPMiP4KFgyyh+LD9dlEs1R2J3bKGsuL3SYiiGg+B/F2BvdbFK1YDdQTIv6iWdyFJ/M6l eQfgiGAM1a2rjTmEdl9iQn6pc+SG5e38V0CcPcHbl6dHZSPIE6xsyjNKYK6yp39bEUEa cKeyT5Uqqb8reCN2KtOCy5cnT/TCkWOeapSM/tjyt0l2PcOwG5+VrZrUgVxCU39xAgYU NmKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=u8iIezkWn7T/enQENb6Ms0kkFpoH/Vshk52lH6nhSt4=; b=ZhydrojLol8lFrcDURSRCpS0BEj/ohrxK05JTlDcz3mBjggPKevSCoNWUfnTs+/Ri2 QqHTWzOfJmoz8WRQEGqwi/2ejHjl3ey3/sUGcjuNGoZVBwnf2WKTYvR4wIDq8rxOQ16L 4DzvJZ4RX1S2+tcOE+NnHk2rVsRxRjvs3oZDc2SPSZ+jEKc/XYBGLkfRK5HmFlHnqkH6 ujKjotwf3MCofL0v65bUASqyHhX5f4HgYeMvMruQb1yDN1e0B4hAU1B7q70Y0LRLFgEu aJU/KzbaMX07oBANswWwLdLANNXPfcGInmtKhdvIJdWh3Y1MZOly0/KFPTIkqya8vaNd v+cw== X-Gm-Message-State: APjAAAWVjiNF+KyypjZQbfEyIWr1guYot97ltGWRrxB36eOkvGQpsjCs 1jXbHlJUIBHVFu60x3ojEgJbnANj X-Google-Smtp-Source: APXvYqytTMAAf0ZAkNJCOUCWKXUFA2YWTXNmQ73NUp+pBQokw02qI9pB0HxZeieL62590BHr1HwgHg== X-Received: by 2002:adf:ce91:: with SMTP id r17mr7366633wrn.80.1551979849919; Thu, 07 Mar 2019 09:30:49 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 7 Mar 2019 18:29:46 +0100 Message-Id: <1551979804-6060-40-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1551979804-6060-1-git-send-email-pbonzini@redhat.com> References: <1551979804-6060-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::436 Subject: [Qemu-devel] [PULL 39/57] vhost-user-test: always use 256 MiB of guest memory X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, lviver@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Some tests are using a small amount of RAM for the guest (2 MiB) in order to save host memory, others are using 512 MiB. However, pSeries machines only support multiples of 256 MiB. Using 256 MiB of memory does not use more host memory than now, even for the migration test that starts two guests, and it allows running the test on pSeries too. This of course is not optimal, it would be nice to let the qgraph machine o= bject judge how much memory to provide. This is left for future work, together with a more generic framework that wraps the QEMU command line. Signed-off-by: Paolo Bonzini --- tests/vhost-user-test.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index b1414e2..2a67a99 100644 --- a/tests/vhost-user-test.c +++ b/tests/vhost-user-test.c @@ -704,7 +704,7 @@ static void test_read_guest_mem(const void *arg) "read-guest-memfd" : "read-guest-mem"); test_server_listen(server); =20 - qemu_cmd =3D get_qemu_cmd(server, 512, memfd, "", ""); + qemu_cmd =3D get_qemu_cmd(server, 256, memfd, "", ""); =20 s =3D qtest_start(qemu_cmd); g_free(qemu_cmd); @@ -739,7 +739,7 @@ static void test_migrate(void) test_server_listen(s); test_server_listen(dest); =20 - cmd =3D get_qemu_cmd(s, 2, TEST_MEMFD_AUTO, "", ""); + cmd =3D get_qemu_cmd(s, 256, TEST_MEMFD_AUTO, "", ""); from =3D qtest_start(cmd); g_free(cmd); =20 @@ -749,10 +749,10 @@ static void test_migrate(void) } =20 size =3D get_log_size(s); - g_assert_cmpint(size, =3D=3D, (2 * 1024 * 1024) / (VHOST_LOG_PAGE * 8)= ); + g_assert_cmpint(size, =3D=3D, (256 * 1024 * 1024) / (VHOST_LOG_PAGE * = 8)); =20 tmp =3D g_strdup_printf(" -incoming %s", uri); - cmd =3D get_qemu_cmd(dest, 2, TEST_MEMFD_AUTO, "", tmp); + cmd =3D get_qemu_cmd(dest, 256, TEST_MEMFD_AUTO, "", tmp); g_free(tmp); to =3D qtest_init(cmd); g_free(cmd); @@ -863,7 +863,7 @@ static void test_reconnect_subprocess(void) char *cmd; =20 g_thread_new("connect", connect_thread, s); - cmd =3D get_qemu_cmd(s, 2, TEST_MEMFD_AUTO, ",server", ""); + cmd =3D get_qemu_cmd(s, 256, TEST_MEMFD_AUTO, ",server", ""); qtest_start(cmd); g_free(cmd); =20 @@ -908,7 +908,7 @@ static void test_connect_fail_subprocess(void) =20 s->test_fail =3D true; g_thread_new("connect", connect_thread, s); - cmd =3D get_qemu_cmd(s, 2, TEST_MEMFD_AUTO, ",server", ""); + cmd =3D get_qemu_cmd(s, 256, TEST_MEMFD_AUTO, ",server", ""); qtest_start(cmd); g_free(cmd); =20 @@ -941,7 +941,7 @@ static void test_flags_mismatch_subprocess(void) =20 s->test_flags =3D TEST_FLAGS_DISCONNECT; g_thread_new("connect", connect_thread, s); - cmd =3D get_qemu_cmd(s, 2, TEST_MEMFD_AUTO, ",server", ""); + cmd =3D get_qemu_cmd(s, 256, TEST_MEMFD_AUTO, ",server", ""); qtest_start(cmd); g_free(cmd); =20 @@ -982,14 +982,14 @@ static void test_multiqueue(void) cmd =3D g_strdup_printf( QEMU_CMD_MEMFD QEMU_CMD_CHR QEMU_CMD_NETDEV ",queues=3D%d " "-device virtio-net-pci,netdev=3Dnet0,mq=3Don,vectors=3D%d", - 512, 512, s->chr_name, + 256, 256, s->chr_name, s->socket_path, "", s->chr_name, s->queues, s->queues * 2 + 2); } else { cmd =3D g_strdup_printf( QEMU_CMD_MEM QEMU_CMD_CHR QEMU_CMD_NETDEV ",queues=3D%d " "-device virtio-net-pci,netdev=3Dnet0,mq=3Don,vectors=3D%d", - 512, 512, s->mem_path, s->chr_name, + 256, 256, s->mem_path, s->chr_name, s->socket_path, "", s->chr_name, s->queues, s->queues * 2 + 2); } --=20 1.8.3.1