From: linuxtestproject.agent@gmail.com
To: Andrea Cervesato <andrea.cervesato@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] landlock08: add UDP bind/connect test variants
Date: Tue, 30 Jun 2026 15:31:00 +0000 [thread overview]
Message-ID: <20260630153100.3982-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260630-landlock_udp-v1-1-21a740209f70@suse.com>
Hi Andrea,
On Tue, 30 Jun 2026 16:16:08 +0200, Andrea Cervesato wrote:
> landlock08: add UDP bind/connect test variants
> static void setup(void)
> {
> landlock_abi = verify_landlock_is_enabled();
> if (landlock_abi < 4)
> tst_brk(TCONF, "Landlock network is not supported");
>
> addr_port = TST_GET_UNUSED_PORT(AF_INET, SOCK_STREAM);
TST_GET_UNUSED_PORT is called with SOCK_STREAM, but addr_port is
also used for the UDP variants (tst_variant 2 and 3) where the
socket type is SOCK_DGRAM.
A port verified free for TCP is not guaranteed to be free for UDP.
Should the port acquisition be moved into run() and use the
variant's socket type instead?
> /*\
> * Verify the landlock support for bind()/connect() syscalls in IPV4 and IPV6
> * protocols, using both TCP and UDP. In particular, check that bind() is
> ...
> * [Algorithm]
> *
> * Repeat the following procedure for {TCP, UDP} x {IPV4, IPV6}:
> *
> ...
> * - create a server listening on PORT1
The algorithm says "create a server listening on PORT1", but for
UDP variants the server only binds -- there is no listen() call.
The code handles this correctly (the SAFE_LISTEN is guarded by
SOCK_STREAM), but the description should probably say something
like "create a server bound on PORT1" or split the TCP/UDP steps.
Verdict - Needs revision
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-06-30 15:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 14:16 [LTP] [PATCH] landlock08: add UDP bind/connect test variants Andrea Cervesato
2026-06-30 15:31 ` linuxtestproject.agent [this message]
2026-06-30 16:53 ` Petr Vorel
-- strict thread matches above, loose matches on Subject: below --
2026-07-01 8:13 [LTP] [PATCH v2] " Andrea Cervesato
2026-07-01 12:24 ` [LTP] " linuxtestproject.agent
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=20260630153100.3982-1-linuxtestproject.agent@gmail.com \
--to=linuxtestproject.agent@gmail.com \
--cc=andrea.cervesato@suse.de \
--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.