<div dir="ltr"><div>Hi Li, <br></div><div><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 24, 2022 at 12:52 AM Li Wang <<a href="mailto:liwang@redhat.com">liwang@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Jan 19, 2022 at 10:44 PM Luke Nowakowski-Krijger<br>
<<a href="mailto:luke.nowakowskikrijger@canonical.com" target="_blank">luke.nowakowskikrijger@canonical.com</a>> wrote:<br>
><br>
> Update the cgroup_fj_* tests to use the newer test lib and to use the<br>
> updated version of the cgroup lib which handles mounting and unmounting<br>
> for both v1 and v2 controllers.<br>
><br>
> The tests were modified to accomodate testing the v2 controller<br>
<br>
accommodate ^<br>
<br>
> interfaces where it still made sense, and in other places tests were<br>
> skipped as they were testing using specific parts of the v1 interface<br>
> that doesen't exist on v2 controllers.<br>
<br>
doesn't ^<br>
<br>
><br>
> Also updated the licensing info at the beginning of the file with SPDX<br>
> license identifier.<br>
><br>
> Signed-off-by: Luke Nowakowski-Krijger <<a href="mailto:luke.nowakowskikrijger@canonical.com" target="_blank">luke.nowakowskikrijger@canonical.com</a>><br>
> ---<br>
>  .../controllers/cgroup_fj/cgroup_fj_common.sh | 105 ++++-------<br>
>  .../cgroup_fj/cgroup_fj_function.sh           | 169 ++++++++++--------<br>
>  .../controllers/cgroup_fj/cgroup_fj_proc.c    |  24 +--<br>
>  .../controllers/cgroup_fj/cgroup_fj_stress.sh | 168 ++++++++---------<br>
>  4 files changed, 215 insertions(+), 251 deletions(-)<br>
><br>
> diff --git a/testcases/kernel/controllers/cgroup_fj/cgroup_fj_common.sh b/testcases/kernel/controllers/cgroup_fj/cgroup_fj_common.sh<br>
> index 53ab637e8..9017a3cab 100755<br>
> --- a/testcases/kernel/controllers/cgroup_fj/cgroup_fj_common.sh<br>
> +++ b/testcases/kernel/controllers/cgroup_fj/cgroup_fj_common.sh<br>
> @@ -1,33 +1,19 @@<br>
>  #!/bin/sh<br>
> -<br>
> -################################################################################<br>
> -##                                                                            ##<br>
> -## Copyright (c) 2009 FUJITSU LIMITED                                         ##<br>
> -##  Author: Shi Weihua <<a href="mailto:shiwh@cn.fujitsu.com" target="_blank">shiwh@cn.fujitsu.com</a>>                                 ##<br>
> -## Copyright (c) 2015 Cedric Hnyda <<a href="mailto:chnyda@suse.com" target="_blank">chnyda@suse.com</a>>                          ##<br>
> -## Copyright (c) 2015-2016 Cyril Hrubis <<a href="mailto:chrubis@suse.cz" target="_blank">chrubis@suse.cz</a>>                     ##<br>
> -##                                                                            ##<br>
> -## This program is free software;  you can redistribute it and#or modify      ##<br>
> -## it under the terms of the GNU General Public License as published by       ##<br>
> -## the Free Software Foundation; either version 2 of the License, or          ##<br>
> -## (at your option) any later version.                                        ##<br>
> -##                                                                            ##<br>
> -## This program is distributed in the hope that it will be useful, but        ##<br>
> -## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##<br>
> -## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   ##<br>
> -## for more details.                                                          ##<br>
> -##                                                                            ##<br>
> -## You should have received a copy of the GNU General Public License          ##<br>
> -## along with this program;  if not, write to the Free Software Foundation,   ##<br>
> -## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA           ##<br>
> -##                                                                            ##<br>
> -################################################################################<br>
> +# SPDX-License-Identifier: GPL-2.0-or-later<br>
> +# Copyright (c) 2009 FUJITSU LIMITED<br>
> +# Copyright (c) 2015 Cedric Hnyda <<a href="mailto:chnyda@suse.com" target="_blank">chnyda@suse.com</a>><br>
> +# Copyright (c) 2015-2016 Cyril Hrubis <<a href="mailto:chrubis@suse.cz" target="_blank">chrubis@suse.cz</a>><br>
> +# Author: Shi Weihua <<a href="mailto:shiwh@cn.fujitsu.com" target="_blank">shiwh@cn.fujitsu.com</a>><br>
><br>
>  for arg; do<br>
>      TCID="${TCID}_$arg"<br>
>  done<br>
><br>
> -. test.sh<br>
> +TST_NEEDS_CMDS="rmdir killall"<br>
> +TST_NEEDS_ROOT=1<br>
> +TST_NEEDS_TMPDIR=1<br>
> +<br>
> +. cgroup_lib.sh<br>
><br>
>  exist_subsystem()<br>
<br>
This function is redundant since we have moved the<br>
existence check into cgroup_require(), isn't it?<br>
<br>
>  {<br>
> @@ -46,13 +32,13 @@ attach_and_check()<br>
>      local task<br>
>      shift<br>
><br>
> -    tst_resm TINFO "Attaching task $pid to $path"<br>
> +    tst_res TINFO "Attaching task $pid to $path"<br>
><br>
> -    ROD echo "$pid" \> "$path/tasks"<br>
> +    ROD echo "$pid" \> "$path/$task_list"<br>
><br>
> -    for task in $(cat "$path/tasks"); do<br>
> +    for task in $(cat "$path/$task_list"); do<br>
>          if [ "$task" -ne "$pid" ]; then<br>
> -            tst_resm TINFO "Unexpected pid $task in $path/tasks, expected $pid"<br>
> +            tst_res TINFO "Unexpected pid $task in $path/$task_list, expected $pid"<br>
>              return 1<br>
>          fi<br>
>      done<br>
> @@ -64,11 +50,13 @@ create_subgroup()<br>
>  {<br>
>      path="$1"<br>
><br>
> -    ROD mkdir "$path"<br>
> +    [ ! -d "$path" ] && ROD mkdir "$path"<br>
><br>
>      # cpuset.cpus and cpuset.mems must be initialized with suitable value<br>
> -    # before any pids are attached<br>
> -    if [ "$subsystem" = "cpuset" ]; then<br>
> +    # before any pids are attached.<br>
> +    # Only needs to be done for cgroup v1 as sets are inherited from parents<br>
> +    # by default in cgroup v2.<br>
> +    if [ "$cgroup_v" = "V1" ] && [ "$subsystem" = "cpuset" ]; then<br>
>          if [ -e "$mount_point/cpus" ]; then<br>
>              ROD cat "$mount_point/cpus" \> "$path/cpus"<br>
>              ROD cat "$mount_point/mems" \> "$path/mems"<br>
> @@ -79,54 +67,25 @@ create_subgroup()<br>
>      fi<br>
>  }<br>
><br>
> -<br>
> -setup()<br>
> +common_setup()<br>
>  {<br>
> -    tst_require_root<br>
> -    tst_require_cmds killall<br>
> -<br>
> -    if [ ! -f /proc/cgroups ]; then<br>
> -        tst_brkm TCONF "Kernel does not support for control groups"<br>
> -    fi<br>
> -<br>
> -    exist_subsystem "$subsystem"<br>
> -<br>
> -    tst_tmpdir<br>
> -    TST_CLEANUP=cleanup<br>
> -<br>
> -    mount_point=`grep -w $subsystem /proc/mounts | grep -w "cgroup" | \<br>
> -       cut -f 2 | cut -d " " -f2`<br>
> -<br>
> -    if [ -z "$mount_point" ]; then<br>
> -        try_umount=1<br>
> -        mount_point="/dev/cgroup"<br>
> -       tst_resm TINFO "Subsystem $subsystem is not mounted, mounting it at $mount_point"<br>
> -        ROD mkdir $mount_point<br>
> -        ROD mount -t cgroup -o "$subsystem" "ltp_cgroup" "$mount_point"<br>
> -    else<br>
> -       tst_resm TINFO "Subsystem $subsystem is mounted at $mount_point"<br>
> -    fi<br>
> +    cgroup_require "$subsystem"<br>
<br>
> +    mount_point=$(cgroup_get_mountpoint "$subsystem")<br>
> +    start_path=$(cgroup_get_test_path "$subsystem")<br>
> +    cgroup_v=$(cgroup_get_version "$subsystem")<br>
> +    task_list=$(cgroup_get_task_list "$subsystem")<br>
<br>
Maybe declare these variables at the top of this file, because<br>
we hope to export and use them globally.<br>
<br>
> +<br>
> +    [ "$cgroup_v" = "V2" ] && ROD echo "+$subsystem" \> "$start_path/cgroup.subtree_control"<br>
<br>
Can we just do this in tst_cgctl.c automatically if it requires the<br>
subsystem on V2.<br>
(or at least move it to cgroup_lib.sh)<br>
Then people don't need to take care of this additionally.<br>
<br></blockquote><div><br></div><div><div>The only problem with this is that we assume that the user doesn't 
want to use the test_dir as the directory to work in. If we write to 
cgroup.subtree_control we cant add any processes to cgroup.procs in the 
test_dir directory. <br></div><div><br></div><div>I think it would be 
more intuitive to have the test_dir ready to be used as a leaf cgroup 
dir and not assume it to be a parent. But thats honestly just a decision
 to make :)</div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> +    tst_res TINFO "test starts with cgroup $cgroup_v"<br>
>  }<br>
><br>
> -cleanup()<br>
> +common_cleanup()<br>
>  {<br>
> -    tst_rmdir<br>
> -<br>
>      killall -9 cgroup_fj_proc >/dev/null 2>&1<br>
><br>
> -    tst_resm TINFO "Removing all ltp subgroups..."<br>
> -<br>
> -    find "$mount_point/ltp/" -depth -type d -exec rmdir '{}' \;<br>
> +    tst_res TINFO "Removing all ltp subgroups..."<br>
><br>
> -    if [ -z "$try_umount" ]; then<br>
> -       return<br>
> -    fi<br>
> -<br>
> -    if grep -q "$mount_point" /proc/mounts; then<br>
> -        EXPECT_PASS umount "$mount_point"<br>
> -    fi<br>
> +    [ -d "$start_path" ] && find "$start_path" -depth -type d -exec rmdir '{}' \;<br>
><br>
> -    if [ -e "$mount_point" ]; then<br>
> -        EXPECT_PASS rmdir "$mount_point"<br>
> -    fi<br>
> +    cgroup_cleanup<br>
>  }<br>
> diff --git a/testcases/kernel/controllers/cgroup_fj/cgroup_fj_function.sh b/testcases/kernel/controllers/cgroup_fj/cgroup_fj_function.sh<br>
> index fc3ad1b63..07373dcfe 100755<br>
> --- a/testcases/kernel/controllers/cgroup_fj/cgroup_fj_function.sh<br>
> +++ b/testcases/kernel/controllers/cgroup_fj/cgroup_fj_function.sh<br>
> @@ -1,30 +1,16 @@<br>
>  #!/bin/sh<br>
> -<br>
> -################################################################################<br>
> -##                                                                            ##<br>
> -## Copyright (c) 2009 FUJITSU LIMITED                                         ##<br>
> -##  Author: Shi Weihua <<a href="mailto:shiwh@cn.fujitsu.com" target="_blank">shiwh@cn.fujitsu.com</a>>                                 ##<br>
> -## Copyright (c) 2015 Cedric Hnyda <<a href="mailto:chnyda@suse.com" target="_blank">chnyda@suse.com</a>>                          ##<br>
> -## Copyright (c) 2015-2016 Cyril Hrubis <<a href="mailto:chrubis@suse.cz" target="_blank">chrubis@suse.cz</a>>                     ##<br>
> -##                                                                            ##<br>
> -## This program is free software;  you can redistribute it and#or modify      ##<br>
> -## it under the terms of the GNU General Public License as published by       ##<br>
> -## the Free Software Foundation; either version 2 of the License, or          ##<br>
> -## (at your option) any later version.                                        ##<br>
> -##                                                                            ##<br>
> -## This program is distributed in the hope that it will be useful, but        ##<br>
> -## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##<br>
> -## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   ##<br>
> -## for more details.                                                          ##<br>
> -##                                                                            ##<br>
> -## You should have received a copy of the GNU General Public License          ##<br>
> -## along with this program;  if not, write to the Free Software Foundation,   ##<br>
> -## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA           ##<br>
> -##                                                                            ##<br>
> -################################################################################<br>
> +# SPDX-License-Identifier: GPL-2.0-or-later<br>
> +# Copyright (c) 2009 FUJITSU LIMITED<br>
> +# Copyright (c) 2015 Cedric Hnyda <<a href="mailto:chnyda@suse.com" target="_blank">chnyda@suse.com</a>><br>
> +# Copyright (c) 2015-2016 Cyril Hrubis <<a href="mailto:chrubis@suse.cz" target="_blank">chrubis@suse.cz</a>><br>
> +# Author: Shi Weihua <<a href="mailto:shiwh@cn.fujitsu.com" target="_blank">shiwh@cn.fujitsu.com</a>><br>
><br>
>  TCID="cgroup_fj_function2"<br>
> -TST_TOTAL=7<br>
> +TST_TESTFUNC=test<br>
> +TST_SETUP=setup<br>
> +TST_CLEANUP=cleanup<br>
> +TST_CNT=9<br>
> +TST_POS_ARGS=1<br>
><br>
>  . cgroup_fj_common.sh<br>
><br>
> @@ -36,7 +22,7 @@ usage_and_exit()<br>
>      echo "  ./cgroup_fj_function2.sh subsystem"<br>
>      echo "example: ./cgroup_fj_function2.sh cpuset"<br>
><br>
> -    tst_brkm TBROK "$1"<br>
> +    tst_brk TBROK "$1"<br>
>  }<br>
><br>
>  if [ "$#" -ne "1" ]; then<br>
> @@ -46,49 +32,67 @@ fi<br>
>  # Move a task from group to group<br>
>  test1()<br>
>  {<br>
> +    # mv'ing cgroups is not available in cgroup2<br>
> +    if [ "$cgroup_v" = "V2" ]; then<br>
> +        tst_res TCONF "Controller mounted on cgroup2 hierachy, skipping test"<br>
> +        return<br>
> +    fi<br>
> +<br>
>      if ! attach_and_check "$pid" "$start_path/ltp_1"; then<br>
> -         tst_resm TFAIL "Failed to attach task"<br>
> +         tst_res TFAIL "Failed to attach task"<br>
>           return<br>
>      fi<br>
><br>
>      if ! attach_and_check "$pid" "$start_path"; then<br>
> -         tst_resm TFAIL "Failed to attach task"<br>
> +         tst_res TFAIL "Failed to attach task"<br>
>           return<br>
>      fi<br>
><br>
> -    tst_resm TPASS "Task attached succesfully"<br>
> +    tst_res TPASS "Task attached succesfully"<br>
>  }<br>
><br>
>  # Group can be renamed with mv<br>
>  test2()<br>
>  {<br>
> +    # mv'ing cgroups is not available in cgroup2<br>
> +    if [ "$cgroup_v" = "V2" ]; then<br>
> +        tst_res TCONF "Controller mounted on cgroup2 hierachy, skipping test"<br>
> +        return<br>
> +    fi<br>
> +<br>
>      create_subgroup "$start_path/ltp_2"<br>
><br>
>      if ! mv "$start_path/ltp_2" "$start_path/ltp_3"; then<br>
> -        tst_resm TFAIL "Failed to move $start_path/ltp_2 to $start_path/ltp_3"<br>
> +        tst_res TFAIL "Failed to move $start_path/ltp_2 to $start_path/ltp_3"<br>
>          rmdir "$start_path/ltp_2"<br>
>          return<br>
>      fi<br>
><br>
>      if ! rmdir "$start_path/ltp_3"; then<br>
> -        tst_resm TFAIL "Failed to remove $start_path/ltp_3"<br>
> +        tst_res TFAIL "Failed to remove $start_path/ltp_3"<br>
>          return<br>
>      fi<br>
><br>
> -    tst_resm TPASS "Successfully moved $start_path/ltp_2 to $start_path/ltp_3"<br>
> +    tst_res TPASS "Successfully moved $start_path/ltp_2 to $start_path/ltp_3"<br>
>  }<br>
><br>
>  # Group can be renamed with mv unless the target name exists<br>
>  test3()<br>
>  {<br>
> +    # mv'ing cgroups is not available in cgroup2<br>
> +    if [ "$cgroup_v" = "V2" ]; then<br>
> +        tst_res TCONF "Controller mounted on cgroup2 hierachy, skipping test"<br>
> +        return<br>
> +    fi<br>
> +<br>
>      create_subgroup "$start_path/ltp_2"<br>
><br>
>      if mv "$start_path/ltp_2" "$start_path/ltp_1" > /dev/null 2>&1; then<br>
> -        tst_resm TFAIL "Moved $start_path/ltp_2 over existing $start_path/ltp_1"<br>
> +        tst_res TFAIL "Moved $start_path/ltp_2 over existing $start_path/ltp_1"<br>
>          return<br>
>      fi<br>
><br>
> -    tst_resm TPASS "Failed to move $start_path/ltp_2 over existing $start_path/ltp_1"<br>
> +    tst_res TPASS "Failed to move $start_path/ltp_2 over existing $start_path/ltp_1"<br>
><br>
>      ROD rmdir "$start_path/ltp_2"<br>
>  }<br>
> @@ -97,77 +101,104 @@ test3()<br>
>  test4()<br>
>  {<br>
>      if ! attach_and_check "$pid" "$start_path/ltp_1"; then<br>
> -        tst_resm TFAIL "Failed to attach $pid to $start_path/ltp_1"<br>
> +        tst_res TFAIL "Failed to attach $pid to $start_path/ltp_1"<br>
>          return<br>
>      fi<br>
><br>
>      if rmdir "$start_path/ltp_1" > /dev/null 2>&1; then<br>
> -        tst_resm TFAIL "Removed $start_path/ltp_1 which contains task $pid"<br>
> -        create_subgroup "$start_path/ltp_1"<br>
> +        tst_res TFAIL "Removed $start_path/ltp_1 which contains task $pid"<br>
>          return<br>
>      fi<br>
><br>
> -    tst_resm TPASS "Group $start_path/ltp_1 with task $pid cannot be removed"<br>
> +    tst_res TPASS "Group $start_path/ltp_1 with task $pid cannot be removed"<br>
>  }<br>
><br>
>  # Group with a subgroup cannot be removed<br>
>  test5()<br>
>  {<br>
> +    # We need to move the tasks back to root to create a subgroup<br>
> +    if [ "$cgroup_v" = "V2" ]; then<br>
> +        for pid in $(cat "$start_path/ltp_1/$task_list"); do<br>
> +                   echo $pid > "$mount_point/$task_list" 2> /dev/null<br>
> +           done<br>
> +<br>
> +        ROD echo "+$subsystem" \> "$start_path/ltp_1/cgroup.subtree_control"<br>
> +    fi<br>
> +<br>
>      create_subgroup "$start_path/ltp_1/a"<br>
><br>
>      if rmdir "$start_path/ltp_1" > /dev/null 2>&1; then<br>
> -        tst_resm TFAIL "Removed $start_path/ltp_1 which contains subdir 'a'"<br>
> +        tst_res TFAIL "Removed $start_path/ltp_1 which contains subdir 'a'"<br>
>          return<br>
>      fi<br>
><br>
> -    tst_resm TPASS "Dir $start_path/ltp_1 with subdir 'a' cannot be removed"<br>
> +    tst_res TPASS "Dir $start_path/ltp_1 with subdir 'a' cannot be removed"<br>
><br>
>      ROD rmdir "$start_path/ltp_1/a"<br>
><br>
> -    ROD echo "$pid" \> "$start_path/tasks"<br>
> +    [ "$cgroup_v" = "V2" ] && ROD echo "-$subsystem" \> "$start_path/ltp_1/cgroup.subtree_control"<br>
> +    ROD echo "$pid" \> "$start_path/ltp_1/$task_list"<br>
>  }<br>
><br>
>  # Group cannot be moved outside of hierarchy<br>
>  test6()<br>
>  {<br>
> +    # mv'ing cgroups is not available in cgroup2<br>
> +    if [ "$cgroup_v" = "V2" ]; then<br>
> +        tst_res TCONF "Controller mounted on cgroup2 hierachy, skipping test"<br>
> +        return<br>
> +    fi<br>
> +<br>
>      if mv "$start_path/ltp_1" "$PWD/ltp" > /dev/null 2>&1; then<br>
> -        tst_resm TFAIL "Subgroup $start_path/ltp_1 outside hierarchy to $PWD/ltp"<br>
> +        tst_res TFAIL "Subgroup $start_path/ltp_1 outside hierarchy to $PWD/ltp"<br>
>          return<br>
>      fi<br>
><br>
> -    tst_resm TPASS "Subgroup $start_path/ltp_1 cannot be moved to $PWD/ltp"<br>
> +    tst_res TPASS "Subgroup $start_path/ltp_1 cannot be moved to $PWD/ltp"<br>
>  }<br>
><br>
>  # Tasks file cannot be removed<br>
>  test7()<br>
>  {<br>
> -    if rm "$start_path/ltp_1/tasks" > /dev/null 2>&1; then<br>
> -        tst_resm TFAIL "Tasks file $start_path/ltp_1/tasks could be removed"<br>
> +    if rm "$start_path/ltp_1/$task_list" > /dev/null 2>&1; then<br>
> +        tst_res TFAIL "Tasks file $start_path/ltp_1/$task_list could be removed"<br>
>          return<br>
>      fi<br>
><br>
> -    tst_resm TPASS "Tasks file $start_path/ltp_1/tasks cannot be removed"<br>
> +    tst_res TPASS "Tasks file $start_path/ltp_1/tasks cannot be removed"<br>
>  }<br>
><br>
>  # Test notify_on_release with invalid inputs<br>
>  test8()<br>
>  {<br>
> +    # notify_on_release is not available in cgroup2 so skip the test<br>
> +    if [ "$cgroup_v" = "V2" ]; then<br>
> +        tst_res TCONF "Controller mounted on cgroup2 hierachy, skipping test"<br>
> +        return<br>
> +    fi<br>
> +<br>
>      if echo "-1" > "$start_path/ltp_1/notify_on_release" 2>/dev/null; then<br>
> -        tst_resm TFAIL "Can write -1 to $start_path/ltp_1/notify_on_release"<br>
> +        tst_res TFAIL "Can write -1 to $start_path/ltp_1/notify_on_release"<br>
>          return<br>
>      fi<br>
><br>
>      if echo "ltp" > "$start_path/ltp_1/notify_on_release" 2>/dev/null; then<br>
> -        tst_resm TFAIL "Can write ltp to $start_path/ltp_1/notify_on_release"<br>
> +        tst_res TFAIL "Can write ltp to $start_path/ltp_1/notify_on_release"<br>
>          return<br>
>      fi<br>
><br>
> -    tst_resm TPASS "Cannot write invalid values to $start_path/ltp_1/notify_on_release"<br>
> +    tst_res TPASS "Cannot write invalid values to $start_path/ltp_1/notify_on_release"<br>
>  }<br>
><br>
>  # Test that notify_on_release can be changed<br>
>  test9()<br>
>  {<br>
> +    # notify_on_release is not available in cgroup2 so skip the test<br>
> +    if [ "$cgroup_v" = "V2" ]; then<br>
> +        tst_res TCONF "Controller mounted on cgroup2 hierachy, skipping test"<br>
> +        return<br>
> +    fi<br>
> +<br>
>      local notify=$(ROD cat "$start_path/ltp_1/notify_on_release")<br>
>      local value<br>
><br>
> @@ -178,37 +209,29 @@ test9()<br>
>      fi<br>
><br>
>      if ! echo "$value" > "$start_path/ltp_1/notify_on_release"; then<br>
> -        tst_resm TFAIL "Failed to set $start_path/ltp_1/notify_on_release to $value"<br>
> +        tst_res TFAIL "Failed to set $start_path/ltp_1/notify_on_release to $value"<br>
>          return<br>
>      fi<br>
><br>
>      ROD echo "$notify" \> "$start_path/ltp_1/notify_on_release"<br>
><br>
> -    tst_resm TPASS "Set $start_path/ltp_1/notify_on_release to $value"<br>
> +    tst_res TPASS "Set $start_path/ltp_1/notify_on_release to $value"<br>
>  }<br>
><br>
> -setup<br>
> -<br>
> -cgroup_fj_proc&<br>
> -pid=$!<br>
> -<br>
> -start_path="$mount_point/ltp"<br>
> -<br>
> -create_subgroup "$start_path"<br>
> -create_subgroup "$start_path/ltp_1"<br>
> -<br>
> -test1<br>
> -test2<br>
> -test3<br>
> -test4<br>
> -test5<br>
> -test6<br>
> -test7<br>
> -test8<br>
> -test9<br>
> +setup()<br>
> +{<br>
> +    common_setup<br>
> +    cgroup_fj_proc&<br>
> +    pid=$!<br>
> +    create_subgroup "$start_path/ltp_1"<br>
> +}<br>
<br>
<br>
Btw, I got a TBROK when running the "cgroup_fj_function.sh blkio", but this<br>
looks not related to your patch, I'll try to look into the problem.<br>
<br>
--------------<br>
tst_cgroup.c:829: TINFO: Could not mount V1 CGroup on<br>
/tmp/cgroup_blkio: EBUSY (16)<br>
tst_cgroup.c:932: TCONF: 'blkio' controller required, but not available<br>
cgroup_fj_function 1 TBROK: cgroup_require: No state was set after<br>
call. Controller 'blkio' maybe does not exist?<br>
<br>
<br></blockquote><div><br></div><div>Yes this is the blkio/io controller problem Richard mentioned earlier and doesent have anything to do with these patches. <br></div><div><br></div><div>Thanks, <br></div><div><br></div><div>-  Luke<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
-- <br>
Regards,<br>
Li Wang<br>
<br>
</blockquote></div></div>