Re: [PATCH] selftests/ftrace: skip ftrace test if FTRACE was not enabled

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

 



On Wed, 3 Jul 2019 12:09:53 +0900
Masami Hiramatsu <mhiramat@xxxxxxxxxx> wrote:

> > Would something like that work?  
> 
> For older kernel, I think we'd better try to mount debugfs first.

Sure, that's pretty trivial to do. Or what I was thinking, try it if it
fails:

 	if [ -z "$TRACING_DIR" ]; then
 	  save_err=$err_ret
 	  err_ret=$err_skip
	  if mount -t tracefs nodev /sys/kernel/tracing; then
 	    TRACING_DIR="/sys/kernel/tracing"
	  elif mount -t debugfs nodev /sys/kernel/debug; then
 	    TRACING_DIR="/sys/kernel/debug/tracing"
	  else
	    errexit "debugfs is not configured in this kernel"
	  fi
	  if [ ! -d "$TRACING_DIR" ]; then
	    errexit "ftrace is not configured in this kernel"
	  fi
 	  err_ret=$save_err
 	fi

-- Steve



[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