From: Sean Christopherson <seanjc@google.com>
To: Vipin Sharma <vipinsh@google.com>
Cc: kvm@vger.kernel.org, kvmarm@lists.linux.dev,
kvm-riscv@lists.infradead.org,
linux-arm-kernel@lists.infradead.org, pbonzini@redhat.com,
anup@brainfault.org, borntraeger@linux.ibm.com,
frankja@linux.ibm.com, imbrenda@linux.ibm.com, maz@kernel.org,
oliver.upton@linux.dev
Subject: Re: [PATCH 1/2] KVM: selftests: Add default testfiles for KVM selftests runner
Date: Mon, 5 May 2025 15:57:17 -0700 [thread overview]
Message-ID: <aBlCTfAlKOWG5orI@google.com> (raw)
In-Reply-To: <20250505190538.GA1168139.vipinsh@google.com>
On Mon, May 05, 2025, Vipin Sharma wrote:
> On 2025-04-30 10:01:29, Sean Christopherson wrote:
> > But, I do think we should commit the default.test files to the repository. If
> > they're ephemeral, then several problems arise:
> >
> > 1. For out-of-tree builds, the default.test files should arguably be placed in
> > the OUTPUT directory. But if/when we add curated testcases/, then we'll either
> > end up with multiple testcases/ directories (source and output), or we'll have
> > to copy testcases/ from the source to the output on a normal build, which is
> > rather gross. Or we'd need e.g. "make testcases", which is also gross, e.g.
> > I don't want to have to run yet more commands just to execute tests.
> >
> > 2. Generating default.test could overwrite a user-defined file. That's firmly
> > a user error, but at least if they default.test files are commited, the user
> > will get a hint or three that they're doing things wrong.
> >
> > 3. If the files aren't committed, then they probably should removed on "clean",
> > which isn't the end of the world since they're trivially easy to generate,
> > but it's kinda funky.
> >
> > So, what if we add this to auto-generate the files? It's obviously wasteful since
> > the files will exist 99.9999999% of the time, but the overhead is completely
> > negligible. The only concern I have is if this will do the wrong thing for some
> > build environments, i.e. shove the files in the wrong location.
>
> We can get the current path of the Makefile.kvm by writing this at the top
> of the Makefile.kvm:
> MAKEFILE_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
>
> Then MAKEFILE_DIR will have the source directory of Makfile.kvm and
> testcase will be in the same directory.
>
> With this we can modify the below foreach you wrote by prefixing
> MAKEFILE_DIR to "testcases".
>
> Does this alleviate concern regaring build environment?
Yeah, I think so. FWIW, "concern" probably isn't the right word, more like "the
only thing I haven't thought much about".
--
kvm-riscv mailing list
kvm-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kvm-riscv
WARNING: multiple messages have this Message-ID (diff)
From: Sean Christopherson <seanjc@google.com>
To: Vipin Sharma <vipinsh@google.com>
Cc: kvm@vger.kernel.org, kvmarm@lists.linux.dev,
kvm-riscv@lists.infradead.org,
linux-arm-kernel@lists.infradead.org, pbonzini@redhat.com,
anup@brainfault.org, borntraeger@linux.ibm.com,
frankja@linux.ibm.com, imbrenda@linux.ibm.com, maz@kernel.org,
oliver.upton@linux.dev
Subject: Re: [PATCH 1/2] KVM: selftests: Add default testfiles for KVM selftests runner
Date: Mon, 5 May 2025 15:57:17 -0700 [thread overview]
Message-ID: <aBlCTfAlKOWG5orI@google.com> (raw)
In-Reply-To: <20250505190538.GA1168139.vipinsh@google.com>
On Mon, May 05, 2025, Vipin Sharma wrote:
> On 2025-04-30 10:01:29, Sean Christopherson wrote:
> > But, I do think we should commit the default.test files to the repository. If
> > they're ephemeral, then several problems arise:
> >
> > 1. For out-of-tree builds, the default.test files should arguably be placed in
> > the OUTPUT directory. But if/when we add curated testcases/, then we'll either
> > end up with multiple testcases/ directories (source and output), or we'll have
> > to copy testcases/ from the source to the output on a normal build, which is
> > rather gross. Or we'd need e.g. "make testcases", which is also gross, e.g.
> > I don't want to have to run yet more commands just to execute tests.
> >
> > 2. Generating default.test could overwrite a user-defined file. That's firmly
> > a user error, but at least if they default.test files are commited, the user
> > will get a hint or three that they're doing things wrong.
> >
> > 3. If the files aren't committed, then they probably should removed on "clean",
> > which isn't the end of the world since they're trivially easy to generate,
> > but it's kinda funky.
> >
> > So, what if we add this to auto-generate the files? It's obviously wasteful since
> > the files will exist 99.9999999% of the time, but the overhead is completely
> > negligible. The only concern I have is if this will do the wrong thing for some
> > build environments, i.e. shove the files in the wrong location.
>
> We can get the current path of the Makefile.kvm by writing this at the top
> of the Makefile.kvm:
> MAKEFILE_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
>
> Then MAKEFILE_DIR will have the source directory of Makfile.kvm and
> testcase will be in the same directory.
>
> With this we can modify the below foreach you wrote by prefixing
> MAKEFILE_DIR to "testcases".
>
> Does this alleviate concern regaring build environment?
Yeah, I think so. FWIW, "concern" probably isn't the right word, more like "the
only thing I haven't thought much about".
next prev parent reply other threads:[~2025-05-06 2:35 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-22 0:59 [PATCH 0/2] Add KVM selftest runner Vipin Sharma
2025-02-22 0:59 ` Vipin Sharma
2025-02-22 0:59 ` [PATCH 1/2] KVM: selftests: Add default testfiles for KVM selftests runner Vipin Sharma
2025-02-22 0:59 ` Vipin Sharma
2025-04-30 17:01 ` Sean Christopherson
2025-04-30 17:01 ` Sean Christopherson
2025-05-05 19:05 ` Vipin Sharma
2025-05-05 19:05 ` Vipin Sharma
2025-05-05 22:57 ` Sean Christopherson [this message]
2025-05-05 22:57 ` Sean Christopherson
2025-02-22 0:59 ` [PATCH 2/2] KVM: selftests: Create KVM selftest runner Vipin Sharma
2025-02-22 0:59 ` Vipin Sharma
2025-04-30 21:31 ` Sean Christopherson
2025-04-30 21:31 ` Sean Christopherson
2025-05-05 19:48 ` Vipin Sharma
2025-05-05 19:48 ` Vipin Sharma
2025-05-05 23:26 ` Sean Christopherson
2025-05-05 23:26 ` 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=aBlCTfAlKOWG5orI@google.com \
--to=seanjc@google.com \
--cc=anup@brainfault.org \
--cc=borntraeger@linux.ibm.com \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm-riscv@lists.infradead.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=maz@kernel.org \
--cc=oliver.upton@linux.dev \
--cc=pbonzini@redhat.com \
--cc=vipinsh@google.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.