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

Paolo Bonzini posted 4 patches 1 year, 3 months ago
Failed in applying to current master (apply log)
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Thomas Huth <thuth@redhat.com>, Laurent Vivier <lvivier@redhat.com>
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(-)
[PATCH 0/4] vl: avoid SIGSEGV on invalid [accel] configuration
Posted by Paolo Bonzini 1 year, 3 months ago
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