diff options
| author | Thomas Gleixner <[email protected]> | 2021-09-11 00:38:47 +0200 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2021-09-11 00:38:47 +0200 |
| commit | c2f4954c2d3fc4f77b46c67585e17a58df4ba8e4 (patch) | |
| tree | 533a2077028e02a851e51ad509a0aa3a9107999f /tools/testing/selftests/kvm/kvm_binary_stats_test.c | |
| parent | 4b92d4add5f6dcf21275185c997d6ecb800054cd (diff) | |
| parent | 926de8c4326c14fcf35f1de142019043597a4fac (diff) | |
Merge branch 'linus' into smp/urgent
Ensure that all usage sites of get/put_online_cpus() except for the
struggler in drivers/thermal are gone. So the last user and the deprecated
inlines can be removed.
Diffstat (limited to 'tools/testing/selftests/kvm/kvm_binary_stats_test.c')
| -rw-r--r-- | tools/testing/selftests/kvm/kvm_binary_stats_test.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/kvm_binary_stats_test.c b/tools/testing/selftests/kvm/kvm_binary_stats_test.c index 5906bbc08483..17f65d514915 100644 --- a/tools/testing/selftests/kvm/kvm_binary_stats_test.c +++ b/tools/testing/selftests/kvm/kvm_binary_stats_test.c @@ -109,6 +109,18 @@ static void stats_test(int stats_fd) /* Check size field, which should not be zero */ TEST_ASSERT(pdesc->size, "KVM descriptor(%s) with size of 0", pdesc->name); + /* Check bucket_size field */ + switch (pdesc->flags & KVM_STATS_TYPE_MASK) { + case KVM_STATS_TYPE_LINEAR_HIST: + TEST_ASSERT(pdesc->bucket_size, + "Bucket size of Linear Histogram stats (%s) is zero", + pdesc->name); + break; + default: + TEST_ASSERT(!pdesc->bucket_size, + "Bucket size of stats (%s) is not zero", + pdesc->name); + } size_data += pdesc->size * sizeof(*stats_data); } /* Check overlap */ |