diff mbox series

[4/5] kasan: fix and update KUNIT_EXPECT_KASAN_FAIL comment

Message ID 6fad6661e72c407450ae4b385c71bc4a7e1579cd.1696605143.git.andreyknvl@google.com (mailing list archive)
State New
Headers show
Series kasan: assorted fixes and improvements | expand

Commit Message

andrey.konovalov@linux.dev Oct. 6, 2023, 3:18 p.m. UTC
From: Andrey Konovalov <andreyknvl@google.com>

Update the comment for KUNIT_EXPECT_KASAN_FAIL to describe the parameters
this macro accepts.

Also drop the mention of the "kasan_status" KUnit resource, as it no
longer exists.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202308171757.7V5YUcje-lkp@intel.com/
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
---
 mm/kasan/kasan_test.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Comments

Marco Elver Oct. 9, 2023, 8:47 a.m. UTC | #1
On Fri, 6 Oct 2023 at 17:18, <andrey.konovalov@linux.dev> wrote:
>
> From: Andrey Konovalov <andreyknvl@google.com>
>
> Update the comment for KUNIT_EXPECT_KASAN_FAIL to describe the parameters
> this macro accepts.
>
> Also drop the mention of the "kasan_status" KUnit resource, as it no
> longer exists.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202308171757.7V5YUcje-lkp@intel.com/

"Closes" isn't a valid tag? Reported-by + Link should be enough to attribute.

> Signed-off-by: Andrey Konovalov <andreyknvl@google.com>

Reviewed-by: Marco Elver <elver@google.com>

> ---
>  mm/kasan/kasan_test.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/mm/kasan/kasan_test.c b/mm/kasan/kasan_test.c
> index c707d6c6e019..2030c7ff7de9 100644
> --- a/mm/kasan/kasan_test.c
> +++ b/mm/kasan/kasan_test.c
> @@ -91,10 +91,11 @@ static void kasan_test_exit(struct kunit *test)
>  }
>
>  /**
> - * KUNIT_EXPECT_KASAN_FAIL() - check that the executed expression produces a
> - * KASAN report; causes a test failure otherwise. This relies on a KUnit
> - * resource named "kasan_status". Do not use this name for KUnit resources
> - * outside of KASAN tests.
> + * KUNIT_EXPECT_KASAN_FAIL - check that the executed expression produces a
> + * KASAN report; causes a KUnit test failure otherwise.
> + *
> + * @test: Currently executing KUnit test.
> + * @expression: Expression that must produce a KASAN report.
>   *
>   * For hardware tag-based KASAN, when a synchronous tag fault happens, tag
>   * checking is auto-disabled. When this happens, this test handler reenables
> --
> 2.25.1
>
Andrey Konovalov Oct. 9, 2023, 7:42 p.m. UTC | #2
On Mon, Oct 9, 2023 at 10:48 AM Marco Elver <elver@google.com> wrote:
>
> On Fri, 6 Oct 2023 at 17:18, <andrey.konovalov@linux.dev> wrote:
> >
> > From: Andrey Konovalov <andreyknvl@google.com>
> >
> > Update the comment for KUNIT_EXPECT_KASAN_FAIL to describe the parameters
> > this macro accepts.
> >
> > Also drop the mention of the "kasan_status" KUnit resource, as it no
> > longer exists.
> >
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202308171757.7V5YUcje-lkp@intel.com/
>
> "Closes" isn't a valid tag? Reported-by + Link should be enough to attribute.

I believe it is: the robot asks to use it, see the link. (I think this
tag is also used by syzbot btw.)

> > Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
>
> Reviewed-by: Marco Elver <elver@google.com>

Thanks!
diff mbox series

Patch

diff --git a/mm/kasan/kasan_test.c b/mm/kasan/kasan_test.c
index c707d6c6e019..2030c7ff7de9 100644
--- a/mm/kasan/kasan_test.c
+++ b/mm/kasan/kasan_test.c
@@ -91,10 +91,11 @@  static void kasan_test_exit(struct kunit *test)
 }
 
 /**
- * KUNIT_EXPECT_KASAN_FAIL() - check that the executed expression produces a
- * KASAN report; causes a test failure otherwise. This relies on a KUnit
- * resource named "kasan_status". Do not use this name for KUnit resources
- * outside of KASAN tests.
+ * KUNIT_EXPECT_KASAN_FAIL - check that the executed expression produces a
+ * KASAN report; causes a KUnit test failure otherwise.
+ *
+ * @test: Currently executing KUnit test.
+ * @expression: Expression that must produce a KASAN report.
  *
  * For hardware tag-based KASAN, when a synchronous tag fault happens, tag
  * checking is auto-disabled. When this happens, this test handler reenables