All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Chuck Lever" <cel@kernel.org>
Cc: linux-nvme@lists.infradead.org,
	"Jeff Layton" <jlayton@kernel.org>,
	"Anna Schumaker" <anna@kernel.org>
Subject: Re: [PATCH net-next v2 06/10] handshake: Add a kunit test for the completion gate
Date: Fri, 13 Nov 2026 14:52:43 +0000	[thread overview]
Message-ID: <sashiko-outbox-213023@kernel.org> (raw)
In-Reply-To: <20261112-tls-session-tags-v2-6-a587a50de7fc@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] handshake: unrelated sessiontags KUnit changes squashed into
  commit
--

commit b879c6737fc8615a84b7321f23d468457911d409
Author: Chuck Lever <cel@kernel.org>

handshake: Add a kunit test for the completion gate

This commit exports handshake_try_complete() and handshake_finish_complete()
for KUnit and adds a test case verifying completion gate exclusivity, along
with updates to the session-tag duplicate KUnit tests.

> diff --git a/net/handshake/handshake-test.c b/net/handshake/handshake-test.c
> index 21fccfa94d897..b6992d1fa4ce4 100644
> --- a/net/handshake/handshake-test.c
> +++ b/net/handshake/handshake-test.c

[ ... ]

> @@ -651,7 +729,7 @@ static void handshake_sessiontags_duplicate(struct kunit *test)
>  	info.nlhdr = nlh;
>  
>  	KUNIT_EXPECT_EQ(test, handshake_get_sessiontags(&tags, &info), 0);
> -	KUNIT_EXPECT_EQ(test, stringset_count(&tags), 2);
> +	KUNIT_EXPECT_EQ(test, stringset_count(&tags), 1);
>  	stringset_finalize(&tags);
>  	KUNIT_EXPECT_EQ(test, stringset_count(&tags), 1);
>  	KUNIT_EXPECT_TRUE(test, stringset_is_member(&tags, "dup"));
> @@ -660,6 +738,30 @@ static void handshake_sessiontags_duplicate(struct kunit *test)
>  	kfree_skb(skb);
>  }
>  
> +static void handshake_sessiontags_duplicate_at_cap(struct kunit *test)
> +{
> +	struct genl_info info = {};
> +	struct nlmsghdr *nlh;
> +	struct sk_buff *skb;
> +	DEFINE_STRINGSET(tags);
> +	unsigned int i;
> +
> +	skb = handshake_done_msg(test, &nlh);
> +	for (i = 0; i < HANDSHAKE_MAX_SESSIONTAGS; i++)
> +		nla_put_string(skb, HANDSHAKE_A_DONE_TAG, "dup");
> +	nla_put_string(skb, HANDSHAKE_A_DONE_TAG, "last");
> +	nlmsg_end(skb, nlh);
> +	info.nlhdr = nlh;
> +
> +	KUNIT_EXPECT_EQ(test, handshake_get_sessiontags(&tags, &info), 0);
> +	KUNIT_EXPECT_EQ(test, stringset_count(&tags), 2);
> +	stringset_finalize(&tags);
> +	KUNIT_EXPECT_TRUE(test, stringset_is_member(&tags, "last"));
> +
> +	stringset_destroy(&tags);
> +	kfree_skb(skb);
> +}

[ ... ]

> @@ -755,6 +861,10 @@ static struct kunit_case handshake_api_test_cases[] = {
>  		.name			= "sessiontags duplicate",
>  		.run_case		= handshake_sessiontags_duplicate,
>  	},
> +	{
> +		.name			= "sessiontags duplicates at cap",
> +		.run_case		= handshake_sessiontags_duplicate_at_cap,
> +	},
>  	{
>  		.name			= "sessiontags truncate at cap",
>  		.run_case		= handshake_sessiontags_truncate,

[Severity: Low]
Were these session-tag duplicate KUnit changes meant to be folded into
the preceding commit "handshake: Pick up session tags passed during the
DONE downcall"?

In that commit, handshake_get_sessiontags() already skips duplicate tags
via handshake_sessiontag_is_dup(), so handshake_sessiontags_duplicate()
fails its stringset_count(&tags) == 2 check until this commit updates it,
and the commit message here only describes the completion gate test.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261112-tls-session-tags-v2-0-a587a50de7fc@kernel.org?part=6


  reply	other threads:[~2026-11-13 14:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 14:52 [PATCH net-next v2 00/10] Deliver TLS session tags to upper-layer consumers (NFSD) Chuck Lever
2026-11-12 14:52 ` [PATCH net-next v2 01/10] handshake: Add tags to "done" downcall Chuck Lever
2026-11-12 14:52 ` [PATCH net-next v2 02/10] lib: Add a "stringset" data structure Chuck Lever
2026-11-13 14:52   ` sashiko-bot
2026-11-12 14:52 ` [PATCH net-next v2 03/10] lib: Add KUnit tests for the stringset " Chuck Lever
2026-11-12 14:52 ` [PATCH net-next v2 04/10] handshake: Add a session-tags argument to the TLS done callback Chuck Lever
2026-11-12 14:52 ` [PATCH net-next v2 05/10] handshake: Pick up session tags passed during the DONE downcall Chuck Lever
2026-11-12 14:52 ` [PATCH net-next v2 06/10] handshake: Add a kunit test for the completion gate Chuck Lever
2026-11-13 14:52   ` sashiko-bot [this message]
2026-11-12 14:52 ` [PATCH net-next v2 07/10] handshake: Advertise the session-tag cap to user space Chuck Lever
2026-11-12 14:52 ` [PATCH net-next v2 08/10] SUNRPC: Copy the TLS session tags when they are available Chuck Lever
2026-11-12 14:52 ` [PATCH net-next v2 09/10] NFSD: Implement export tagging Chuck Lever
2026-11-12 14:52 ` [PATCH net-next v2 10/10] NFSD: Add allow_tags to the netlink export interface Chuck Lever
2026-11-13 14:52   ` sashiko-bot

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=sashiko-outbox-213023@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=anna@kernel.org \
    --cc=cel@kernel.org \
    --cc=jlayton@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.