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

Cyril Hrubis chrubis@suse.cz
Wed May 4 18:00:27 CEST 2016


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.

> +	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