From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: Daniel Latypov <dlatypov@google.com>
Cc: Miguel Ojeda <ojeda@kernel.org>,
Brendan Higgins <brendanhiggins@google.com>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@vger.kernel.org>,
kunit-dev@googlegroups.com,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kunit: take `kunit_assert` as `const`
Date: Wed, 4 May 2022 10:09:34 +0200 [thread overview]
Message-ID: <CANiq72m70q+zviHVNSV_AEwOByVBiMuSQL5vyo2UMMpD-vd+_Q@mail.gmail.com> (raw)
In-Reply-To: <CAGS_qxoc=AnkzUtaFpJvF08Z_Z15h9sZxYNQT5-S9C7aM4poEg@mail.gmail.com>
Hi Daniel,
On Mon, May 2, 2022 at 9:44 PM Daniel Latypov <dlatypov@google.com> wrote:
>
> Reviewed-by: Daniel Latypov <dlatypov@google.com>
>
> Thanks for this, the code definitely should have been this way from the start.
>
> I had wanted to make this change but mistakenly thought the format
> func took it via non-const for some reason.
> I must have misread it once and got it into my head that we were
> leaving the door open for mutable child structs (which sounds like a
> bad idea).
Thanks for reviewing it so quickly! Yeah, I was unsure too if there
was an external reason such as some future plan to use the mutability
as you mention or maybe some out-of-tree user was relying on it
already.
But I thought it would be best to make it stricter until it is
actually needed (if ever); or if there is an actual user for
mutability, it should be documented/noted in-tree.
It also simplifies a tiny bit a Rust-side call to
`kunit_do_failed_assertion` that I am using within generated Rust
documentation tests.
Cheers,
Miguel
next prev parent reply other threads:[~2022-05-04 8:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-02 9:36 Miguel Ojeda
2022-05-02 19:43 ` Daniel Latypov
2022-05-04 8:09 ` Miguel Ojeda [this message]
2022-05-04 14:04 ` David Gow
2022-05-04 19:26 ` Miguel Ojeda
2022-05-04 23:47 ` David Gow
2022-05-07 8:16 ` Kees Cook
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=CANiq72m70q+zviHVNSV_AEwOByVBiMuSQL5vyo2UMMpD-vd+_Q@mail.gmail.com \
--to=miguel.ojeda.sandonis@gmail.com \
--cc=brendanhiggins@google.com \
--cc=dlatypov@google.com \
--cc=kunit-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=ojeda@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®