[PULL 00/16] qtest and gitlab-CI improvements

Thomas Huth posted 16 patches 4 years, 1 month ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20211215073402.144286-1-thuth@redhat.com
Maintainers: John Snow <jsnow@redhat.com>, Beraldo Leal <bleal@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Laurent Vivier <lvivier@redhat.com>, Ryo ONODERA <ryoon@netbsd.org>, Thomas Huth <thuth@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, "Michael S. Tsirkin" <mst@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, "Alex Bennée" <alex.bennee@linaro.org>, Kamil Rytarowski <kamil@netbsd.org>, Eric Auger <eric.auger@redhat.com>, Reinoud Zandijk <reinoud@netbsd.org>
.gitlab-ci.d/buildtest.yml        |   23 +
.gitlab-ci.d/cirrus.yml           |   35 +
.gitlab-ci.d/cirrus/kvm-build.yml |   31 +
.gitlab-ci.d/qemu-project.yml     |    1 +
.gitlab-ci.d/windows.yml          |   98 +++
configure                         |   27 -
hw/virtio/trace-events            |    3 +-
hw/virtio/virtio-iommu.c          |   42 +-
include/hw/pci/pci_bridge.h       |    8 +
meson.build                       |   13 +-
meson_options.txt                 |    2 +
scripts/meson-buildoptions.sh     |    3 +
tests/qtest/boot-serial-test.c    |    3 +-
tests/qtest/cdrom-test.c          |    8 +-
tests/qtest/libqos/libqtest.h     |    8 +
tests/qtest/libqos/meson.build    |    1 +
tests/qtest/libqos/pci.c          |  119 ++++
tests/qtest/libqos/pci.h          |    1 +
tests/qtest/libqos/virtio-iommu.c |  126 ++++
tests/qtest/libqos/virtio-iommu.h |   40 ++
tests/qtest/libqtest.c            |   79 ++-
tests/qtest/meson.build           |    9 +-
tests/qtest/prom-env-test.c       |    8 +-
tests/qtest/virtio-iommu-test.c   |  326 +++++++++
tests/qtest/virtio-net-failover.c | 1352 +++++++++++++++++++++++++++++++++++++
25 files changed, 2290 insertions(+), 76 deletions(-)
create mode 100644 .gitlab-ci.d/cirrus/kvm-build.yml
create mode 100644 .gitlab-ci.d/windows.yml
create mode 100644 tests/qtest/libqos/virtio-iommu.c
create mode 100644 tests/qtest/libqos/virtio-iommu.h
create mode 100644 tests/qtest/virtio-iommu-test.c
create mode 100644 tests/qtest/virtio-net-failover.c
[PULL 00/16] qtest and gitlab-CI improvements
Posted by Thomas Huth 4 years, 1 month ago
 Hi!

The following changes since commit 76b56fdfc9fa43ec6e5986aee33f108c6c6a511e:

  Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2021-12-14 12:46:18 -0800)

are available in the Git repository at:

  https://gitlab.com/thuth/qemu.git tags/pull-request-2021-12-15

for you to fetch changes up to 7876cba8fc0cab9a4c803a30f427d4b20b95a868:

  gitlab-ci: Test compilation on Windows with MSYS2 (2021-12-15 08:08:59 +0100)

----------------------------------------------------------------
* Add virtio-net failover test
* Make qtests a little bit more flexible with regards to reduced configs
* Move libssh setup from configure to meson.build
* Run device-crash-test in CI
* Add jobs for NetBSD and OpenBSD to the CI
* Test compilation with MSYS2 in the gitlab-ci, too
* Add new virtio-iommu test

----------------------------------------------------------------
Eric Auger (4):
      virtio-iommu: Remove set_config callback
      virtio-iommu: Fix endianness in get_config
      virtio-iommu: Fix the domain_range end
      tests: qtest: Add virtio-iommu test

Laurent Vivier (4):
      qtest/libqos: add a function to initialize secondary PCI buses
      tests/qtest: add some tests for virtio-net failover
      tests/libqtest: add some virtio-net failover migration cancelling tests
      tests/libqtest: add a migration test with two couples of failover devices

Thomas Huth (8):
      tests/qtest: Run the PPC 32-bit tests with the 64-bit target binary, too
      tests/qtest: Fence the tests that need xlnx-zcu102 with CONFIG_XLNX_ZYNQMP_ARM
      tests/qtest: Add a function that gets a list with available machine types
      tests/qtest: Add a function to check whether a machine is available
      Move the libssh setup from configure to meson.build
      gitlab-ci.d/buildtest: Add jobs that run the device-crash-test
      gitlab-ci: Add cirrus-ci based tests for NetBSD and OpenBSD
      gitlab-ci: Test compilation on Windows with MSYS2

 .gitlab-ci.d/buildtest.yml        |   23 +
 .gitlab-ci.d/cirrus.yml           |   35 +
 .gitlab-ci.d/cirrus/kvm-build.yml |   31 +
 .gitlab-ci.d/qemu-project.yml     |    1 +
 .gitlab-ci.d/windows.yml          |   98 +++
 configure                         |   27 -
 hw/virtio/trace-events            |    3 +-
 hw/virtio/virtio-iommu.c          |   42 +-
 include/hw/pci/pci_bridge.h       |    8 +
 meson.build                       |   13 +-
 meson_options.txt                 |    2 +
 scripts/meson-buildoptions.sh     |    3 +
 tests/qtest/boot-serial-test.c    |    3 +-
 tests/qtest/cdrom-test.c          |    8 +-
 tests/qtest/libqos/libqtest.h     |    8 +
 tests/qtest/libqos/meson.build    |    1 +
 tests/qtest/libqos/pci.c          |  119 ++++
 tests/qtest/libqos/pci.h          |    1 +
 tests/qtest/libqos/virtio-iommu.c |  126 ++++
 tests/qtest/libqos/virtio-iommu.h |   40 ++
 tests/qtest/libqtest.c            |   79 ++-
 tests/qtest/meson.build           |    9 +-
 tests/qtest/prom-env-test.c       |    8 +-
 tests/qtest/virtio-iommu-test.c   |  326 +++++++++
 tests/qtest/virtio-net-failover.c | 1352 +++++++++++++++++++++++++++++++++++++
 25 files changed, 2290 insertions(+), 76 deletions(-)
 create mode 100644 .gitlab-ci.d/cirrus/kvm-build.yml
 create mode 100644 .gitlab-ci.d/windows.yml
 create mode 100644 tests/qtest/libqos/virtio-iommu.c
 create mode 100644 tests/qtest/libqos/virtio-iommu.h
 create mode 100644 tests/qtest/virtio-iommu-test.c
 create mode 100644 tests/qtest/virtio-net-failover.c


Re: [PULL 00/16] qtest and gitlab-CI improvements
Posted by Richard Henderson 4 years, 1 month ago
On 12/14/21 11:33 PM, Thomas Huth wrote:
>   Hi!
> 
> The following changes since commit 76b56fdfc9fa43ec6e5986aee33f108c6c6a511e:
> 
>    Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2021-12-14 12:46:18 -0800)
> 
> are available in the Git repository at:
> 
>    https://gitlab.com/thuth/qemu.git tags/pull-request-2021-12-15
> 
> for you to fetch changes up to 7876cba8fc0cab9a4c803a30f427d4b20b95a868:
> 
>    gitlab-ci: Test compilation on Windows with MSYS2 (2021-12-15 08:08:59 +0100)
> 
> ----------------------------------------------------------------
> * Add virtio-net failover test
> * Make qtests a little bit more flexible with regards to reduced configs
> * Move libssh setup from configure to meson.build
> * Run device-crash-test in CI
> * Add jobs for NetBSD and OpenBSD to the CI
> * Test compilation with MSYS2 in the gitlab-ci, too
> * Add new virtio-iommu test
> 
> ----------------------------------------------------------------
> Eric Auger (4):
>        virtio-iommu: Remove set_config callback
>        virtio-iommu: Fix endianness in get_config
>        virtio-iommu: Fix the domain_range end
>        tests: qtest: Add virtio-iommu test
> 
> Laurent Vivier (4):
>        qtest/libqos: add a function to initialize secondary PCI buses
>        tests/qtest: add some tests for virtio-net failover
>        tests/libqtest: add some virtio-net failover migration cancelling tests
>        tests/libqtest: add a migration test with two couples of failover devices
> 
> Thomas Huth (8):
>        tests/qtest: Run the PPC 32-bit tests with the 64-bit target binary, too
>        tests/qtest: Fence the tests that need xlnx-zcu102 with CONFIG_XLNX_ZYNQMP_ARM
>        tests/qtest: Add a function that gets a list with available machine types
>        tests/qtest: Add a function to check whether a machine is available
>        Move the libssh setup from configure to meson.build
>        gitlab-ci.d/buildtest: Add jobs that run the device-crash-test
>        gitlab-ci: Add cirrus-ci based tests for NetBSD and OpenBSD
>        gitlab-ci: Test compilation on Windows with MSYS2
> 
>   .gitlab-ci.d/buildtest.yml        |   23 +
>   .gitlab-ci.d/cirrus.yml           |   35 +
>   .gitlab-ci.d/cirrus/kvm-build.yml |   31 +
>   .gitlab-ci.d/qemu-project.yml     |    1 +
>   .gitlab-ci.d/windows.yml          |   98 +++
>   configure                         |   27 -
>   hw/virtio/trace-events            |    3 +-
>   hw/virtio/virtio-iommu.c          |   42 +-
>   include/hw/pci/pci_bridge.h       |    8 +
>   meson.build                       |   13 +-
>   meson_options.txt                 |    2 +
>   scripts/meson-buildoptions.sh     |    3 +
>   tests/qtest/boot-serial-test.c    |    3 +-
>   tests/qtest/cdrom-test.c          |    8 +-
>   tests/qtest/libqos/libqtest.h     |    8 +
>   tests/qtest/libqos/meson.build    |    1 +
>   tests/qtest/libqos/pci.c          |  119 ++++
>   tests/qtest/libqos/pci.h          |    1 +
>   tests/qtest/libqos/virtio-iommu.c |  126 ++++
>   tests/qtest/libqos/virtio-iommu.h |   40 ++
>   tests/qtest/libqtest.c            |   79 ++-
>   tests/qtest/meson.build           |    9 +-
>   tests/qtest/prom-env-test.c       |    8 +-
>   tests/qtest/virtio-iommu-test.c   |  326 +++++++++
>   tests/qtest/virtio-net-failover.c | 1352 +++++++++++++++++++++++++++++++++++++
>   25 files changed, 2290 insertions(+), 76 deletions(-)
>   create mode 100644 .gitlab-ci.d/cirrus/kvm-build.yml
>   create mode 100644 .gitlab-ci.d/windows.yml
>   create mode 100644 tests/qtest/libqos/virtio-iommu.c
>   create mode 100644 tests/qtest/libqos/virtio-iommu.h
>   create mode 100644 tests/qtest/virtio-iommu-test.c
>   create mode 100644 tests/qtest/virtio-net-failover.c

Applied, thanks.

r~


Re: [PULL 00/16] qtest and gitlab-CI improvements
Posted by Thomas Huth 4 years, 1 month ago
On 15/12/2021 18.14, Richard Henderson wrote:
> On 12/14/21 11:33 PM, Thomas Huth wrote:
>>   Hi!
>>
>> The following changes since commit 76b56fdfc9fa43ec6e5986aee33f108c6c6a511e:
>>
>>    Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into 
>> staging (2021-12-14 12:46:18 -0800)
>>
>> are available in the Git repository at:
>>
>>    https://gitlab.com/thuth/qemu.git tags/pull-request-2021-12-15
>>
>> for you to fetch changes up to 7876cba8fc0cab9a4c803a30f427d4b20b95a868:
>>
>>    gitlab-ci: Test compilation on Windows with MSYS2 (2021-12-15 08:08:59 
>> +0100)
>>
>> ----------------------------------------------------------------
>> * Add virtio-net failover test
>> * Make qtests a little bit more flexible with regards to reduced configs
>> * Move libssh setup from configure to meson.build
>> * Run device-crash-test in CI
>> * Add jobs for NetBSD and OpenBSD to the CI
>> * Test compilation with MSYS2 in the gitlab-ci, too
>> * Add new virtio-iommu test
>>
>> ----------------------------------------------------------------
>> Eric Auger (4):
>>        virtio-iommu: Remove set_config callback
>>        virtio-iommu: Fix endianness in get_config
>>        virtio-iommu: Fix the domain_range end
>>        tests: qtest: Add virtio-iommu test
>>
>> Laurent Vivier (4):
>>        qtest/libqos: add a function to initialize secondary PCI buses
>>        tests/qtest: add some tests for virtio-net failover
>>        tests/libqtest: add some virtio-net failover migration cancelling 
>> tests
>>        tests/libqtest: add a migration test with two couples of failover 
>> devices
>>
>> Thomas Huth (8):
>>        tests/qtest: Run the PPC 32-bit tests with the 64-bit target 
>> binary, too
>>        tests/qtest: Fence the tests that need xlnx-zcu102 with 
>> CONFIG_XLNX_ZYNQMP_ARM
>>        tests/qtest: Add a function that gets a list with available machine 
>> types
>>        tests/qtest: Add a function to check whether a machine is available
>>        Move the libssh setup from configure to meson.build
>>        gitlab-ci.d/buildtest: Add jobs that run the device-crash-test
>>        gitlab-ci: Add cirrus-ci based tests for NetBSD and OpenBSD
>>        gitlab-ci: Test compilation on Windows with MSYS2
>>
>>   .gitlab-ci.d/buildtest.yml        |   23 +
>>   .gitlab-ci.d/cirrus.yml           |   35 +
>>   .gitlab-ci.d/cirrus/kvm-build.yml |   31 +
>>   .gitlab-ci.d/qemu-project.yml     |    1 +
>>   .gitlab-ci.d/windows.yml          |   98 +++
>>   configure                         |   27 -
>>   hw/virtio/trace-events            |    3 +-
>>   hw/virtio/virtio-iommu.c          |   42 +-
>>   include/hw/pci/pci_bridge.h       |    8 +
>>   meson.build                       |   13 +-
>>   meson_options.txt                 |    2 +
>>   scripts/meson-buildoptions.sh     |    3 +
>>   tests/qtest/boot-serial-test.c    |    3 +-
>>   tests/qtest/cdrom-test.c          |    8 +-
>>   tests/qtest/libqos/libqtest.h     |    8 +
>>   tests/qtest/libqos/meson.build    |    1 +
>>   tests/qtest/libqos/pci.c          |  119 ++++
>>   tests/qtest/libqos/pci.h          |    1 +
>>   tests/qtest/libqos/virtio-iommu.c |  126 ++++
>>   tests/qtest/libqos/virtio-iommu.h |   40 ++
>>   tests/qtest/libqtest.c            |   79 ++-
>>   tests/qtest/meson.build           |    9 +-
>>   tests/qtest/prom-env-test.c       |    8 +-
>>   tests/qtest/virtio-iommu-test.c   |  326 +++++++++
>>   tests/qtest/virtio-net-failover.c | 1352 
>> +++++++++++++++++++++++++++++++++++++
>>   25 files changed, 2290 insertions(+), 76 deletions(-)
>>   create mode 100644 .gitlab-ci.d/cirrus/kvm-build.yml
>>   create mode 100644 .gitlab-ci.d/windows.yml
>>   create mode 100644 tests/qtest/libqos/virtio-iommu.c
>>   create mode 100644 tests/qtest/libqos/virtio-iommu.h
>>   create mode 100644 tests/qtest/virtio-iommu-test.c
>>   create mode 100644 tests/qtest/virtio-net-failover.c
> 
> Applied, thanks.

Thanks!

... hmm, looking at the latest builds, it seems like the new msys2-64bit job 
timed out a couple of times after 60 minutes, e.g.:

  https://gitlab.com/qemu-project/qemu/-/jobs/1889554588

And I already put a "timeout: 70m" in there, so I wonder why this wasn't 
taken into account? Maybe it does not work for the Windows machines?
Let's keep an eye on this - if this keeps happening, we either got to 
disable that job again or switch to another target CPU that has less code to 
compile and test.

  Thomas



Re: [PULL 00/16] qtest and gitlab-CI improvements
Posted by Philippe Mathieu-Daudé 4 years, 1 month ago
Hi,

On 12/15/21 08:33, Thomas Huth wrote:

> ----------------------------------------------------------------
> * Add virtio-net failover test
> * Make qtests a little bit more flexible with regards to reduced configs
> * Move libssh setup from configure to meson.build
> * Run device-crash-test in CI
> * Add jobs for NetBSD and OpenBSD to the CI
> * Test compilation with MSYS2 in the gitlab-ci, too
> * Add new virtio-iommu test
> 
> ----------------------------------------------------------------

> Laurent Vivier (4):
>       qtest/libqos: add a function to initialize secondary PCI buses
>       tests/qtest: add some tests for virtio-net failover
>       tests/libqtest: add some virtio-net failover migration cancelling tests
>       tests/libqtest: add a migration test with two couples of failover devices

On my ASan build directory I'm sometime getting:

Running test qtest-i386/virtio-net-failover
(process:1558675): GLib-CRITICAL **: 16:19:12.556: g_rand_int: assertion
'rand != NULL' failed

From config.log:
# Configured with: '../configure' '--enable-trace-backends=log'
'--cc=clang' '--cxx=clang++' '--extra-cflags=-ggdb' '--enable-debug'
'--enable-sanitizers' '--target-list=i386-softmmu' '--disable-docs'
'--disable-tools'


Re: [PULL 00/16] qtest and gitlab-CI improvements
Posted by Thomas Huth 4 years, 1 month ago
On 18/12/2021 17.33, Philippe Mathieu-Daudé wrote:
> Hi,
> 
> On 12/15/21 08:33, Thomas Huth wrote:
> 
>> ----------------------------------------------------------------
>> * Add virtio-net failover test
>> * Make qtests a little bit more flexible with regards to reduced configs
>> * Move libssh setup from configure to meson.build
>> * Run device-crash-test in CI
>> * Add jobs for NetBSD and OpenBSD to the CI
>> * Test compilation with MSYS2 in the gitlab-ci, too
>> * Add new virtio-iommu test
>>
>> ----------------------------------------------------------------
> 
>> Laurent Vivier (4):
>>        qtest/libqos: add a function to initialize secondary PCI buses
>>        tests/qtest: add some tests for virtio-net failover
>>        tests/libqtest: add some virtio-net failover migration cancelling tests
>>        tests/libqtest: add a migration test with two couples of failover devices
> 
> On my ASan build directory I'm sometime getting:
> 
> Running test qtest-i386/virtio-net-failover
> (process:1558675): GLib-CRITICAL **: 16:19:12.556: g_rand_int: assertion
> 'rand != NULL' failed

Weird, since the test is not using that function? Could you get a backtrace?

  Thomas


Re: [PULL 00/16] qtest and gitlab-CI improvements
Posted by Philippe Mathieu-Daudé 4 years, 1 month ago
+Alex & Paolo

On 12/20/21 07:52, Thomas Huth wrote:
> On 18/12/2021 17.33, Philippe Mathieu-Daudé wrote:
>> Hi,
>>
>> On 12/15/21 08:33, Thomas Huth wrote:
>>
>>> ----------------------------------------------------------------
>>> * Add virtio-net failover test
>>> * Make qtests a little bit more flexible with regards to reduced configs
>>> * Move libssh setup from configure to meson.build
>>> * Run device-crash-test in CI
>>> * Add jobs for NetBSD and OpenBSD to the CI
>>> * Test compilation with MSYS2 in the gitlab-ci, too
>>> * Add new virtio-iommu test
>>>
>>> ----------------------------------------------------------------
>>
>>> Laurent Vivier (4):
>>>        qtest/libqos: add a function to initialize secondary PCI buses
>>>        tests/qtest: add some tests for virtio-net failover
>>>        tests/libqtest: add some virtio-net failover migration
>>> cancelling tests
>>>        tests/libqtest: add a migration test with two couples of
>>> failover devices
>>
>> On my ASan build directory I'm sometime getting:
>>
>> Running test qtest-i386/virtio-net-failover
>> (process:1558675): GLib-CRITICAL **: 16:19:12.556: g_rand_int: assertion
>> 'rand != NULL' failed
> 
> Weird, since the test is not using that function?

Well it calls g_test_rand_int(), which calls it:
https://github.com/GNOME/glib/blob/main/glib/gtestutils.c#L1800

> Could you get a
> backtrace?

I'd like to, but for some reason when using ASan I don't get much
(and it only happens with ASan) so I suppose it is something specific
to ASan + rand.


Re: [PULL 00/16] qtest and gitlab-CI improvements
Posted by Thomas Huth 4 years, 1 month ago
On 20/12/2021 10.24, Philippe Mathieu-Daudé wrote:
> +Alex & Paolo
> 
> On 12/20/21 07:52, Thomas Huth wrote:
>> On 18/12/2021 17.33, Philippe Mathieu-Daudé wrote:
>>> Hi,
>>>
>>> On 12/15/21 08:33, Thomas Huth wrote:
>>>
>>>> ----------------------------------------------------------------
>>>> * Add virtio-net failover test
>>>> * Make qtests a little bit more flexible with regards to reduced configs
>>>> * Move libssh setup from configure to meson.build
>>>> * Run device-crash-test in CI
>>>> * Add jobs for NetBSD and OpenBSD to the CI
>>>> * Test compilation with MSYS2 in the gitlab-ci, too
>>>> * Add new virtio-iommu test
>>>>
>>>> ----------------------------------------------------------------
>>>
>>>> Laurent Vivier (4):
>>>>         qtest/libqos: add a function to initialize secondary PCI buses
>>>>         tests/qtest: add some tests for virtio-net failover
>>>>         tests/libqtest: add some virtio-net failover migration
>>>> cancelling tests
>>>>         tests/libqtest: add a migration test with two couples of
>>>> failover devices
>>>
>>> On my ASan build directory I'm sometime getting:
>>>
>>> Running test qtest-i386/virtio-net-failover
>>> (process:1558675): GLib-CRITICAL **: 16:19:12.556: g_rand_int: assertion
>>> 'rand != NULL' failed
>>
>> Weird, since the test is not using that function?
> 
> Well it calls g_test_rand_int(), which calls it:
> https://github.com/GNOME/glib/blob/main/glib/gtestutils.c#L1800

Ah, right. I think the problem is that g_test_rand_int() must not be called 
before g_test_init().

But actually, I think in this case we even don't want to use 
g_test_rand_int() since it's about generating a true random temporary file 
name, not a random number for a test case that could be influenced with the 
"--seed" CLI option.
So I think using g_random_int() might be the better choice instead?

  Thomas



Re: [PULL 00/16] qtest and gitlab-CI improvements
Posted by Philippe Mathieu-Daudé 4 years, 1 month ago
On 12/20/21 10:53, Thomas Huth wrote:
> On 20/12/2021 10.24, Philippe Mathieu-Daudé wrote:
>> +Alex & Paolo
>>
>> On 12/20/21 07:52, Thomas Huth wrote:
>>> On 18/12/2021 17.33, Philippe Mathieu-Daudé wrote:
>>>> Hi,
>>>>
>>>> On 12/15/21 08:33, Thomas Huth wrote:
>>>>
>>>>> ----------------------------------------------------------------
>>>>> * Add virtio-net failover test
>>>>> * Make qtests a little bit more flexible with regards to reduced
>>>>> configs
>>>>> * Move libssh setup from configure to meson.build
>>>>> * Run device-crash-test in CI
>>>>> * Add jobs for NetBSD and OpenBSD to the CI
>>>>> * Test compilation with MSYS2 in the gitlab-ci, too
>>>>> * Add new virtio-iommu test
>>>>>
>>>>> ----------------------------------------------------------------
>>>>
>>>>> Laurent Vivier (4):
>>>>>         qtest/libqos: add a function to initialize secondary PCI buses
>>>>>         tests/qtest: add some tests for virtio-net failover
>>>>>         tests/libqtest: add some virtio-net failover migration
>>>>> cancelling tests
>>>>>         tests/libqtest: add a migration test with two couples of
>>>>> failover devices
>>>>
>>>> On my ASan build directory I'm sometime getting:
>>>>
>>>> Running test qtest-i386/virtio-net-failover
>>>> (process:1558675): GLib-CRITICAL **: 16:19:12.556: g_rand_int:
>>>> assertion
>>>> 'rand != NULL' failed
>>>
>>> Weird, since the test is not using that function?
>>
>> Well it calls g_test_rand_int(), which calls it:
>> https://github.com/GNOME/glib/blob/main/glib/gtestutils.c#L1800
> 
> Ah, right. I think the problem is that g_test_rand_int() must not be
> called before g_test_init().
> 
> But actually, I think in this case we even don't want to use
> g_test_rand_int() since it's about generating a true random temporary
> file name, not a random number for a test case that could be influenced
> with the "--seed" CLI option.
> So I think using g_random_int() might be the better choice instead?

I think you are right.