qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eli Schwartz <eschwartz93@gmail.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org, "Michael Roth" <michael.roth@amd.com>,
	"Kostiantyn Kostiuk" <kkostiuk@redhat.com>,
	"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Fabiano Rosas" <farosas@suse.de>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"open list:Rust-related patc..." <qemu-rust@nongnu.org>
Subject: Re: [PATCH] meson: set test programs to not build by default
Date: Wed, 20 Aug 2025 01:12:35 -0400	[thread overview]
Message-ID: <eda4ade9-ba07-4e6e-adf8-e308a9ec3435@gmail.com> (raw)
In-Reply-To: <aKSmyWRB_Gi3kru_@redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 2955 bytes --]

On 8/19/25 12:31 PM, Daniel P. Berrangé wrote:
> On Tue, Aug 19, 2025 at 11:49:40AM -0400, Eli Schwartz wrote:
>> Rather, they are built when running `meson test`. This change is inert
>> unless building with meson 1.7, as previous versions of meson build all
>> `meson test` dependencies as part of `ninja all` as well.
>>
>> See:
>> https://mesonbuild.com/Release-notes-for-1-7-0.html#test-targets-no-longer-built-by-default
>>
>> An existing comment references this meson issue, with an included bug
>> reference, but was written before meson 1.7 fixed the bug. Update the
>> comment to change the advice from "if the bug gets fixed" to "when
>> bumping the minimum meson version".
> 
> I am very much not a fan of projects that do not build test
> programs by default.
> 
> If a dev is changing code and running 'ninja'/'make' everything
> that is affected should be rebuilt to identify any build failures
> that may have introduced immediately. This should include all
> test binaries, regardless of whether the dev is intending to run
> the tests at that time or not.
> 
> We already have too many occassions when contributors submit
> patches that have tests which fail to pass & this will expand
> that problem with contributors submitting patches that fail
> to even pass compilation of the tests.


I don't really understand this division between people who submit broken
untested patches and people who submit broken untested patches. You do
still need to test the patches and reject them for not passing the tests
so no time is really saved. It strikes me as some kind of confusing
optics-based objection, like this is about the exact embarrassment level
of a broken patch.

But your proposal runs counter to existing code already in qemu's build
system, i.e. the comment I've updated. So I don't think it's entirely
fair to raise an objection to my patch at all -- better you should raise
a meta-discussion about this to discuss changing the existing
build_by_defaults.


> If we want the ability to opt-out of building tests by default
> so reduce build time, IMHO that should be behind a 'configure'
> flag / meson_options.txt setting.


There is anyways no point in this being a meson_options.txt setting and
complexifying all test programs via conditionals. As explained in my
link, you can have Makefile itself read a configure option and run:

`ninja all meson-test-prereq`

instead of

`ninja all`

In fact users submitting patches could as well -- but then too, they
could simply run tests for code they touched.

Either way it is definitely of interest to users running a build +
install of a tagged release, to skip building tests they won't run. e.g.
many linux distros make the test phase of packaging be optional.

Automake works the same way -- tests can be excluded from `make && make
install`, but get built on demand by `make check`.


-- 
Eli Schwartz

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 963 bytes --]

  reply	other threads:[~2025-08-20  5:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-19 15:49 [PATCH] meson: set test programs to not build by default Eli Schwartz
2025-08-19 16:31 ` Daniel P. Berrangé
2025-08-20  5:12   ` Eli Schwartz [this message]
2025-08-20 10:23     ` Daniel P. Berrangé

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=eda4ade9-ba07-4e6e-adf8-e308a9ec3435@gmail.com \
    --to=eschwartz93@gmail.com \
    --cc=alex.bennee@linaro.org \
    --cc=aurelien@aurel32.net \
    --cc=berrange@redhat.com \
    --cc=farosas@suse.de \
    --cc=kkostiuk@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=michael.roth@amd.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-rust@nongnu.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;
as well as URLs for NNTP newsgroup(s).