[LTP] [PATCH v2 3/3] commands/keyctl01: Check keyctl support instead of kernel version

Cyril Hrubis chrubis@suse.cz
Tue Jul 18 15:27:20 CEST 2017


Hi!
I've pushed the first two patches, thanks.

>  setup()
>  {
> -	if tst_kvcmp -le 2.6.33; then
> -		tst_brk TCONF "Kernel newer than 2.6.33 is needed"
> +	keyctl 2>&1 | tr '\n' ' ' | grep "request2" | grep "negate" | \
> +		grep "show" | grep "unlink" >/dev/null

Uh, what are we grepping here for exactly? Can't we do that with a
single regular expression?

> +	if [ $? -ne 0 ]; then
> +		tst_brk TCONF "keyctl operations not supported"
>  	fi
>  
>  	PATH_KEYSTAT="/proc/key-users"
> -- 
> 2.9.4
> 
> 
> 

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list