* [PATCH] meson: add missing semicolon in pthread_condattr_setclock test
@ 2026-03-30 13:14 Stepan Popov
2026-03-30 13:32 ` Marc-André Lureau
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Stepan Popov @ 2026-03-30 13:14 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Marc-André Lureau, Daniel P . Berrangé,
Philippe Mathieu-Daudé, Stepan Popov
The test code was missing a semicolon after the pthread_condattr_t
variable declaration.
Signed-off-by: Stepan Popov <Stepan.Popov@kaspersky.com>
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index d7c4095b39..5447504ea8 100644
--- a/meson.build
+++ b/meson.build
@@ -2882,7 +2882,7 @@ config_host_data.set('CONFIG_PTHREAD_CONDATTR_SETCLOCK', cc.links(osdep_prefix +
int main(void)
{
- pthread_condattr_t attr
+ pthread_condattr_t attr;
pthread_condattr_init(&attr);
pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
return 0;
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] meson: add missing semicolon in pthread_condattr_setclock test
2026-03-30 13:14 [PATCH] meson: add missing semicolon in pthread_condattr_setclock test Stepan Popov
@ 2026-03-30 13:32 ` Marc-André Lureau
2026-03-30 13:36 ` Daniel P. Berrangé
2026-03-30 13:51 ` Alex Bennée
2026-03-30 14:18 ` Paolo Bonzini
2 siblings, 1 reply; 8+ messages in thread
From: Marc-André Lureau @ 2026-03-30 13:32 UTC (permalink / raw)
To: Stepan Popov
Cc: qemu-devel, Paolo Bonzini, Daniel P . Berrangé,
Philippe Mathieu-Daudé
Hi
On Mon, Mar 30, 2026 at 5:21 PM Stepan Popov <Stepan.Popov@kaspersky.com> wrote:
>
> The test code was missing a semicolon after the pthread_condattr_t
> variable declaration.
>
> Signed-off-by: Stepan Popov <Stepan.Popov@kaspersky.com>
Fixes: 657ac98b58 ("thread-posix: use monotonic clock for QemuCond and
QemuSemaphore")
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> meson.build | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meson.build b/meson.build
> index d7c4095b39..5447504ea8 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -2882,7 +2882,7 @@ config_host_data.set('CONFIG_PTHREAD_CONDATTR_SETCLOCK', cc.links(osdep_prefix +
>
> int main(void)
> {
> - pthread_condattr_t attr
> + pthread_condattr_t attr;
> pthread_condattr_init(&attr);
> pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
> return 0;
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] meson: add missing semicolon in pthread_condattr_setclock test
2026-03-30 13:32 ` Marc-André Lureau
@ 2026-03-30 13:36 ` Daniel P. Berrangé
2026-03-30 14:19 ` Peter Maydell
0 siblings, 1 reply; 8+ messages in thread
From: Daniel P. Berrangé @ 2026-03-30 13:36 UTC (permalink / raw)
To: Marc-André Lureau
Cc: Stepan Popov, qemu-devel, Paolo Bonzini,
Philippe Mathieu-Daudé
On Mon, Mar 30, 2026 at 05:32:33PM +0400, Marc-André Lureau wrote:
> Hi
>
> On Mon, Mar 30, 2026 at 5:21 PM Stepan Popov <Stepan.Popov@kaspersky.com> wrote:
> >
> > The test code was missing a semicolon after the pthread_condattr_t
> > variable declaration.
> >
> > Signed-off-by: Stepan Popov <Stepan.Popov@kaspersky.com>
>
> Fixes: 657ac98b58 ("thread-posix: use monotonic clock for QemuCond and
> QemuSemaphore")
IOW, that commit has been dead code since it was first added years ago,
we've never used the monotonic clock
> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> > ---
> > meson.build | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meson.build b/meson.build
> > index d7c4095b39..5447504ea8 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -2882,7 +2882,7 @@ config_host_data.set('CONFIG_PTHREAD_CONDATTR_SETCLOCK', cc.links(osdep_prefix +
> >
> > int main(void)
> > {
> > - pthread_condattr_t attr
> > + pthread_condattr_t attr;
> > pthread_condattr_init(&attr);
> > pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
> > return 0;
> > --
> > 2.34.1
> >
>
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] meson: add missing semicolon in pthread_condattr_setclock test
2026-03-30 13:14 [PATCH] meson: add missing semicolon in pthread_condattr_setclock test Stepan Popov
2026-03-30 13:32 ` Marc-André Lureau
@ 2026-03-30 13:51 ` Alex Bennée
2026-03-30 14:18 ` Paolo Bonzini
2 siblings, 0 replies; 8+ messages in thread
From: Alex Bennée @ 2026-03-30 13:51 UTC (permalink / raw)
To: Stepan Popov
Cc: qemu-devel, Paolo Bonzini, Marc-André Lureau,
Daniel P . Berrangé, Philippe Mathieu-Daudé
Stepan Popov <Stepan.Popov@kaspersky.com> writes:
> The test code was missing a semicolon after the pthread_condattr_t
> variable declaration.
>
> Signed-off-by: Stepan Popov <Stepan.Popov@kaspersky.com>
> ---
> meson.build | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meson.build b/meson.build
> index d7c4095b39..5447504ea8 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -2882,7 +2882,7 @@ config_host_data.set('CONFIG_PTHREAD_CONDATTR_SETCLOCK', cc.links(osdep_prefix +
>
> int main(void)
> {
> - pthread_condattr_t attr
> + pthread_condattr_t attr;
> pthread_condattr_init(&attr);
> pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
> return 0;
Good catch:
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
I guess we've just been silently failing that test since it was
introduced then?
Cached compiler stderr:
/home/alex/lsrc/qemu.git/builds/all/meson-private/tmpy5s2fh25/testfile.c: In function 'main':
/home/alex/lsrc/qemu.git/builds/all/meson-private/tmpy5s2fh25/testfile.c:23:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pthread_condattr_init'
23 | pthread_condattr_init(&attr);
| ^~~~~~~~~~~~~~~~~~~~~
/home/alex/lsrc/qemu.git/builds/all/meson-private/tmpy5s2fh25/testfile.c:23:28: error: 'attr' undeclared (first use in this function)
23 | pthread_condattr_init(&attr);
| ^~~~
/home/alex/lsrc/qemu.git/builds/all/meson-private/tmpy5s2fh25/testfile.c:23:28: note: each undeclared identifier is reported only once for each function it appears in
Using cached compile:
Cached command line: cc -m64 /home/alex/lsrc/qemu.git/builds/all/meson-private/tmppx1fde_i/testfile.c -o /home/alex/lsrc/qemu.git/builds/all/meson-private/tmppx1fde_i/output.exe -pthread -D_FILE_OFFSET_BITS=64 -O0 -std=gnu11
So maybe:
Fixes: 657ac98b58c (thread-posix: use monotonic clock for QemuCond and QemuSemaphore)
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] meson: add missing semicolon in pthread_condattr_setclock test
2026-03-30 13:14 [PATCH] meson: add missing semicolon in pthread_condattr_setclock test Stepan Popov
2026-03-30 13:32 ` Marc-André Lureau
2026-03-30 13:51 ` Alex Bennée
@ 2026-03-30 14:18 ` Paolo Bonzini
2 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2026-03-30 14:18 UTC (permalink / raw)
To: Stepan Popov
Cc: qemu-devel, Marc-André Lureau, Daniel P . Berrangé,
Philippe Mathieu-Daudé
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] meson: add missing semicolon in pthread_condattr_setclock test
2026-03-30 13:36 ` Daniel P. Berrangé
@ 2026-03-30 14:19 ` Peter Maydell
2026-03-30 14:24 ` Daniel P. Berrangé
2026-03-30 14:25 ` Paolo Bonzini
0 siblings, 2 replies; 8+ messages in thread
From: Peter Maydell @ 2026-03-30 14:19 UTC (permalink / raw)
To: Daniel P. Berrangé
Cc: Marc-André Lureau, Stepan Popov, qemu-devel, Paolo Bonzini,
Philippe Mathieu-Daudé
On Mon, 30 Mar 2026 at 14:36, Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> On Mon, Mar 30, 2026 at 05:32:33PM +0400, Marc-André Lureau wrote:
> > Hi
> >
> > On Mon, Mar 30, 2026 at 5:21 PM Stepan Popov <Stepan.Popov@kaspersky.com> wrote:
> > >
> > > The test code was missing a semicolon after the pthread_condattr_t
> > > variable declaration.
> > >
> > > Signed-off-by: Stepan Popov <Stepan.Popov@kaspersky.com>
> >
> > Fixes: 657ac98b58 ("thread-posix: use monotonic clock for QemuCond and
> > QemuSemaphore")
>
> IOW, that commit has been dead code since it was first added years ago,
> we've never used the monotonic clock
Yes. So are we confident enough in that never-tested feature to want to
enable it at this point in the release cycle, or should we hold off on
this bugfix until 11.1 ?
-- PMM
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] meson: add missing semicolon in pthread_condattr_setclock test
2026-03-30 14:19 ` Peter Maydell
@ 2026-03-30 14:24 ` Daniel P. Berrangé
2026-03-30 14:25 ` Paolo Bonzini
1 sibling, 0 replies; 8+ messages in thread
From: Daniel P. Berrangé @ 2026-03-30 14:24 UTC (permalink / raw)
To: Peter Maydell
Cc: Marc-André Lureau, Stepan Popov, qemu-devel, Paolo Bonzini,
Philippe Mathieu-Daudé
On Mon, Mar 30, 2026 at 03:19:40PM +0100, Peter Maydell wrote:
> On Mon, 30 Mar 2026 at 14:36, Daniel P. Berrangé <berrange@redhat.com> wrote:
> >
> > On Mon, Mar 30, 2026 at 05:32:33PM +0400, Marc-André Lureau wrote:
> > > Hi
> > >
> > > On Mon, Mar 30, 2026 at 5:21 PM Stepan Popov <Stepan.Popov@kaspersky.com> wrote:
> > > >
> > > > The test code was missing a semicolon after the pthread_condattr_t
> > > > variable declaration.
> > > >
> > > > Signed-off-by: Stepan Popov <Stepan.Popov@kaspersky.com>
> > >
> > > Fixes: 657ac98b58 ("thread-posix: use monotonic clock for QemuCond and
> > > QemuSemaphore")
> >
> > IOW, that commit has been dead code since it was first added years ago,
> > we've never used the monotonic clock
>
> Yes. So are we confident enough in that never-tested feature to want to
> enable it at this point in the release cycle, or should we hold off on
> this bugfix until 11.1 ?
IMHO waiting until 11.1 is the prudent approach. This is not a
regression fix and clearly no one noticed it wasn't doing anything
for 3 years since it was introduced, so fixing it can't be that
urgent ?
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] meson: add missing semicolon in pthread_condattr_setclock test
2026-03-30 14:19 ` Peter Maydell
2026-03-30 14:24 ` Daniel P. Berrangé
@ 2026-03-30 14:25 ` Paolo Bonzini
1 sibling, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2026-03-30 14:25 UTC (permalink / raw)
To: Peter Maydell
Cc: Daniel P. Berrangé, Marc-André Lureau, Stepan Popov,
qemu-devel, Philippe Mathieu-Daudé
On Mon, Mar 30, 2026 at 4:20 PM Peter Maydell <peter.maydell@linaro.org> wrote:
> > IOW, that commit has been dead code since it was first added years ago,
> > we've never used the monotonic clock
>
> Yes. So are we confident enough in that never-tested feature to want to
> enable it at this point in the release cycle, or should we hold off on
> this bugfix until 11.1 ?
In practice the difference between the two is almost always
unnoticeable. Because it affects pthread_cond_timedwait, the only
difference would mean making a timeout slighly shorter or longer...
and just once. It's just unaesthetic to use CLOCK_REALTIME instad of
CLOCK_MONOTONIC.
Paolo
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-03-30 14:26 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-30 13:14 [PATCH] meson: add missing semicolon in pthread_condattr_setclock test Stepan Popov
2026-03-30 13:32 ` Marc-André Lureau
2026-03-30 13:36 ` Daniel P. Berrangé
2026-03-30 14:19 ` Peter Maydell
2026-03-30 14:24 ` Daniel P. Berrangé
2026-03-30 14:25 ` Paolo Bonzini
2026-03-30 13:51 ` Alex Bennée
2026-03-30 14:18 ` Paolo Bonzini
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.