• David Vernet's avatar
    cgroup: Add test_cpucg_stats() testcase to cgroup cpu selftests · 3c879a1b
    David Vernet authored
    test_cpu.c includes testcases that validate the cgroup cpu controller.
    This patch adds a new testcase called test_cpucg_stats() that verifies the
    expected behavior of the cpu.stat interface. In doing so, we define a
    new hog_cpus_timed() function which takes a cpu_hog_func_param struct
    that configures how many CPUs it uses, and how long it runs. Future
    patches will also spawn threads that hog CPUs, so this function will
    eventually serve those use-cases as well.
    Signed-off-by: default avatarDavid Vernet <void@manifault.com>
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    3c879a1b
test_cpu.c 4.79 KB