Re: [PATCH PATCH 2/2] selftests: livepatch: test if ftrace can trace a livepatched function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

> +start_test "trace livepatched function and check that the live patch remains in effect"
> +
> +FUNCTION_NAME="livepatch_cmdline_proc_show"
> +
> +load_lp $MOD_LIVEPATCH
> +trace_function "$FUNCTION_NAME"

trace_funtion() calls cleanup_ftrace() to prepare the test. Ok.

> +if [[ "$(cat /proc/cmdline)" == "$MOD_LIVEPATCH: this has been live patched" ]] ; then
> +	log "livepatch: ok"
> +fi
> +
> +check_traced_function "$FUNCTION_NAME"
> +
> +cleanup_tracing

Here, I suppose, cleanup_tracing() is called to clean up after the check 
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.

Miroslav




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux