From: Anders Roxell <anders.roxell@linaro.org>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] accept02: Join the multicast group on lo
Date: Mon, 28 Sep 2026 23:27:33 +0200 [thread overview]
Message-ID: <20260928212733.2835408-1-anders.roxell@linaro.org> (raw)
The test joins the multicast group with interface 0. Then the kernel
needs a route to 224.0.0.0 to find a device. When we only have lo,
like in a QEMU guest with no network, there is no such route and the
test breaks:
accept02.c:52: TBROK: setsockopt(3, 0, 42, ...) failed: ENODEV (19)
All traffic in the test goes over 127.0.0.1, so join the group on lo.
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
testcases/kernel/syscalls/accept/accept02.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/testcases/kernel/syscalls/accept/accept02.c b/testcases/kernel/syscalls/accept/accept02.c
index 17056625e933..09a1c35e2591 100644
--- a/testcases/kernel/syscalls/accept/accept02.c
+++ b/testcases/kernel/syscalls/accept/accept02.c
@@ -22,6 +22,7 @@
#include <errno.h>
#include <sys/socket.h>
#include "tst_test.h"
+#include "tst_netdevice.h"
#include "tst_safe_net.h"
#include "tst_safe_pthread.h"
@@ -112,7 +113,7 @@ static void setup(void)
client_addr = tst_alloc(sizeof(*client_addr));
mc_group = tst_alloc(sizeof(*mc_group));
- mc_group->gr_interface = 0;
+ mc_group->gr_interface = NETDEV_INDEX_BY_NAME("lo");
mc_group_addr = (struct sockaddr_in *) &mc_group->gr_group;
mc_group_addr->sin_family = AF_INET;
inet_aton(MULTICASTIP, &mc_group_addr->sin_addr);
--
2.53.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next reply other threads:[~2026-09-28 21:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 21:27 Anders Roxell [this message]
2026-09-28 23:50 ` [LTP] accept02: Join the multicast group on lo linuxtestproject.agent
2026-09-30 12:53 ` [LTP] [PATCH] " Petr Vorel
2026-09-30 14:10 ` Petr Vorel
2026-09-30 14:19 ` Martin Doucha
2026-09-30 14:28 ` Petr Vorel
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=20260928212733.2835408-1-anders.roxell@linaro.org \
--to=anders.roxell@linaro.org \
--cc=ltp@lists.linux.it \
/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.