diff mbox series

[v4,1/4] Add KUnit Struct to Current Task

Message ID 20200402204639.161637-4-trishalfonso@google.com (mailing list archive)
State New
Headers show
Series KUnit-KASAN Integration | expand

Commit Message

Patricia Alfonso April 2, 2020, 8:46 p.m. UTC
In order to integrate debugging tools like KASAN into the KUnit
framework, add KUnit struct to the current task to keep track of the
current KUnit test.

Signed-off-by: Patricia Alfonso <trishalfonso@google.com>
---
 include/linux/sched.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Brendan Higgins April 3, 2020, 5:11 p.m. UTC | #1
On Thu, Apr 2, 2020 at 1:46 PM 'Patricia Alfonso' via KUnit
Development <kunit-dev@googlegroups.com> wrote:
>
> In order to integrate debugging tools like KASAN into the KUnit
> framework, add KUnit struct to the current task to keep track of the
> current KUnit test.
>
> Signed-off-by: Patricia Alfonso <trishalfonso@google.com>

Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
diff mbox series

Patch

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 04278493bf15..7ca3e5068316 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1180,6 +1180,10 @@  struct task_struct {
 	unsigned int			kasan_depth;
 #endif
 
+#if IS_ENABLED(CONFIG_KUNIT)
+	struct kunit			*kunit_test;
+#endif
+
 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
 	/* Index of current stored address in ret_stack: */
 	int				curr_ret_stack;