mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Gow <david@davidgow.net>
To: Vaibhav Jain <vaibhav@linux.ibm.com>,
	linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com,
	linux-kernel@vger.kernel.org
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Brendan Higgins <brendan.higgins@linux.dev>,
	Rae Moar <raemoar63@gmail.com>
Subject: Re: [PATCH v3 2/3] rust: kunit: add 'kunit_suite.status' binding to 'kunit_unsafe_test_suite'
Date: Sat, 20 Jun 2026 19:08:24 +0800	[thread overview]
Message-ID: <db22082d-c14d-4e9a-b381-a655708f7c91@davidgow.net> (raw)
In-Reply-To: <20260617121535.462459-3-vaibhav@linux.ibm.com>

Le 17/06/2026 à 8:15 PM, Vaibhav Jain a écrit :
> Update KUnit Rust binding macro-rule 'kunit_unsafe_test_suite' to add and
> initialize the newly introduced 'kunit_suite.status'. Without this
> 'kunit_suite.status' field is never initialized which is an error for the
> Rust compiler.
> 
> Suggested-by: David Gow <david@davidgow.net>
> Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
> ---
> Changelog
> =========
> V2->V3:
> Patch, not present in earlier version
> ---

Thanks very much. I'd prefer it if this could be squashed into patch 1,
just so we don't have a period where the rust build is broken.

Otherwise, good, though. With the formatting issue below fixed, this is

Reviewed-by: David Gow <david@davidgow.net>

>  rust/kernel/kunit.rs | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/rust/kernel/kunit.rs b/rust/kernel/kunit.rs
> index a1edf7491579..e07894c72d0d 100644
> --- a/rust/kernel/kunit.rs
> +++ b/rust/kernel/kunit.rs
> @@ -288,6 +288,7 @@ macro_rules! kunit_unsafe_test_suite {
>                      log: ::core::ptr::null_mut(),
>                      suite_init_err: 0,
>                      is_init: false,
> +		    status: kernel::bindings::kunit_status_KUNIT_SUCCESS,

Alas, Rust code needs to be indented with four spaces, rather than tabs.
In theory, make LLVM=1 rustfmtcheck is supposed to catch this, but it's
not working for me.


>                  };
>  
>              #[used(compiler)]


Cheers,
-- David

  reply	other threads:[~2026-06-20 11:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-17 12:15 [PATCH v3 0/3] kunit: Add support for skipping entire test suites Vaibhav Jain
2026-06-17 12:15 ` [PATCH v3 1/3] kunit: Add ability to skip " Vaibhav Jain
2026-06-20 11:08   ` David Gow
2026-06-17 12:15 ` [PATCH v3 2/3] rust: kunit: add 'kunit_suite.status' binding to 'kunit_unsafe_test_suite' Vaibhav Jain
2026-06-20 11:08   ` David Gow [this message]
2026-06-17 12:15 ` [PATCH v3 3/3] kunit: Add example of test suite that can be skipped at runtime Vaibhav Jain
2026-06-20 11:08   ` David Gow

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=db22082d-c14d-4e9a-b381-a655708f7c91@davidgow.net \
    --to=david@davidgow.net \
    --cc=brendan.higgins@linux.dev \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=maddy@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=raemoar63@gmail.com \
    --cc=vaibhav@linux.ibm.com \
    /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®