[LTP] [RFC PATCH v3 1/1] test_controllers: Skip test when cgroup v2 is loaded
Petr Vorel
pvorel@suse.cz
Tue May 27 07:22:42 CEST 2025
> Hi Petr, All,
> Petr Vorel <pvorel@suse.cz> wrote:
> ...
> > Tested-by: Ricardo B. Marlière <rbm@suse.com>
> > Reviewed-by: Petr Vorel <pvorel@suse.cz>
> > Signed-off-by: Jin Guojie <guojie.jin@gmail.com>
> > [ pvorel: simplify, rebased ]
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> Reviewed-by: Li Wang <liwang@redhat.com>
> > Is it even useful nowadays when we have various C and shell based
> > tests? Shouldn't we just delete the test?
> I think we need to dissolve the test_controller.sh file steply, part of
> them can be deleted (e.g. blockio), but others need to be checked
> if it is useful, then goes:
> 1. Delete the overlapped test contents.
> 2. Rewrite the rest with the new API and move into runtest/controllers.
> > It even uses "blockio", shouldn't it be "blkio"?
> It's outdated, we can't even find the run_io_throttle_test.sh file,
> Better to remove them:
> --- a/testcases/kernel/controllers/test_controllers.sh
> +++ b/testcases/kernel/controllers/test_controllers.sh
> @@ -48,8 +48,6 @@ then
> CPU_CONTROLLER_VALUE=`grep -w cpu /proc/cgroups | cut -f4`;
> MEM_CONTROLLER=`grep -w memory /proc/cgroups | cut -f1`;
> MEM_CONTROLLER_VALUE=`grep -w memory /proc/cgroups | cut -f4`;
> - IOTHROTTLE_CONTROLLER=`grep -w blockio /proc/cgroups | cut -f1`;
> - IOTHROTTLE_CONTROLLER_VALUE=`grep -w blockio /proc/cgroups | cut -f4`;
> FREEZER=`grep -w freezer /proc/cgroups | cut -f1`;
> FREEZER_VALUE=`grep -w freezer /proc/cgroups | cut -f4`;
> @@ -85,15 +83,6 @@ then
> echo "Skipping all memory controller testcases....";
> fi
> - if [ "$IOTHROTTLE_CONTROLLER" = "blockio" ] && [
> "$IOTHROTTLE_CONTROLLER_VALUE" = "1" ]
> - then
> - $LTPROOT/testcases/bin/run_io_throttle_test.sh;
> - else
> - echo "CONTROLLERS TESTCASES: WARNING";
> - echo "Either Kernel does not support for io controller
> or functionality is not enabled";
> - echo "Skipping all block device I/O throttling testcases....";
> - fi
> -
> if [ "$FREEZER" = "freezer" ] && [ "$FREEZER_VALUE" = "1" ]
> then
> "$LTPROOT/testcases/bin/run_freezer.sh"
+1, feel free to remove afterwards with my RBT after I merge.
I'll merge my patch today.
Kind regards,
Petr
> > Given the test is still somehow useful, i'm not sure if this is worth to
> > rewrite to cgroup_lib.sh (or even to the C API), but IMHO now before the
> > release I would just skip it on v2.
> Sure, skipping from V2 is safe enough by now.
More information about the ltp
mailing list