[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 39/57] vhost-user-test: always use 256 MiB of guest m
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 39/57] vhost-user-test: always use 256 MiB of guest memory |
Date: |
Thu, 7 Mar 2019 18:29:46 +0100 |
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 object
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 <address@hidden>
---
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);
- qemu_cmd = get_qemu_cmd(server, 512, memfd, "", "");
+ qemu_cmd = get_qemu_cmd(server, 256, memfd, "", "");
s = 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);
- cmd = get_qemu_cmd(s, 2, TEST_MEMFD_AUTO, "", "");
+ cmd = get_qemu_cmd(s, 256, TEST_MEMFD_AUTO, "", "");
from = qtest_start(cmd);
g_free(cmd);
@@ -749,10 +749,10 @@ static void test_migrate(void)
}
size = get_log_size(s);
- g_assert_cmpint(size, ==, (2 * 1024 * 1024) / (VHOST_LOG_PAGE * 8));
+ g_assert_cmpint(size, ==, (256 * 1024 * 1024) / (VHOST_LOG_PAGE * 8));
tmp = g_strdup_printf(" -incoming %s", uri);
- cmd = get_qemu_cmd(dest, 2, TEST_MEMFD_AUTO, "", tmp);
+ cmd = get_qemu_cmd(dest, 256, TEST_MEMFD_AUTO, "", tmp);
g_free(tmp);
to = qtest_init(cmd);
g_free(cmd);
@@ -863,7 +863,7 @@ static void test_reconnect_subprocess(void)
char *cmd;
g_thread_new("connect", connect_thread, s);
- cmd = get_qemu_cmd(s, 2, TEST_MEMFD_AUTO, ",server", "");
+ cmd = get_qemu_cmd(s, 256, TEST_MEMFD_AUTO, ",server", "");
qtest_start(cmd);
g_free(cmd);
@@ -908,7 +908,7 @@ static void test_connect_fail_subprocess(void)
s->test_fail = true;
g_thread_new("connect", connect_thread, s);
- cmd = get_qemu_cmd(s, 2, TEST_MEMFD_AUTO, ",server", "");
+ cmd = get_qemu_cmd(s, 256, TEST_MEMFD_AUTO, ",server", "");
qtest_start(cmd);
g_free(cmd);
@@ -941,7 +941,7 @@ static void test_flags_mismatch_subprocess(void)
s->test_flags = TEST_FLAGS_DISCONNECT;
g_thread_new("connect", connect_thread, s);
- cmd = get_qemu_cmd(s, 2, TEST_MEMFD_AUTO, ",server", "");
+ cmd = get_qemu_cmd(s, 256, TEST_MEMFD_AUTO, ",server", "");
qtest_start(cmd);
g_free(cmd);
@@ -982,14 +982,14 @@ static void test_multiqueue(void)
cmd = g_strdup_printf(
QEMU_CMD_MEMFD QEMU_CMD_CHR QEMU_CMD_NETDEV ",queues=%d "
"-device virtio-net-pci,netdev=net0,mq=on,vectors=%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 = g_strdup_printf(
QEMU_CMD_MEM QEMU_CMD_CHR QEMU_CMD_NETDEV ",queues=%d "
"-device virtio-net-pci,netdev=net0,mq=on,vectors=%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);
}
--
1.8.3.1
- [Qemu-devel] [PULL 26/57] tests/libqos: virtio-serial driver and interface nodes, (continued)
- [Qemu-devel] [PULL 26/57] tests/libqos: virtio-serial driver and interface nodes, Paolo Bonzini, 2019/03/07
- [Qemu-devel] [PULL 30/57] tests/libqos: virtio-balloon driver and interface nodes, Paolo Bonzini, 2019/03/07
- [Qemu-devel] [PULL 28/57] tests/libqos: virtio-9p driver and interface nodes, Paolo Bonzini, 2019/03/07
- [Qemu-devel] [PULL 32/57] tests/libqos: virtio-rng driver and interface nodes, Paolo Bonzini, 2019/03/07
- [Qemu-devel] [PULL 33/57] qos-test: virtio-rng test node, Paolo Bonzini, 2019/03/07
- [Qemu-devel] [PULL 34/57] tests/libqos: virtio-blk driver and interface nodes, Paolo Bonzini, 2019/03/07
- [Qemu-devel] [PULL 36/57] tests/libqos: virtio-net driver and interface nodes, Paolo Bonzini, 2019/03/07
- [Qemu-devel] [PULL 37/57] qos-test: virtio-net test node, Paolo Bonzini, 2019/03/07
- [Qemu-devel] [PULL 31/57] tests/qgraph: remove virtio-balloon-test, Paolo Bonzini, 2019/03/07
- [Qemu-devel] [PULL 29/57] qos-test: virtio-9p test node, Paolo Bonzini, 2019/03/07
- [Qemu-devel] [PULL 39/57] vhost-user-test: always use 256 MiB of guest memory,
Paolo Bonzini <=
- [Qemu-devel] [PULL 35/57] qos-test: virtio-blk test node, Paolo Bonzini, 2019/03/07
- [Qemu-devel] [PULL 41/57] tests/libqos: virtio-scsi driver and interface nodes, Paolo Bonzini, 2019/03/07
- [Qemu-devel] [PULL 38/57] tests/libqos: support multiqueue for virtio-net, Paolo Bonzini, 2019/03/07
- [Qemu-devel] [PULL 42/57] qos-test: virtio-scsi test node, Paolo Bonzini, 2019/03/07
- [Qemu-devel] [PULL 40/57] qos-test: vhost-user test node, Paolo Bonzini, 2019/03/07
- [Qemu-devel] [PULL 45/57] qos-test: ac97 test node, Paolo Bonzini, 2019/03/07
- [Qemu-devel] [PULL 43/57] tests/libqos: remove pre-qgraph QVirtioPCIDevice API, Paolo Bonzini, 2019/03/07
- [Qemu-devel] [PULL 44/57] tests: move virtio entirely to qos-test, Paolo Bonzini, 2019/03/07
- [Qemu-devel] [PULL 47/57] qos-test: ipoctal232 test node, Paolo Bonzini, 2019/03/07
- [Qemu-devel] [PULL 48/57] qos-test: ne2k_pci test node, Paolo Bonzini, 2019/03/07