qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 0/4] vl: avoid SIGSEGV on invalid [accel] configuration


From: Paolo Bonzini
Subject: [PATCH 0/4] vl: avoid SIGSEGV on invalid [accel] configuration
Date: Tue, 17 Jan 2023 09:07:41 +0100

While QEMU catches invalid -accel command line options:

    $ qemu-system-x86_64 -accel foo=bar
    Accelerators supported in QEMU binary:
    tcg
    xen
    kvm

the same is not true of configuration files, which instead crash.  Patch 1
is the trivial fix, but writing a test is a bit more complex: there are
no existing testcases where the qtest socket would not even start.  So
the series does the required refactoring and cleanup before adding tests
for both valid and invalid [accel] sections in patch 4.

Paolo Bonzini (4):
  vl: catch [accel] entry without accelerator
  libqtest: split qtest_spawn_qemu function
  libqtest: ensure waitpid() is only called once
  readconfig-test: add test for accelerator configuration

 softmmu/vl.c                  |  15 +++-
 tests/qtest/libqtest.c        | 160 +++++++++++++++++++++-------------
 tests/qtest/libqtest.h        |  12 +++
 tests/qtest/readconfig-test.c |  45 ++++++++--
 4 files changed, 156 insertions(+), 76 deletions(-)

-- 
2.38.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]