[PATCH v4 1/4] Add KUnit Struct to Current Task
From: Patricia Alfonso
Date: Thu Apr 02 2020 - 16:46:56 EST
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@xxxxxxxxxx>
---
include/linux/sched.h | 4 ++++
1 file changed, 4 insertions(+)
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;
--
2.26.0.292.g33ef6b2f38-goog