From: Sean Christopherson <seanjc@google.com>
To: Manali Shukla <manali.shukla@amd.com>
Cc: kvm@vger.kernel.org, linux-kselftest@vger.kernel.org,
pbonzini@redhat.com, shuah@kernel.org, nikunj@amd.com
Subject: Re: [PATCH v1 4/4] KVM: selftests: Replace previously used vm_get_stat() to macro
Date: Thu, 19 Dec 2024 16:42:54 -0800 [thread overview]
Message-ID: <Z2S9jtXSRQg4_IXw@google.com> (raw)
In-Reply-To: <20241021062226.108657-5-manali.shukla@amd.com>
On Mon, Oct 21, 2024, Manali Shukla wrote:
> Compile tested both the selftests.
To be very blunt, not actually testing changes of this nature isn't acceptable.
The HugeTLB dependency of dirty_log_page_splitting_test makes it annoying to run,
as does the root user dependency of nx_huge_pages_test.sh, but I wouldn't say
that running them is hard.
It's a-ok to not fully test code when you don't have the necessary hardware,
configuration, etc., but generally speaking the expectation is that you test the
code you post.
> static void get_page_stats(struct kvm_vm *vm, struct kvm_page_stats *stats, const char *stage)
> {
> - stats->pages_4k = vm_get_stat(vm, "pages_4k");
> - stats->pages_2m = vm_get_stat(vm, "pages_2m");
> - stats->pages_1g = vm_get_stat(vm, "pages_1g");
> + stats->pages_4k = vm_get_stat(vm, pages_4k);
> + stats->pages_2m = vm_get_stat(vm, pages_2m);
> + stats->pages_1g = vm_get_stat(vm, pages_1g);
Converting vm_get_stats() to a macro, or rather, changing its parameter to do
token pasting, absolutely must update all users at the same time. With only the
previous patch applied, the affected tests fail because they try to get stats
for the string "\"<stat>\"".
next prev parent reply other threads:[~2024-12-20 0:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-21 6:22 [PATCH v1 0/4] KVM selftests enhancements Manali Shukla
2024-10-21 6:22 ` [PATCH v1 1/4] KVM: selftests: Add safe_halt() and cli() helpers to common code Manali Shukla
2024-12-19 17:39 ` Sean Christopherson
2024-10-21 6:22 ` [PATCH v1 2/4] KVM: selftests: Add an interface to read the data of named vcpu stat Manali Shukla
2024-12-20 0:35 ` Sean Christopherson
2024-10-21 6:22 ` [PATCH v1 3/4] KVM: selftests: convert vm_get_stat to macro Manali Shukla
2024-10-21 6:22 ` [PATCH v1 4/4] KVM: selftests: Replace previously used vm_get_stat() " Manali Shukla
2024-12-20 0:42 ` Sean Christopherson [this message]
2024-11-28 15:06 ` [PATCH v1 0/4] KVM selftests enhancements Manali Shukla
2024-12-20 0:52 ` Sean Christopherson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z2S9jtXSRQg4_IXw@google.com \
--to=seanjc@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=manali.shukla@amd.com \
--cc=nikunj@amd.com \
--cc=pbonzini@redhat.com \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox