From: Alice Ryhl <aliceryhl@google.com>
To: Dirk Behme <dirk.behme@gmail.com>
Cc: rust-for-linux@vger.kernel.org
Subject: Re: [PATCH] rust: workqueue: Enable execution of doctests
Date: Mon, 14 Oct 2024 10:23:09 +0200 [thread overview]
Message-ID: <CAH5fLgit650+Xz6UXB0SLeLzL_ZFKae+ZTDZVA-hsCwX6AzwDw@mail.gmail.com> (raw)
In-Reply-To: <9fb9930e-7666-4520-91d0-7e79be56b8f7@gmail.com>
On Sat, Oct 12, 2024 at 8:30 AM Dirk Behme <dirk.behme@gmail.com> wrote:
>
> Having the Rust doctests enabled these workqueue tests are built but not
> executed as the final callers of the print_*() functions are missing.
> Add them.
>
> The result is
>
> # rust_doctest_kernel_workqueue_rs_0.location:
> rust/kernel/workqueue.rs:35
> rust_doctests_kernel: The value is: 42
> ok 94 rust_doctest_kernel_workqueue_rs_0
> # rust_doctest_kernel_workqueue_rs_3.location:
> rust/kernel/workqueue.rs:78
> rust_doctests_kernel: The value is: 24
> rust_doctests_kernel: The second value is: 42
> ok 97 rust_doctest_kernel_workqueue_rs_3
>
> Without this change the "The value ..." outputs are not there meaning
> that this
> test code is not run.
>
> Cc: Alice Ryhl <aliceryhl@google.com>
> Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
One nit below. With that fixed:
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
> diff --git a/rust/kernel/workqueue.rs b/rust/kernel/workqueue.rs
> index 10d2bc62e2cf..ba0f397f8b8b 100644
> --- a/rust/kernel/workqueue.rs
> +++ b/rust/kernel/workqueue.rs
> @@ -69,6 +69,8 @@
> //! fn print_later(val: Arc<MyStruct>) {
> //! let _ = workqueue::system().enqueue(val);
> //! }
> +//!
> +//! # let _ = print_later(MyStruct::new(42).unwrap());
Having an empty line followed by a hidden line means that the rendered
html will have an unnecessary empty line at the end. Please remove the
empty line.
Alice
prev parent reply other threads:[~2024-10-14 8:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-12 6:30 [PATCH] rust: workqueue: Enable execution of doctests Dirk Behme
2024-10-12 8:15 ` Boqun Feng
2024-10-12 8:18 ` Boqun Feng
2024-10-12 10:25 ` Miguel Ojeda
2024-10-14 11:04 ` Alice Ryhl
2024-10-14 8:23 ` Alice Ryhl [this message]
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=CAH5fLgit650+Xz6UXB0SLeLzL_ZFKae+ZTDZVA-hsCwX6AzwDw@mail.gmail.com \
--to=aliceryhl@google.com \
--cc=dirk.behme@gmail.com \
--cc=rust-for-linux@vger.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;
as well as URLs for NNTP newsgroup(s).