[LTP] [PATCH V4] controllers/cgroup_fj: fix and clean up

Cyril Hrubis chrubis@suse.cz
Thu Nov 12 15:36:57 CET 2015


Hi!
>  setup()
>  {
> -	if [ -e /dev/cgroup ]; then
> +	# Current test will fail if the previous one failed to rmdir
> +	# so try to remove all subgroups
> +	mount_point=$(get_mount_point)
> +	rmdir $mount_point/subgroup_*

I've removed this rmdir now, since if cgroups are not mounted it will
expand to rmdir /subgroup_* which is mostly harmless but will generate
confusing error in the output.

> +	if [ "$mount_point" == "" ] ; then
                                   ^
				   Removed this space
> +		mounted=0
> +		mount_point=/dev/cgroup
> +	fi
> +
> +	if [ -e $mount_point ] && [ $mounted -ne 1 ]; then
> +		rm -rf $mount_point
>  		cleanup;
                       ^
		       This useless semicolon

And pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the Ltp mailing list