Hi.

On Wed, Oct 28, 2020 at 01:03:23PM -0600, Tom Hromatka 
<tom.hroma...@oracle.com> wrote:
> +    version = Cgroup.version(CONTROLLER)
> +    if version == Cgroup.CGROUP_UNK:
> +        raise ValueError("Unable to get the controller version for 
> {}".format(
> +                         CONTROLLER))
> +
> +    if version == Cgroup.CGROUP_V1:
> +        Cgroup.set(config, CGNAME, CGV1_SETTING, CGV1_VALUE)
> +    else:
> +        Cgroup.set(config, CGNAME, CGV2_SETTING, CGV2_VALUE)
I'd suggest logging a message what variant of the test is being run (to
see in the test report what was actually tested when it depends on the
environment). Alternatively, split the tests into v1 and v2 and skip the
variant that doesn't apply (this may be an overkill for this purpose
though).

Michal

_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to