Commit e8352cf
committed
tracing: Move setting of tracing_selftest_running out of register_tracer()
The variables tracing_selftest_running and tracing_selftest_disabled are
only used for when CONFIG_FTRACE_STARTUP_TEST is enabled. Make them only
visible within the selftest code. The setting of those variables are in
the register_tracer() call, and set in a location where they do not need
to be. Create a wrapper around run_tracer_selftest() called
do_run_tracer_selftest() which sets those variables, and have
register_tracer() call that instead.
Having those variables only set within the CONFIG_FTRACE_STARTUP_TEST
scope gets rid of them (and also the ability to remove testing against
them) when the startup tests are not enabled (most cases).
Link: https://lkml.kernel.org/r/20230528051742.1325503-2-rostedt@goodmis.org
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>1 parent f1aab36 commit e8352cf
1 file changed
Lines changed: 16 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2041 | 2041 | | |
2042 | 2042 | | |
2043 | 2043 | | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
2044 | 2055 | | |
2045 | 2056 | | |
2046 | 2057 | | |
| |||
2092 | 2103 | | |
2093 | 2104 | | |
2094 | 2105 | | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
2095 | 2110 | | |
2096 | 2111 | | |
2097 | 2112 | | |
| |||
2127 | 2142 | | |
2128 | 2143 | | |
2129 | 2144 | | |
2130 | | - | |
2131 | | - | |
2132 | 2145 | | |
2133 | 2146 | | |
2134 | 2147 | | |
| |||
2157 | 2170 | | |
2158 | 2171 | | |
2159 | 2172 | | |
2160 | | - | |
| 2173 | + | |
2161 | 2174 | | |
2162 | 2175 | | |
2163 | 2176 | | |
| |||
2166 | 2179 | | |
2167 | 2180 | | |
2168 | 2181 | | |
2169 | | - | |
2170 | 2182 | | |
2171 | 2183 | | |
2172 | 2184 | | |
| |||
0 commit comments