Am 06.03.25 um 13:07 schrieb Dominik Csapak:
> On 3/6/25 13:00, Fiona Ebner wrote:
>> Am 06.03.25 um 11:44 schrieb Dominik Csapak:
>>> @@ -528,3 +533,19 @@ if (my $file = shift) {
>>>   }
>>>     done_testing();
>>
>> Nit: Since the check below can die, I'd put it at the very beginning
>> rather than at the end.
> 
> mhmm ok, the rationale was that when letting the tests run manually,
> the warning can be seen when it's at the end, but if it's printed at the
> start, it'll most likely be overlooked...
> 
> i played around with requiring input from the user to continue,
> but that didn't work at all when building (and is probably not
> a good idea in general when running tests..)
> 
> Not sure how we can make the warning more visible while not failing the
> tests at the same time...
Thinking again about the whole pinning, I'm not sure we really want to.
If there are changes based on the binary version (rare), I do want to
have the actual tests be run immediately. Tests should not change
between binary versions without intent. The exception is here, with the
bumped pve version. And I don't mean the bumping itself, that has intent
and is fine. If we bump the pve version, that QEMU version is already
public (or we could've still made the change based on the QEMU version
rather than pve version ;)). The actual issue is with QEMU 10.0 where we
will need to adapt the tests for un-bumping the pve version again. That
does not have intent and that will temporarily break build.

Maybe we can still use the installed version for running tests by
default. We can add an environment variable or similar for overriding
the test version. Additionally, record the expected version in the test
script and die if it doesn't match the installed binary, suggesting to
use the override.

Then the package can still be built by setting the environment variable
as an escape hatch. While usual builds will use and test the current
version that will be running on people's systems.

> 
>>
>>> +
>>> +# reset warn
>>
>> IMHO "Why is the reset needed?" is the interesting part worth commenting
>> here ;)
> 
> true ;), we override the warn handler above to check the warning for the
> expected
> ones, we could of course add some code there to handle this case here,
> but it seemed shorter/more elegant to just reset the handler completely
> when we're done with testing...
> 
>>
>>> +$SIG{__WARN__} = undef;
>>> +if ($base_env->{real_qemu_version} =~ m/^(\d+.\d+)/) {
>>> +    if (PVE::QemuServer::Helpers::version_cmp($1,
>>> $tested_version_major, $2, $tested_version_minor) < 0) {
>>> +        warn "\nWARNING: installed QEMU version bigger than tested
>>> one, please bump!\n";
>>> +    }
>>> +
>>> +    # if we did not bump since the last major QEMU (+1 minor)
>>> release fail the test
>>> +    if (PVE::QemuServer::Helpers::version_cmp($1,
>>> $tested_version_major + 1, $2, 1) >= 0) {
>>
>> I'd rather have a fixed difference between versions trigger the die.
>> Your check behaves the same when the tested version is 10.0 and when the
>> tested version is 10.2. In both cases, having the real version 11.1 will
>> trigger the die.
>>
> 
> not exactly sure what you mean here:
> 
> IIUC, in the scenario where we pinned X.Y, you want the test to fail
> when the real version is:
> 
> X+1.Y ?

Yes, for example. I don't think we should wait longer.

> 
> or when
> 
> X+1.Y+1 ?

That release might not exist, e.g. 10.3 will never exist. Of course you
can make what you want work by distinguishing based on major version
difference.

> 
> or when X+1.Y-1 ?

Similar here.

> 
> my thought here was that we want to update at least once per major
> release (not sure
> if that means anything for qemu though), but leave a wiggle room until
> the first point release

Yes, but I'd prefer being reminded after a fixed difference.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to