[LTP] [PATCH 2/3] zram/zram_lib.sh: fix variable name and algorithm retrieval

Cyril Hrubis chrubis@suse.cz
Tue Jul 9 13:44:13 CEST 2019


Hi!
>  	tst_resm TINFO "test that we can set compression algorithm"
>  
> -	local algs="$(cat /sys/block/zram0/comp_algorithm)"
> -	tst_resm TINFO "supported algs: $algs"
> +	local zram_algs="$(sed 's/[][]//g' /sys/block/zram0/comp_algorithm)"

This has still the same name as the variable set in the zram01.sh.

There are two options what to do here, either we remove zram_algs from
the zram01.sh or set the algorithms to the ones defined in the zram01.sh
test at the end of this function.

> +	tst_resm TINFO "supported algs: $zram_algs"
>  	local i=0
>  	for alg in $zram_algs; do
>  		local sys_path="/sys/block/zram${i}/comp_algorithm"
> -- 
> 2.17.1
> 
> 
> -- 
> Mailing list info: https://lists.linux.it/listinfo/ltp

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list