[LTP] [PATCH V2 2/9] tracing/ftrace: add new case for ftrace userstacktrace

Li Wang liwang@redhat.com
Thu May 5 08:24:29 CEST 2016


On Wed, May 04, 2016 at 06:00:27PM +0200, Cyril Hrubis wrote:
> Hi!
> > +ftrace_userstacktrace_test()
> > +{
> > +	if [ ! -e "$TSTACK_TRACE_PATH" ]; then
> > +		tst_brkm TCONF ignored "Stack Tracer is not cofigured in This kernel"
> 
> The 'ignored' should really be removed here, it's a leftover when the
> tst_brkm called the broken-by-design binary.

ok. thanks for reivewing.

> 
> > +	fi
> > +
> > +	for i in $(seq $LOOP); do
> > +		echo 1 >  $TSTACK_TRACE_PATH
> > +		echo userstacktrace > $TRACING_PATH/trace_options
> > +		grep -q "^userstacktrace"  $TRACING_PATH/trace_options
> > +		if [ $? -ne 0 ]; then
> > +			tst_brkm TBROK "Failed to set userstacktrace"
> > +		fi
> > +
> > +		if [ -f "$EXC_PAGE_FAULT_ENABLE" ]; then
> > +			exc_page_fault_enable=`cat $EXC_PAGE_FAULT_ENABLE`
> > +			echo 1 > $EXC_PAGE_FAULT_ENABLE
> > +		else
> > +			mm_page_fault_enable=`cat MM_PAGE_FAULT_ENABLE`
> > +			echo 1 > $MM_PAGE_FAULT_ENABLE
> > +		fi
> > +	done
> > +
> > +	if [ -f "$EXC_PAGE_FAULT_ENABLE" ]; then
> > +		echo "$exc_page_fault_enable" > $EXC_PAGE_FAULT_ENABLE
> > +	else
> > +		echo "$mm_page_fault_enable" > $MM_PAGE_FAULT_ENABLE
> > +	fi
> > +
> > +	tst_resm TPASS "Finished running the test"
> > +}
> 
> -- 
> Cyril Hrubis
> chrubis@suse.cz


More information about the ltp mailing list