* [PATCH] meson.build: Set RUST_BACKTRACE for all tests
@ 2025-03-10 10:29 Peter Maydell
2025-03-10 10:32 ` Daniel P. Berrangé
2025-03-10 13:15 ` Philippe Mathieu-Daudé
0 siblings, 2 replies; 6+ messages in thread
From: Peter Maydell @ 2025-03-10 10:29 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Daniel P. Berrangé, Thomas Huth,
Alex Bennée, Philippe Mathieu-Daudé,
Marc-André Lureau
We want to capture potential Rust backtraces on panics in our test
logs, which isn't Rust's default behaviour. Set RUST_BACKTRACE=1 in
the add_test_setup environments, so that all our tests get run with
this environment variable set.
This makes the setting of that variable in the gitlab CI template
redundant, so we can remove it.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
meson.build | 9 ++++++---
.gitlab-ci.d/buildtest-template.yml | 1 -
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 8b9fda4d95e..2f373dc675f 100644
--- a/meson.build
+++ b/meson.build
@@ -5,9 +5,12 @@ project('qemu', ['c'], meson_version: '>=1.5.0',
meson.add_devenv({ 'MESON_BUILD_ROOT' : meson.project_build_root() })
-add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: true)
-add_test_setup('slow', exclude_suites: ['thorough'], env: ['G_TEST_SLOW=1', 'SPEED=slow'])
-add_test_setup('thorough', env: ['G_TEST_SLOW=1', 'SPEED=thorough'])
+add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: true,
+ env: ['RUST_BACKTRACE=1'])
+add_test_setup('slow', exclude_suites: ['thorough'],
+ env: ['G_TEST_SLOW=1', 'SPEED=slow', 'RUST_BACKTRACE=1'])
+add_test_setup('thorough',
+ env: ['G_TEST_SLOW=1', 'SPEED=thorough', 'RUST_BACKTRACE=1'])
meson.add_postconf_script(find_program('scripts/symlink-install-tree.py'))
diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml
index 4cc19239319..39da7698b09 100644
--- a/.gitlab-ci.d/buildtest-template.yml
+++ b/.gitlab-ci.d/buildtest-template.yml
@@ -63,7 +63,6 @@
stage: test
image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:$QEMU_CI_CONTAINER_TAG
script:
- - export RUST_BACKTRACE=1
- source scripts/ci/gitlab-ci-section
- section_start buildenv "Setting up to run tests"
- scripts/git-submodule.sh update roms/SLOF
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] meson.build: Set RUST_BACKTRACE for all tests
2025-03-10 10:29 [PATCH] meson.build: Set RUST_BACKTRACE for all tests Peter Maydell
@ 2025-03-10 10:32 ` Daniel P. Berrangé
2025-03-10 13:15 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 6+ messages in thread
From: Daniel P. Berrangé @ 2025-03-10 10:32 UTC (permalink / raw)
To: Peter Maydell
Cc: qemu-devel, Paolo Bonzini, Thomas Huth, Alex Bennée,
Philippe Mathieu-Daudé, Marc-André Lureau
On Mon, Mar 10, 2025 at 10:29:50AM +0000, Peter Maydell wrote:
> We want to capture potential Rust backtraces on panics in our test
> logs, which isn't Rust's default behaviour. Set RUST_BACKTRACE=1 in
> the add_test_setup environments, so that all our tests get run with
> this environment variable set.
>
> This makes the setting of that variable in the gitlab CI template
> redundant, so we can remove it.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> meson.build | 9 ++++++---
> .gitlab-ci.d/buildtest-template.yml | 1 -
> 2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index 8b9fda4d95e..2f373dc675f 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -5,9 +5,12 @@ project('qemu', ['c'], meson_version: '>=1.5.0',
>
> meson.add_devenv({ 'MESON_BUILD_ROOT' : meson.project_build_root() })
>
> -add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: true)
> -add_test_setup('slow', exclude_suites: ['thorough'], env: ['G_TEST_SLOW=1', 'SPEED=slow'])
> -add_test_setup('thorough', env: ['G_TEST_SLOW=1', 'SPEED=thorough'])
> +add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: true,
> + env: ['RUST_BACKTRACE=1'])
Indent off-by-1
> +add_test_setup('slow', exclude_suites: ['thorough'],
> + env: ['G_TEST_SLOW=1', 'SPEED=slow', 'RUST_BACKTRACE=1'])
> +add_test_setup('thorough',
> + env: ['G_TEST_SLOW=1', 'SPEED=thorough', 'RUST_BACKTRACE=1'])
>
> meson.add_postconf_script(find_program('scripts/symlink-install-tree.py'))
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] meson.build: Set RUST_BACKTRACE for all tests
2025-03-10 10:29 [PATCH] meson.build: Set RUST_BACKTRACE for all tests Peter Maydell
2025-03-10 10:32 ` Daniel P. Berrangé
@ 2025-03-10 13:15 ` Philippe Mathieu-Daudé
2025-03-10 13:18 ` Peter Maydell
1 sibling, 1 reply; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-03-10 13:15 UTC (permalink / raw)
To: Peter Maydell, qemu-devel
Cc: Paolo Bonzini, Daniel P. Berrangé, Thomas Huth,
Alex Bennée, Marc-André Lureau
On 10/3/25 11:29, Peter Maydell wrote:
> We want to capture potential Rust backtraces on panics in our test
> logs, which isn't Rust's default behaviour. Set RUST_BACKTRACE=1 in
> the add_test_setup environments, so that all our tests get run with
> this environment variable set.
>
> This makes the setting of that variable in the gitlab CI template
> redundant, so we can remove it.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> meson.build | 9 ++++++---
> .gitlab-ci.d/buildtest-template.yml | 1 -
> 2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index 8b9fda4d95e..2f373dc675f 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -5,9 +5,12 @@ project('qemu', ['c'], meson_version: '>=1.5.0',
>
> meson.add_devenv({ 'MESON_BUILD_ROOT' : meson.project_build_root() })
>
> -add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: true)
> -add_test_setup('slow', exclude_suites: ['thorough'], env: ['G_TEST_SLOW=1', 'SPEED=slow'])
> -add_test_setup('thorough', env: ['G_TEST_SLOW=1', 'SPEED=thorough'])
> +add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: true,
> + env: ['RUST_BACKTRACE=1'])
> +add_test_setup('slow', exclude_suites: ['thorough'],
> + env: ['G_TEST_SLOW=1', 'SPEED=slow', 'RUST_BACKTRACE=1'])
> +add_test_setup('thorough',
> + env: ['G_TEST_SLOW=1', 'SPEED=thorough', 'RUST_BACKTRACE=1'])
Nitpicking, we can keep sorted:
env: ['G_TEST_SLOW=1', 'RUST_BACKTRACE=1', 'SPEED=thorough'])
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] meson.build: Set RUST_BACKTRACE for all tests
2025-03-10 13:15 ` Philippe Mathieu-Daudé
@ 2025-03-10 13:18 ` Peter Maydell
2025-03-10 17:34 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 6+ messages in thread
From: Peter Maydell @ 2025-03-10 13:18 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Paolo Bonzini, Daniel P. Berrangé, Thomas Huth,
Alex Bennée, Marc-André Lureau
On Mon, 10 Mar 2025 at 13:15, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> On 10/3/25 11:29, Peter Maydell wrote:
> > We want to capture potential Rust backtraces on panics in our test
> > logs, which isn't Rust's default behaviour. Set RUST_BACKTRACE=1 in
> > the add_test_setup environments, so that all our tests get run with
> > this environment variable set.
> >
> > This makes the setting of that variable in the gitlab CI template
> > redundant, so we can remove it.
> >
> > Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> > ---
> > meson.build | 9 ++++++---
> > .gitlab-ci.d/buildtest-template.yml | 1 -
> > 2 files changed, 6 insertions(+), 4 deletions(-)
> >
> > diff --git a/meson.build b/meson.build
> > index 8b9fda4d95e..2f373dc675f 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -5,9 +5,12 @@ project('qemu', ['c'], meson_version: '>=1.5.0',
> >
> > meson.add_devenv({ 'MESON_BUILD_ROOT' : meson.project_build_root() })
> >
> > -add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: true)
> > -add_test_setup('slow', exclude_suites: ['thorough'], env: ['G_TEST_SLOW=1', 'SPEED=slow'])
> > -add_test_setup('thorough', env: ['G_TEST_SLOW=1', 'SPEED=thorough'])
> > +add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: true,
> > + env: ['RUST_BACKTRACE=1'])
> > +add_test_setup('slow', exclude_suites: ['thorough'],
> > + env: ['G_TEST_SLOW=1', 'SPEED=slow', 'RUST_BACKTRACE=1'])
> > +add_test_setup('thorough',
> > + env: ['G_TEST_SLOW=1', 'SPEED=thorough', 'RUST_BACKTRACE=1'])
>
> Nitpicking, we can keep sorted:
>
> env: ['G_TEST_SLOW=1', 'RUST_BACKTRACE=1', 'SPEED=thorough'])
That splits up the two envariables that are controlling the
"run the slow tests" behaviour, though...
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] meson.build: Set RUST_BACKTRACE for all tests
2025-03-10 13:18 ` Peter Maydell
@ 2025-03-10 17:34 ` Philippe Mathieu-Daudé
2025-03-10 17:43 ` Peter Maydell
0 siblings, 1 reply; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-03-10 17:34 UTC (permalink / raw)
To: Peter Maydell
Cc: qemu-devel, Paolo Bonzini, Daniel P. Berrangé, Thomas Huth,
Alex Bennée, Marc-André Lureau
On 10/3/25 14:18, Peter Maydell wrote:
> On Mon, 10 Mar 2025 at 13:15, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>>
>> On 10/3/25 11:29, Peter Maydell wrote:
>>> We want to capture potential Rust backtraces on panics in our test
>>> logs, which isn't Rust's default behaviour. Set RUST_BACKTRACE=1 in
>>> the add_test_setup environments, so that all our tests get run with
>>> this environment variable set.
>>>
>>> This makes the setting of that variable in the gitlab CI template
>>> redundant, so we can remove it.
>>>
>>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>>> ---
>>> meson.build | 9 ++++++---
>>> .gitlab-ci.d/buildtest-template.yml | 1 -
>>> 2 files changed, 6 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/meson.build b/meson.build
>>> index 8b9fda4d95e..2f373dc675f 100644
>>> --- a/meson.build
>>> +++ b/meson.build
>>> @@ -5,9 +5,12 @@ project('qemu', ['c'], meson_version: '>=1.5.0',
>>>
>>> meson.add_devenv({ 'MESON_BUILD_ROOT' : meson.project_build_root() })
>>>
>>> -add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: true)
>>> -add_test_setup('slow', exclude_suites: ['thorough'], env: ['G_TEST_SLOW=1', 'SPEED=slow'])
>>> -add_test_setup('thorough', env: ['G_TEST_SLOW=1', 'SPEED=thorough'])
>>> +add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: true,
>>> + env: ['RUST_BACKTRACE=1'])
>>> +add_test_setup('slow', exclude_suites: ['thorough'],
>>> + env: ['G_TEST_SLOW=1', 'SPEED=slow', 'RUST_BACKTRACE=1'])
>>> +add_test_setup('thorough',
>>> + env: ['G_TEST_SLOW=1', 'SPEED=thorough', 'RUST_BACKTRACE=1'])
>>
>> Nitpicking, we can keep sorted:
>>
>> env: ['G_TEST_SLOW=1', 'RUST_BACKTRACE=1', 'SPEED=thorough'])
>
> That splits up the two envariables that are controlling the
> "run the slow tests" behaviour, though...
I meant:
add_test_setup('slow', exclude_suites: ['thorough'],
env: ['G_TEST_SLOW=1', 'RUST_BACKTRACE=1', 'SPEED=slow'])
add_test_setup('thorough',
env: ['G_TEST_SLOW=1', 'RUST_BACKTRACE=1',
'SPEED=thorough'])
But just nitpicking, not a big deal ;)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] meson.build: Set RUST_BACKTRACE for all tests
2025-03-10 17:34 ` Philippe Mathieu-Daudé
@ 2025-03-10 17:43 ` Peter Maydell
0 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2025-03-10 17:43 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Paolo Bonzini, Daniel P. Berrangé, Thomas Huth,
Alex Bennée, Marc-André Lureau
On Mon, 10 Mar 2025 at 17:34, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> On 10/3/25 14:18, Peter Maydell wrote:
> > On Mon, 10 Mar 2025 at 13:15, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> >>
> >> On 10/3/25 11:29, Peter Maydell wrote:
> >>> We want to capture potential Rust backtraces on panics in our test
> >>> logs, which isn't Rust's default behaviour. Set RUST_BACKTRACE=1 in
> >>> the add_test_setup environments, so that all our tests get run with
> >>> this environment variable set.
> >>>
> >>> This makes the setting of that variable in the gitlab CI template
> >>> redundant, so we can remove it.
> >>>
> >>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> >>> ---
> >>> meson.build | 9 ++++++---
> >>> .gitlab-ci.d/buildtest-template.yml | 1 -
> >>> 2 files changed, 6 insertions(+), 4 deletions(-)
> >>>
> >>> diff --git a/meson.build b/meson.build
> >>> index 8b9fda4d95e..2f373dc675f 100644
> >>> --- a/meson.build
> >>> +++ b/meson.build
> >>> @@ -5,9 +5,12 @@ project('qemu', ['c'], meson_version: '>=1.5.0',
> >>>
> >>> meson.add_devenv({ 'MESON_BUILD_ROOT' : meson.project_build_root() })
> >>>
> >>> -add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: true)
> >>> -add_test_setup('slow', exclude_suites: ['thorough'], env: ['G_TEST_SLOW=1', 'SPEED=slow'])
> >>> -add_test_setup('thorough', env: ['G_TEST_SLOW=1', 'SPEED=thorough'])
> >>> +add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: true,
> >>> + env: ['RUST_BACKTRACE=1'])
> >>> +add_test_setup('slow', exclude_suites: ['thorough'],
> >>> + env: ['G_TEST_SLOW=1', 'SPEED=slow', 'RUST_BACKTRACE=1'])
> >>> +add_test_setup('thorough',
> >>> + env: ['G_TEST_SLOW=1', 'SPEED=thorough', 'RUST_BACKTRACE=1'])
> >>
> >> Nitpicking, we can keep sorted:
> >>
> >> env: ['G_TEST_SLOW=1', 'RUST_BACKTRACE=1', 'SPEED=thorough'])
> >
> > That splits up the two envariables that are controlling the
> > "run the slow tests" behaviour, though...
>
> I meant:
>
> add_test_setup('slow', exclude_suites: ['thorough'],
> env: ['G_TEST_SLOW=1', 'RUST_BACKTRACE=1', 'SPEED=slow'])
> add_test_setup('thorough',
> env: ['G_TEST_SLOW=1', 'RUST_BACKTRACE=1',
> 'SPEED=thorough'])
Yes, and that splits up the G_TEST_SLOW=1 from the SPEED=whatever
by putting the RUST_BACKTRACE=1 in the middle...
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-03-10 17:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-10 10:29 [PATCH] meson.build: Set RUST_BACKTRACE for all tests Peter Maydell
2025-03-10 10:32 ` Daniel P. Berrangé
2025-03-10 13:15 ` Philippe Mathieu-Daudé
2025-03-10 13:18 ` Peter Maydell
2025-03-10 17:34 ` Philippe Mathieu-Daudé
2025-03-10 17:43 ` Peter Maydell
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).