[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 53/71] vhost-user-test: always use 256 MiB of guest
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 53/71] vhost-user-test: always use 256 MiB of guest memory |
Date: |
Mon, 3 Dec 2018 16:33:06 +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 0c9a79a..f135052 100644
--- a/tests/vhost-user-test.c
+++ b/tests/vhost-user-test.c
@@ -694,7 +694,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);
@@ -729,7 +729,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);
@@ -739,10 +739,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);
@@ -852,7 +852,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);
@@ -894,7 +894,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);
@@ -927,7 +927,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);
@@ -968,14 +968,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] [PATCH 44/71] tests/libqos: virtio-balloon driver and interface nodes, (continued)
- [Qemu-devel] [PATCH 44/71] tests/libqos: virtio-balloon driver and interface nodes, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 43/71] qos-test: virtio-9p test node, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 45/71] tests/qgraph: remove virtio-balloon-test, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 47/71] qos-test: virtio-rng test node, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 46/71] tests/libqos: virtio-rng driver and interface nodes, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 48/71] tests/libqos: virtio-blk driver and interface nodes, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 49/71] qos-test: virtio-blk test node, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 51/71] qos-test: virtio-net test node, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 50/71] tests/libqos: virtio-net driver and interface nodes, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 52/71] tests/libqos: support multiqueue for virtio-net, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 53/71] vhost-user-test: always use 256 MiB of guest memory,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 54/71] qos-test: vhost-user test node, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 55/71] tests/libqos: virtio-scsi driver and interface nodes, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 56/71] qos-test: virtio-scsi test node, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 58/71] tests: move virtio entirely to qos-test, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 57/71] tests/libqos: remove pre-qgraph QVirtioPCIDevice API, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 59/71] qos-test: ac97 test node, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 60/71] qos-test: tpci200 test node, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 61/71] qos-test: ipoctal232 test node, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 62/71] qos-test: ne2k_pci test node, Paolo Bonzini, 2018/12/03
- [Qemu-devel] [PATCH 63/71] qos-test: nvme test node, Paolo Bonzini, 2018/12/03