From: Nam Cao <namcao@linutronix.de>
To: Alexandre Ghiti <alex@ghiti.fr>
Cc: Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] riscv: Add kprobes KUnit test
Date: Wed, 14 May 2025 12:01:25 +0200 [thread overview]
Message-ID: <20250514100125.KjX0gdp9@linutronix.de> (raw)
In-Reply-To: <b6df6923-1028-4a6e-8cf4-e10e8fd55475@ghiti.fr>
On Wed, May 14, 2025 at 10:22:03AM +0200, Alexandre Ghiti wrote:
> On 13/05/2025 17:16, Nam Cao wrote:
> > + for (i = 0; i < num_kprobe; ++i) {
> > + kp[i].addr = test_kprobes_addresses[i];
> > + kp[i].pre_handler = kprobe_dummy_handler;
> > + KUNIT_EXPECT_EQ(test, 0, register_kprobe(&kp[i]));
>
>
> Will kp be freed if the test fails?
Yes. Unlike KUNIT_ASSERT_EQ() which terminates the test, KUNIT_EXPECT_EQ()
still lets the test continues.
> Thanks for adding new tests, KUnit tests do not run yet in the CI but I'll
> add them soon!
Well I promised Björn this test back in 2023 ;) But I wasn't sure how to
implement it (I was still a student at that time) and then got busy with
other stuffs. But I guess better late than never.
Nam
next prev parent reply other threads:[~2025-05-14 10:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-13 15:16 Nam Cao
2025-05-14 8:22 ` Alexandre Ghiti
2025-05-14 10:01 ` Nam Cao [this message]
2025-06-04 14:33 ` patchwork-bot+linux-riscv
2025-09-26 11:51 ` Thomas Huth
2025-09-26 12:14 ` Nam Cao
2025-09-29 10:19 ` Nam Cao
2025-10-10 22:03 ` Paul Walmsley
2025-10-13 5:15 ` Thomas Huth
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=20250514100125.KjX0gdp9@linutronix.de \
--to=namcao@linutronix.de \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.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®