From: "Daniel P. Berrangé" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Daniel P. Berrangé" <berrange@redhat.com>
Subject: [PATCH] tests: use macros for registering char tests for sockets
Date: Thu, 16 Oct 2025 14:25:48 +0100 [thread overview]
Message-ID: <20251016132548.1654627-1-berrange@redhat.com> (raw)
The test-char.c has a couple of helper macros for registering tests that
need to be repeated for both IP and UNIX sockets. One test case was not
using the macro though.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
tests/unit/test-char.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/tests/unit/test-char.c b/tests/unit/test-char.c
index f30a39f61f..3c9f0a68e8 100644
--- a/tests/unit/test-char.c
+++ b/tests/unit/test-char.c
@@ -1969,19 +1969,17 @@ int main(int argc, char **argv)
g_test_add_data_func("/char/socket/client/reconnect-error/" # name, \
&client7 ##name, char_socket_client_test); \
g_test_add_data_func("/char/socket/client/dupid-reconnect/" # name, \
- &client8 ##name, char_socket_client_dupid_test)
+ &client8 ##name, char_socket_client_dupid_test); \
+ g_test_add_data_func("/char/socket/server/two-clients/" # name, \
+ addr, char_socket_server_two_clients_test)
if (has_ipv4) {
SOCKET_SERVER_TEST(tcp, &tcpaddr);
SOCKET_CLIENT_TEST(tcp, &tcpaddr);
- g_test_add_data_func("/char/socket/server/two-clients/tcp", &tcpaddr,
- char_socket_server_two_clients_test);
}
#ifndef WIN32
SOCKET_SERVER_TEST(unix, &unixaddr);
SOCKET_CLIENT_TEST(unix, &unixaddr);
- g_test_add_data_func("/char/socket/server/two-clients/unix", &unixaddr,
- char_socket_server_two_clients_test);
#endif
g_test_add_func("/char/udp", char_udp_test);
--
2.50.1
next reply other threads:[~2025-10-16 13:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-16 13:25 Daniel P. Berrangé [this message]
2025-10-16 13:30 ` [PATCH] tests: use macros for registering char tests for sockets Peter Maydell
2025-10-16 13:33 ` Daniel P. Berrangé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251016132548.1654627-1-berrange@redhat.com \
--to=berrange@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.