On Fri, 14 Mar 2025, Filipe Xavier wrote:
On 3/14/25 10:14 AM, Miroslav Benes wrote:I meant... check_traced_function() (or check_traced_functions() in this
Hi,In cases where we need to check two or more functions with
+start_test "trace livepatched function and check that the live patchtrace_funtion() calls cleanup_ftrace() to prepare the test. Ok.
remains in effect"
+
+FUNCTION_NAME="livepatch_cmdline_proc_show"
+
+load_lp $MOD_LIVEPATCH
+trace_function "$FUNCTION_NAME"
+if [[ "$(cat /proc/cmdline)" == "$MOD_LIVEPATCH: this has been liveHere, I suppose, cleanup_tracing() is called to clean up after the check
patched" ]] ; then
+ log "livepatch: ok"
+fi
+
+check_traced_function "$FUNCTION_NAME"
+
+cleanup_tracing
above so that nothing stays and more tests can be added later. Right?
Would it make sense then to call cleanup_tracing() in
check_traced_function()? I think it would less error prone.
If needed, check_traced_function() can always be upgraded so that it
checks for more traced functions.
check_traced_function,
if there is cleanup_tracing, it will not be possible, make sense?
e.g: function1 call -> function2 call -> function3.
case) can have multiple arguments. You would loop over them inside and
then clean up. Or did I misunderstood?
Miroslav