Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/int: swap-related fixes #4188

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Commits on May 13, 2024

  1. tests/int/update: fix v2 swap check

    If swap is disabled, we should not run swap tests.
    
    Fixes 4166.
    
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed May 13, 2024
    Configuration menu
    Copy the full SHA
    be7de21 View commit details
    Browse the repository at this point in the history
  2. tests/int: fixup find statements

    1. Add "-maxdepth 2" to not dive too deep into cgroup hierarchy.
    
    2. Add "-type f" to look for a regular file.
    
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed May 13, 2024
    Configuration menu
    Copy the full SHA
    a459392 View commit details
    Browse the repository at this point in the history
  3. tests/int/helpers: fix cgroups_swap check for v2

    In case of cgroup v2, there's no memory.swap.max in the top-level
    cgroup, so we have to use find.
    
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed May 13, 2024
    Configuration menu
    Copy the full SHA
    e5a1f80 View commit details
    Browse the repository at this point in the history
  4. libct/cg/fs/v2: ignore setting swap in some cases

    When swap is being disabled (as set to 0), or set to max, ignore
    non-existent memory.swap.max cgroup file.
    
    If swap is being set explicitly to some value, do return an error like
    before.
    
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed May 13, 2024
    Configuration menu
    Copy the full SHA
    ea3c5a3 View commit details
    Browse the repository at this point in the history
  5. tests/cgroups: separate cgroup v2 swap test

    There are cgroup v2 systems out there that do not have cgroup swap enabled,
    and this test will probably fail in there.
    
    Move it to a separate case, guarded with requires cgroups_swap.
    
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed May 13, 2024
    Configuration menu
    Copy the full SHA
    59ca3a8 View commit details
    Browse the repository at this point in the history