[LTP] [PATCH 3/8] tst_test.sh: Improve pattern for allowed variables

Cyril Hrubis chrubis@suse.cz
Mon May 30 16:21:43 CEST 2022


Hi!
>  	if [ -n "$TST_TEST_PATH" ]; then
> -		for _tst_i in $(grep '^[^#]*\bTST_' "$TST_TEST_PATH" | sed 's/.*TST_//; s/[="} \t\/:`].*//'); do
> +		for _tst_i in $(grep '^[^#]*\bTST_' "$TST_TEST_PATH" | sed 's/.*TST_//; s/[="} \t\/:`'"'"'].*//'); do
                                                                                           ^
											   Isn't
											   the
											   content
											   between
											   []
											   just
											   set?

Shouldn't adding just ' between the [] suffice? The " is already there.

>  			case "$_tst_i" in
>  			DISABLE_APPARMOR|DISABLE_SELINUX);;
>  			SETUP|CLEANUP|TESTFUNC|ID|CNT|MIN_KVER);;
> -- 
> 2.36.0
> 

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list