[LTP] [PATCH v2] [vma] Add regression tests for vsyscall and vdso

Cyril Hrubis chrubis@suse.cz
Wed Aug 9 14:51:34 CEST 2017


Hi!
> +vma_report_check()
> +{
> +	if [ $(uname -m) == "x86_64" ] ; then
> +		if LINE=$(grep "vsyscall" /proc/self/maps) ; then
> +			RIGHT="ffffffffff600000-ffffffffff601000[[:space:]]r-xp"
> +			if grep -q "$RIGHT" <<< "$LINE" ; then
> +				tst_res TPASS "[vsyscall] reported correctly"
> +			else
> +				tst_res TFAIL "[vsyscall] reporting wrong"
> +			fi
> +		fi
> +	fi
> +
> +	rm -rf core*
> +	{ vma05_vdso; } >& /dev/null
> +	TRACE=$(gdb -silent -ex="thread apply all backtrace" -ex="quit"\
> +		vma05_vdso ./core* 2> /dev/null)

One last nit, we should make sure that /proc/sys/kernel/core_pattern is
set to 'core' otherwise this may fail to find the core file.

We can set and reset it in the setup/cleanup as we do with the ulimit if
it's present.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list