]>
git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - tools/testing/selftests/ftrace/test.d/ftrace/func_cpumask.tc
2 # SPDX-License-Identifier: GPL-2.0
3 # description: ftrace - function trace with cpumask
5 if ! which nproc
; then
7 ls -d /sys
/devices
/system
/cpu
/cpu
[0-9]* |
wc -l
13 if [ $NP -eq 1 ] ;then
14 echo "We can not test cpumask on UP environment"
18 if ! grep -q "function" available_tracers
; then
19 echo "Function trace is not enabled"
23 ORIG_CPUMASK
=`cat tracing_cpumask`
26 echo $ORIG_CPUMASK > tracing_cpumask
31 : "Bitmask only record on CPU1"
32 echo 2 > tracing_cpumask
33 MASK
=0x
`cat tracing_cpumask`
34 test `printf "%d" $MASK` -eq 2 || do_reset
36 echo function > current_tracer
41 : "Check CPU1 events are recorded"
42 grep -q -e "\[001\]" trace || do_reset
44 : "There should be No other cpu events"
45 ! grep -qv -e "\[001\]" -e "^#" trace || do_reset