diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2025-09-02 12:06:46 +0200 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2025-09-02 12:06:46 +0200 |
commit | 0a028b5e1dd2f02ba3d1f2a7825ce40b6eb559ec (patch) | |
tree | 0f17da97d5a8e269369833992e6781a6b77f0c25 /tests | |
parent | a1a98f3ed8cc9889c476120166c9d01e7706e938 (diff) | |
parent | c9a1ea9c52e6462ad5c7814f3abd65baa69dc4ce (diff) | |
download | qemu-0a028b5e1dd2f02ba3d1f2a7825ce40b6eb559ec.zip qemu-0a028b5e1dd2f02ba3d1f2a7825ce40b6eb559ec.tar.gz qemu-0a028b5e1dd2f02ba3d1f2a7825ce40b6eb559ec.tar.bz2 |
Merge tag 'pull-tests-2025-09-01' of https://repo.or.cz/qemu/armbru into staging
Testing patches for 2025-09-01
# -----BEGIN PGP SIGNATURE-----
#
# iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmi1iOoSHGFybWJydUBy
# ZWRoYXQuY29tAAoJEDhwtADrkYZTT6QQAJ++4yNqGAtpYGvY7HHe7UIgA9s6kYMt
# aeIjVibzBFJCGX89etKpDX9IBHXl77kZEl1O84In9WDlvVC364uVaiL5DrPHLizR
# Xu+Jp6P88AXCqvgbfS5N/nYpT5I5+SGYYanDsLMyG9EtRSh+HrJEA364/pAq4ORu
# 1cm2naus2tkqVwIP/2i4B15iQT2awG0Ha0jI/22RmMlKDNyl1Mwx5P05DYFNxFRO
# XqwbEoigNc+UtZOyaj2uHLRDHTwXp+ylzqCo4FvSaF/ij/Gsu+elgJktDF7Hivop
# g0EXum3VEdhzT72sDcUa/4AbaATSD+9Iblg0XjkRTncYOO9jDnV3V/n8ffa3vSEM
# rYGGdgw5oLpjqcQp+fNlDPcF6c6o7uSZU6zl1DOSYJhge7r7pO5VnIPNydZxaU4J
# rHjLQT2rX1ISRe2k0RrXA8dy6Ld5W54XGBo9QLUH99sh1LKYZsUvCZ5P1N0g6Fe0
# obD3Y8+pR3VvMNQIx5+D12A3nijZpXSSDFdsSy1qXwnOZ/ODXXkmWqZK1cEExH4B
# EljiU+tlenUDg6N6q0fy5p3t/GBrbim9ZCjtJWJ5lNzySZP7fI0xMt5MzcKlLROq
# sYjABXG4lo/6c8SW5j+3+DN48DwQ/ct2Aa7FR5fOyW7NYpJDxxiyVoTEmE7Wyii1
# 79YqCNPkSEy5
# =L7VP
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 01 Sep 2025 01:52:10 PM CEST
# gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg: issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [unknown]
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [unknown]
# gpg: WARNING: The key's User ID is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* tag 'pull-tests-2025-09-01' of https://repo.or.cz/qemu/armbru:
Revert "tests/qtest: use qos_printf instead of g_test_message"
MAINTAINERS: Cover tests/qtest/qom-test.c
qtest/qom-test: Don't bother to execute QMP command quit
qtest/qom-test: Traverse entire QOM tree
qtest/qom-test: Shallow testing of qom-list / qom-get
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/qtest/qom-test.c | 8 | ||||
-rw-r--r-- | tests/qtest/qos-test.c | 5 | ||||
-rw-r--r-- | tests/qtest/vhost-user-test.c | 27 |
3 files changed, 15 insertions, 25 deletions
diff --git a/tests/qtest/qom-test.c b/tests/qtest/qom-test.c index 4ade1c7..2da9918 100644 --- a/tests/qtest/qom-test.c +++ b/tests/qtest/qom-test.c @@ -180,7 +180,7 @@ static void test_properties(QTestState *qts, const char *path, bool recurse) links = g_slist_delete_link(links, links); } while (children) { - test_properties(qts, children->data, true); + test_properties(qts, children->data, g_test_slow()); g_free(children->data); children = g_slist_delete_link(children, children); } @@ -211,14 +211,10 @@ static void test_machine(gconstpointer data) test_properties(qts, "/machine", true); - qlist_append_str(paths, "/machine"); + qlist_append_str(paths, "/"); test_list_get(qts, paths); test_list_get_value(qts); - response = qtest_qmp(qts, "{ 'execute': 'quit' }"); - g_assert(qdict_haskey(response, "return")); - qobject_unref(response); - qtest_quit(qts); g_free((void *)machine); } diff --git a/tests/qtest/qos-test.c b/tests/qtest/qos-test.c index abfd4b9..00f39f3 100644 --- a/tests/qtest/qos-test.c +++ b/tests/qtest/qos-test.c @@ -328,11 +328,6 @@ static void walk_path(QOSGraphNode *orig_path, int len) int main(int argc, char **argv, char** envp) { g_test_init(&argc, &argv, NULL); - - if (g_test_subprocess()) { - qos_printf("qos_test running single test in subprocess\n"); - } - if (g_test_verbose()) { qos_printf("ENVIRONMENT VARIABLES: {\n"); for (char **env = envp; *env != 0; env++) { diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost-user-test.c index 75cb3e4..56472ca 100644 --- a/tests/qtest/vhost-user-test.c +++ b/tests/qtest/vhost-user-test.c @@ -26,7 +26,6 @@ #include "libqos/virtio-pci.h" #include "libqos/malloc-pc.h" -#include "libqos/qgraph_internal.h" #include "hw/virtio/virtio-net.h" #include "standard-headers/linux/vhost_types.h" @@ -345,7 +344,7 @@ static void chr_read(void *opaque, const uint8_t *buf, int size) } if (size != VHOST_USER_HDR_SIZE) { - qos_printf("%s: Wrong message size received %d\n", __func__, size); + g_test_message("Wrong message size received %d", size); return; } @@ -356,8 +355,8 @@ static void chr_read(void *opaque, const uint8_t *buf, int size) p += VHOST_USER_HDR_SIZE; size = qemu_chr_fe_read_all(chr, p, msg.size); if (size != msg.size) { - qos_printf("%s: Wrong message size received %d != %d\n", - __func__, size, msg.size); + g_test_message("Wrong message size received %d != %d", + size, msg.size); goto out; } } @@ -393,7 +392,7 @@ static void chr_read(void *opaque, const uint8_t *buf, int size) * We don't need to do anything here, the remote is just * letting us know it is in charge. Just log it. */ - qos_printf("set_owner: start of session\n"); + g_test_message("set_owner: start of session\n"); break; case VHOST_USER_GET_PROTOCOL_FEATURES: @@ -419,7 +418,7 @@ static void chr_read(void *opaque, const uint8_t *buf, int size) * the remote end to send this. There is no handshake reply so * just log the details for debugging. */ - qos_printf("set_protocol_features: 0x%"PRIx64 "\n", msg.payload.u64); + g_test_message("set_protocol_features: 0x%"PRIx64 "\n", msg.payload.u64); break; /* @@ -427,11 +426,11 @@ static void chr_read(void *opaque, const uint8_t *buf, int size) * address of the vrings but we can simply report them. */ case VHOST_USER_SET_VRING_NUM: - qos_printf("set_vring_num: %d/%d\n", + g_test_message("set_vring_num: %d/%d\n", msg.payload.state.index, msg.payload.state.num); break; case VHOST_USER_SET_VRING_ADDR: - qos_printf("set_vring_addr: 0x%"PRIx64"/0x%"PRIx64"/0x%"PRIx64"\n", + g_test_message("set_vring_addr: 0x%"PRIx64"/0x%"PRIx64"/0x%"PRIx64"\n", msg.payload.addr.avail_user_addr, msg.payload.addr.desc_user_addr, msg.payload.addr.used_user_addr); @@ -464,7 +463,7 @@ static void chr_read(void *opaque, const uint8_t *buf, int size) case VHOST_USER_SET_VRING_CALL: /* consume the fd */ if (!qemu_chr_fe_get_msgfds(chr, &fd, 1) && fd < 0) { - qos_printf("call fd: %d, do not set non-blocking\n", fd); + g_test_message("call fd: %d, do not set non-blocking\n", fd); break; } /* @@ -510,12 +509,12 @@ static void chr_read(void *opaque, const uint8_t *buf, int size) * fully functioning vhost-user we would enable/disable the * vring monitoring. */ - qos_printf("set_vring(%d)=%s\n", msg.payload.state.index, + g_test_message("set_vring(%d)=%s\n", msg.payload.state.index, msg.payload.state.num ? "enabled" : "disabled"); break; default: - qos_printf("vhost-user: un-handled message: %d\n", msg.request); + g_test_message("vhost-user: un-handled message: %d\n", msg.request); break; } @@ -539,7 +538,7 @@ static const char *init_hugepagefs(void) } if (access(path, R_OK | W_OK | X_OK)) { - qos_printf("access on path (%s): %s", path, strerror(errno)); + g_test_message("access on path (%s): %s", path, strerror(errno)); g_test_fail(); return NULL; } @@ -549,13 +548,13 @@ static const char *init_hugepagefs(void) } while (ret != 0 && errno == EINTR); if (ret != 0) { - qos_printf("statfs on path (%s): %s", path, strerror(errno)); + g_test_message("statfs on path (%s): %s", path, strerror(errno)); g_test_fail(); return NULL; } if (fs.f_type != HUGETLBFS_MAGIC) { - qos_printf("Warning: path not on HugeTLBFS: %s", path); + g_test_message("Warning: path not on HugeTLBFS: %s", path); g_test_fail(); return NULL; } |