KVM: selftests: Add test cases for unsupported PMU event filter input values
authorJinrong Liang <cloudliang@tencent.com>
Thu, 10 Aug 2023 09:09:43 +0000 (17:09 +0800)
committerSean Christopherson <seanjc@google.com>
Thu, 17 Aug 2023 20:22:57 +0000 (13:22 -0700)
commit86ab6af8b96a6a6c8f86f1b0ea1dd386f43930db
tree50cf3552dfd21e90adf8b0da5f2a76d60cf4bb70
parentde527b1daf69a41a265f48ad7bb9207ca7b7d29b
KVM: selftests: Add test cases for unsupported PMU event filter input values

Add test cases to verify the handling of unsupported input values for the
PMU event filter. The tests cover unsupported "action" values, unsupported
"flags" values, and unsupported "nevents" values. All these cases should
return an error, as they are currently not supported by the filter.
Furthermore, the tests also cover the case where setting non-existent
fixed counters in the fixed bitmap does not fail.

Signed-off-by: Jinrong Liang <cloudliang@tencent.com>
Reviewed-by: Isaku Yamahata <isaku.yamahata@intel.com>
Link: https://lore.kernel.org/r/20230810090945.16053-5-cloudliang@tencent.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c