diff options
author | Michal Koutný <mkoutny@suse.com> | 2021-12-10 19:00:45 +0100 |
---|---|---|
committer | Michal Koutný <mkoutny@suse.com> | 2022-01-10 18:22:41 +0100 |
commit | d2bd0bfa362a26a8cd6e1d68e5c485f129fbb379 (patch) | |
tree | 453e7dee913ab63fe5c244ec821a7a42cfe43ae8 /src/test/test-cgroup-util.c | |
parent | core/cgroup: Provide information about applied BFQ scaling (diff) | |
download | systemd-d2bd0bfa362a26a8cd6e1d68e5c485f129fbb379.tar.xz systemd-d2bd0bfa362a26a8cd6e1d68e5c485f129fbb379.zip |
cgroup-util: Move macros to macros and tests to tests
Friends to friends to be consistent with the other macros and make tests
separate from main code.
Diffstat (limited to 'src/test/test-cgroup-util.c')
-rw-r--r-- | src/test/test-cgroup-util.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/test-cgroup-util.c b/src/test/test-cgroup-util.c index 93b114b3fd..7113b07a95 100644 --- a/src/test/test-cgroup-util.c +++ b/src/test/test-cgroup-util.c @@ -426,4 +426,13 @@ TEST(cg_get_keyed_attribute) { } } +TEST(bfq_weight_conversion) { + assert_se(BFQ_WEIGHT(1) == 1); + assert_se(BFQ_WEIGHT(50) == 50); + assert_se(BFQ_WEIGHT(100) == 100); + assert_se(BFQ_WEIGHT(500) == 136); + assert_se(BFQ_WEIGHT(5000) == 545); + assert_se(BFQ_WEIGHT(10000) == 1000); +} + DEFINE_TEST_MAIN(LOG_DEBUG); |