Re: [PATCH v3 3/4] KVM: selftests: Check if event filter meets expectations on fixed counters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 07, 2023, Jinrong Liang wrote:
> +	/*
> +	 * Check the fixed performance counter can count normally works when
> +	 * KVM userspace doesn't set any pmu filter.
> +	 */
> +	TEST_ASSERT(run_vcpu_to_sync(vcpu),
> +		    "Fixed counter does not exist or does not work as expected.");

No punctuation, and print the unexpected return value so that debug isn't too
painful.

> +
> +	for (i = 0; i < BIT(nr_fixed_counters); i++) {
> +		bitmap = BIT(i);
> +		count = test_with_fixed_counter_filter(vcpu, KVM_PMU_EVENT_ALLOW,
> +						       bitmap);
> +		TEST_ASSERT(!!count == !!(bitmap & BIT(idx)),
> +			    "Fixed event filter does not work as expected.");

No punctuation please.

> +
> +		count = test_with_fixed_counter_filter(vcpu, KVM_PMU_EVENT_DENY,
> +						       bitmap);
> +		TEST_ASSERT(!!count == !(bitmap & BIT(idx)),
> +			    "Fixed event filter does not work as expected.");
> +	}
> +}



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux