[LTP] [PATCH v3 11/18] controllers: Update cgroup_fj_* to use newer cgroup lib and test lib

Richard Palethorpe rpalethorpe@suse.de
Mon Jul 25 13:41:37 CEST 2022


Luke Nowakowski-Krijger <luke.nowakowskikrijger@canonical.com> writes:

> +setup()
> +{
> +    common_setup

This can fail and we have not set pid yet.

> +    cgroup_fj_proc&
> +    pid=$!
> +    create_subgroup "$start_path/ltp_1"
> +}
>  
> -ROD kill -9 $pid
> -wait $pid
> -ROD rmdir "$start_path/ltp_1"
> +cleanup()
> +{
> +    kill -9 $pid >/dev/null 2>&1
> +    wait $pid >/dev/null 2>&1

$pid is unset so this just waits forever. We need something like the
following:

    if [ -n "$pid" ]; then
      kill -9 $pid >/dev/null 2>&1
      wait $pid >/dev/null 2>&1
    fi


> +    rmdir "$start_path/ltp_1" >/dev/null 2>&1
> +    common_cleanup
> +}
>  

-- 
Thank you,
Richard.


More information about the ltp mailing list