* Add compat machines for 7.0

* Some minor qtest and unit test improvements
 * Remove -no-quit option
 * Fixes for the docs
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmHVbqkRHHRodXRoQHJl
 ZGhhdC5jb20ACgkQLtnXdP5wLbXPOw/8DPJk2mt6rsQ68wTy0yAsfptwe26JQzu0
 N5wFouAfmHWH1R0tbgXigkHA+2py4mRON0bhq2a2WurghzLPTyWRVRrOeBzMyfTl
 fvfgurI+Or3KL1pqxLSoAEGOZ8FVWOTiNhNibIQ79KV+WOo/IvOlZvi20tJfJGg9
 T6Ty4kf5IrURF3Ij5fkKFiuWqyb4sgrHmplFHdQKryAghmvMRDrY7Ct/Hldbzwap
 7VPcbSKAIoBXNEpf0CcBVMFEMYp6+BAsWyVeRLE/31jG4QkyuDmPOJA9ZE5vMhoZ
 YSLyKLUtP/TfDknQ2N/xjpqwpGJJ+tD7CegFD4e7kFDuXjLs/n81WjV7T+2pqyOl
 D7W+C7SMF72eoCY9tBhayp3cSWH6SDXXuPs8S79ZXakf9EyxNExnkV9yYgWV+8w6
 YEn7DYiGz3lhVRgDQie5ZBU9KfH2zh3jXbXhMvmIhosNAXilt+2R9djkKyHg+xh4
 hty2xlX7Xb7owPSUPOblsLgeKnRZsWgf1MWSsn79MrHzxrBDKVml+JUGWeKrwEOb
 d3/BoZBZJNRLwxQaCas+mKJ7scP4UPtI9DDtrXORqaa9BX5KvN1uzdtyYY89j9iy
 Q0by1riJxWgBknCDJF9pBcDP9vmhZEEiBMuLhHhgennMoBby4t8qxJ6MIbmUo9Pa
 cKguXNrsN4k=
 =Xv2u
 -----END PGP SIGNATURE-----

Merge tag 'pull-request-2022-01-05' of https://gitlab.com/thuth/qemu into staging

* Add compat machines for 7.0
* Some minor qtest and unit test improvements
* Remove -no-quit option
* Fixes for the docs

# gpg: Signature made Wed 05 Jan 2022 02:10:49 AM PST
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [undefined]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [undefined]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* tag 'pull-request-2022-01-05' of https://gitlab.com/thuth/qemu:
  docs/tools/qemu-trace-stap.rst: Do not hard-code the QEMU binary name
  gitlab-ci: Enable docs in the centos job
  docs/sphinx: fix compatibility with sphinx < 1.8
  qemu-options: Remove the deprecated -no-quit option
  tests/unit/test-util-sockets: Use g_file_open_tmp() to create temp file
  tests/qtest/hd-geo-test: Check for the lsi53c895a controller before using it
  tests/qtest/test-x86-cpuid-compat: Check for machines before using them
  hw: Add compat machines for 7.0

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2022-01-05 08:47:18 -08:00
commit 7d4ae4d497
19 changed files with 153 additions and 86 deletions

View File

@ -164,7 +164,7 @@ build-system-centos:
variables: variables:
IMAGE: centos8 IMAGE: centos8
CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-fdt=system CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-fdt=system
--enable-modules --enable-trace-backends=dtrace --enable-modules --enable-trace-backends=dtrace --enable-docs
TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
MAKE_CHECK_ARGS: check-build MAKE_CHECK_ARGS: check-build

View File

@ -134,12 +134,6 @@ specified.
Use ``-display sdl,window-close=...`` instead (i.e. with a minus instead of Use ``-display sdl,window-close=...`` instead (i.e. with a minus instead of
an underscore between "window" and "close"). an underscore between "window" and "close").
``-no-quit`` (since 6.1)
''''''''''''''''''''''''
The ``-no-quit`` is a synonym for ``-display ...,window-close=off`` which
should be used instead.
``-alt-grab`` and ``-display sdl,alt_grab=on`` (since 6.2) ``-alt-grab`` and ``-display sdl,alt_grab=on`` (since 6.2)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

View File

@ -330,6 +330,13 @@ RISC-V firmware not booted by default (removed in 5.1)
QEMU 5.1 changes the default behaviour from ``-bios none`` to ``-bios default`` QEMU 5.1 changes the default behaviour from ``-bios none`` to ``-bios default``
for the RISC-V ``virt`` machine and ``sifive_u`` machine. for the RISC-V ``virt`` machine and ``sifive_u`` machine.
``-no-quit`` (removed in 7.0)
'''''''''''''''''''''''''''''
The ``-no-quit`` was a synonym for ``-display ...,window-close=off`` which
should be used instead.
QEMU Machine Protocol (QMP) commands QEMU Machine Protocol (QMP) commands
------------------------------------ ------------------------------------

View File

@ -7,12 +7,12 @@
# Author: Marc-André Lureau <marcandre.lureau@redhat.com> # Author: Marc-André Lureau <marcandre.lureau@redhat.com>
"""dbus-doc is a Sphinx extension that provides documentation from D-Bus XML.""" """dbus-doc is a Sphinx extension that provides documentation from D-Bus XML."""
from docutils.parsers.rst import Directive
from sphinx.application import Sphinx from sphinx.application import Sphinx
from sphinx.util.docutils import SphinxDirective
from typing import Any, Dict from typing import Any, Dict
class FakeDBusDocDirective(SphinxDirective): class FakeDBusDocDirective(Directive):
has_content = True has_content = True
required_arguments = 1 required_arguments = 1

View File

@ -46,19 +46,19 @@ The following commands are valid:
any of the listed names. If no *PATTERN* is given, the all possible any of the listed names. If no *PATTERN* is given, the all possible
probes will be listed. probes will be listed.
For example, to list all probes available in the ``qemu-system-x86_64`` For example, to list all probes available in the |qemu_system|
binary: binary:
:: .. parsed-literal::
$ qemu-trace-stap list qemu-system-x86_64 $ qemu-trace-stap list |qemu_system|
To filter the list to only cover probes related to QEMU's cryptographic To filter the list to only cover probes related to QEMU's cryptographic
subsystem, in a binary outside ``$PATH`` subsystem, in a binary outside ``$PATH``
:: .. parsed-literal::
$ qemu-trace-stap list /opt/qemu/4.0.0/bin/qemu-system-x86_64 'qcrypto*' $ qemu-trace-stap list /opt/qemu/|version|/bin/|qemu_system| 'qcrypto*'
.. option:: run OPTIONS BINARY PATTERN... .. option:: run OPTIONS BINARY PATTERN...
@ -90,26 +90,26 @@ The following commands are valid:
Restrict the tracing session so that it only triggers for the process Restrict the tracing session so that it only triggers for the process
identified by *PID*. identified by *PID*.
For example, to monitor all processes executing ``qemu-system-x86_64`` For example, to monitor all processes executing |qemu_system|
as found on ``$PATH``, displaying all I/O related probes: as found on ``$PATH``, displaying all I/O related probes:
:: .. parsed-literal::
$ qemu-trace-stap run qemu-system-x86_64 'qio*' $ qemu-trace-stap run |qemu_system| 'qio*'
To monitor only the QEMU process with PID 1732 To monitor only the QEMU process with PID 1732
:: .. parsed-literal::
$ qemu-trace-stap run --pid=1732 qemu-system-x86_64 'qio*' $ qemu-trace-stap run --pid=1732 |qemu_system| 'qio*'
To monitor QEMU processes running an alternative binary outside of To monitor QEMU processes running an alternative binary outside of
``$PATH``, displaying verbose information about setup of the ``$PATH``, displaying verbose information about setup of the
tracing environment: tracing environment:
:: .. parsed-literal::
$ qemu-trace-stap -v run /opt/qemu/4.0.0/qemu-system-x86_64 'qio*' $ qemu-trace-stap -v run /opt/qemu/|version|/bin/|qemu_system| 'qio*'
See also See also
-------- --------

View File

@ -2856,10 +2856,17 @@ static void machvirt_machine_init(void)
} }
type_init(machvirt_machine_init); type_init(machvirt_machine_init);
static void virt_machine_6_2_options(MachineClass *mc) static void virt_machine_7_0_options(MachineClass *mc)
{ {
} }
DEFINE_VIRT_MACHINE_AS_LATEST(6, 2) DEFINE_VIRT_MACHINE_AS_LATEST(7, 0)
static void virt_machine_6_2_options(MachineClass *mc)
{
virt_machine_7_0_options(mc);
compat_props_add(mc->compat_props, hw_compat_6_2, hw_compat_6_2_len);
}
DEFINE_VIRT_MACHINE(6, 2)
static void virt_machine_6_1_options(MachineClass *mc) static void virt_machine_6_1_options(MachineClass *mc)
{ {

View File

@ -37,6 +37,9 @@
#include "hw/virtio/virtio.h" #include "hw/virtio/virtio.h"
#include "hw/virtio/virtio-pci.h" #include "hw/virtio/virtio-pci.h"
GlobalProperty hw_compat_6_2[] = {};
const size_t hw_compat_6_2_len = G_N_ELEMENTS(hw_compat_6_2);
GlobalProperty hw_compat_6_1[] = { GlobalProperty hw_compat_6_1[] = {
{ "vhost-user-vsock-device", "seqpacket", "off" }, { "vhost-user-vsock-device", "seqpacket", "off" },
{ "nvme-ns", "shared", "off" }, { "nvme-ns", "shared", "off" },

View File

@ -94,6 +94,9 @@
#include "trace.h" #include "trace.h"
#include CONFIG_DEVICES #include CONFIG_DEVICES
GlobalProperty pc_compat_6_2[] = {};
const size_t pc_compat_6_2_len = G_N_ELEMENTS(pc_compat_6_2);
GlobalProperty pc_compat_6_1[] = { GlobalProperty pc_compat_6_1[] = {
{ TYPE_X86_CPU, "hv-version-id-build", "0x1bbc" }, { TYPE_X86_CPU, "hv-version-id-build", "0x1bbc" },
{ TYPE_X86_CPU, "hv-version-id-major", "0x0006" }, { TYPE_X86_CPU, "hv-version-id-major", "0x0006" },

View File

@ -413,7 +413,7 @@ static void pc_i440fx_machine_options(MachineClass *m)
machine_class_allow_dynamic_sysbus_dev(m, TYPE_VMBUS_BRIDGE); machine_class_allow_dynamic_sysbus_dev(m, TYPE_VMBUS_BRIDGE);
} }
static void pc_i440fx_6_2_machine_options(MachineClass *m) static void pc_i440fx_7_0_machine_options(MachineClass *m)
{ {
PCMachineClass *pcmc = PC_MACHINE_CLASS(m); PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
pc_i440fx_machine_options(m); pc_i440fx_machine_options(m);
@ -422,6 +422,18 @@ static void pc_i440fx_6_2_machine_options(MachineClass *m)
pcmc->default_cpu_version = 1; pcmc->default_cpu_version = 1;
} }
DEFINE_I440FX_MACHINE(v7_0, "pc-i440fx-7.0", NULL,
pc_i440fx_7_0_machine_options);
static void pc_i440fx_6_2_machine_options(MachineClass *m)
{
pc_i440fx_7_0_machine_options(m);
m->alias = NULL;
m->is_default = false;
compat_props_add(m->compat_props, hw_compat_6_2, hw_compat_6_2_len);
compat_props_add(m->compat_props, pc_compat_6_2, pc_compat_6_2_len);
}
DEFINE_I440FX_MACHINE(v6_2, "pc-i440fx-6.2", NULL, DEFINE_I440FX_MACHINE(v6_2, "pc-i440fx-6.2", NULL,
pc_i440fx_6_2_machine_options); pc_i440fx_6_2_machine_options);

View File

@ -360,7 +360,7 @@ static void pc_q35_machine_options(MachineClass *m)
m->max_cpus = 288; m->max_cpus = 288;
} }
static void pc_q35_6_2_machine_options(MachineClass *m) static void pc_q35_7_0_machine_options(MachineClass *m)
{ {
PCMachineClass *pcmc = PC_MACHINE_CLASS(m); PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
pc_q35_machine_options(m); pc_q35_machine_options(m);
@ -368,6 +368,17 @@ static void pc_q35_6_2_machine_options(MachineClass *m)
pcmc->default_cpu_version = 1; pcmc->default_cpu_version = 1;
} }
DEFINE_Q35_MACHINE(v7_0, "pc-q35-7.0", NULL,
pc_q35_7_0_machine_options);
static void pc_q35_6_2_machine_options(MachineClass *m)
{
pc_q35_7_0_machine_options(m);
m->alias = NULL;
compat_props_add(m->compat_props, hw_compat_6_2, hw_compat_6_2_len);
compat_props_add(m->compat_props, pc_compat_6_2, pc_compat_6_2_len);
}
DEFINE_Q35_MACHINE(v6_2, "pc-q35-6.2", NULL, DEFINE_Q35_MACHINE(v6_2, "pc-q35-6.2", NULL,
pc_q35_6_2_machine_options); pc_q35_6_2_machine_options);

View File

@ -4666,14 +4666,25 @@ static void spapr_machine_latest_class_options(MachineClass *mc)
type_init(spapr_machine_register_##suffix) type_init(spapr_machine_register_##suffix)
/* /*
* pseries-6.2 * pseries-7.0
*/ */
static void spapr_machine_6_2_class_options(MachineClass *mc) static void spapr_machine_7_0_class_options(MachineClass *mc)
{ {
/* Defaults for the latest behaviour inherited from the base class */ /* Defaults for the latest behaviour inherited from the base class */
} }
DEFINE_SPAPR_MACHINE(6_2, "6.2", true); DEFINE_SPAPR_MACHINE(7_0, "7.0", true);
/*
* pseries-6.2
*/
static void spapr_machine_6_2_class_options(MachineClass *mc)
{
spapr_machine_7_0_class_options(mc);
compat_props_add(mc->compat_props, hw_compat_6_2, hw_compat_6_2_len);
}
DEFINE_SPAPR_MACHINE(6_2, "6.2", false);
/* /*
* pseries-6.1 * pseries-6.1

View File

@ -791,14 +791,26 @@ bool css_migration_enabled(void)
} \ } \
type_init(ccw_machine_register_##suffix) type_init(ccw_machine_register_##suffix)
static void ccw_machine_7_0_instance_options(MachineState *machine)
{
}
static void ccw_machine_7_0_class_options(MachineClass *mc)
{
}
DEFINE_CCW_MACHINE(7_0, "7.0", true);
static void ccw_machine_6_2_instance_options(MachineState *machine) static void ccw_machine_6_2_instance_options(MachineState *machine)
{ {
ccw_machine_7_0_instance_options(machine);
} }
static void ccw_machine_6_2_class_options(MachineClass *mc) static void ccw_machine_6_2_class_options(MachineClass *mc)
{ {
ccw_machine_7_0_class_options(mc);
compat_props_add(mc->compat_props, hw_compat_6_2, hw_compat_6_2_len);
} }
DEFINE_CCW_MACHINE(6_2, "6.2", true); DEFINE_CCW_MACHINE(6_2, "6.2", false);
static void ccw_machine_6_1_instance_options(MachineState *machine) static void ccw_machine_6_1_instance_options(MachineState *machine)
{ {

View File

@ -380,6 +380,9 @@ struct MachineState {
} \ } \
type_init(machine_initfn##_register_types) type_init(machine_initfn##_register_types)
extern GlobalProperty hw_compat_6_2[];
extern const size_t hw_compat_6_2_len;
extern GlobalProperty hw_compat_6_1[]; extern GlobalProperty hw_compat_6_1[];
extern const size_t hw_compat_6_1_len; extern const size_t hw_compat_6_1_len;

View File

@ -196,6 +196,9 @@ void pc_madt_cpu_entry(AcpiDeviceIf *adev, int uid,
/* sgx.c */ /* sgx.c */
void pc_machine_init_sgx_epc(PCMachineState *pcms); void pc_machine_init_sgx_epc(PCMachineState *pcms);
extern GlobalProperty pc_compat_6_2[];
extern const size_t pc_compat_6_2_len;
extern GlobalProperty pc_compat_6_1[]; extern GlobalProperty pc_compat_6_1[];
extern const size_t pc_compat_6_1_len; extern const size_t pc_compat_6_1_len;

View File

@ -2065,14 +2065,6 @@ SRST
``-display sdl,grab-mod=rctrl`` instead. ``-display sdl,grab-mod=rctrl`` instead.
ERST ERST
DEF("no-quit", 0, QEMU_OPTION_no_quit,
"-no-quit disable SDL/GTK window close capability (deprecated)\n", QEMU_ARCH_ALL)
SRST
``-no-quit``
Disable window close capability (SDL and GTK only). This option is
deprecated, please use ``-display ...,window-close=off`` instead.
ERST
DEF("sdl", 0, QEMU_OPTION_sdl, DEF("sdl", 0, QEMU_OPTION_sdl,
"-sdl shorthand for -display sdl\n", QEMU_ARCH_ALL) "-sdl shorthand for -display sdl\n", QEMU_ARCH_ALL)
SRST SRST

View File

@ -1941,7 +1941,7 @@ static void qemu_create_early_backends(void)
"for SDL, ignoring option"); "for SDL, ignoring option");
} }
if (dpy.has_window_close && !use_gtk && !use_sdl) { if (dpy.has_window_close && !use_gtk && !use_sdl) {
error_report("-no-quit is only valid for GTK and SDL, " error_report("window-close is only valid for GTK and SDL, "
"ignoring option"); "ignoring option");
} }
@ -3301,12 +3301,6 @@ void qemu_init(int argc, char **argv, char **envp)
warn_report("-ctrl-grab is deprecated, please use " warn_report("-ctrl-grab is deprecated, please use "
"-display sdl,grab-mod=rctrl instead."); "-display sdl,grab-mod=rctrl instead.");
break; break;
case QEMU_OPTION_no_quit:
dpy.has_window_close = true;
dpy.window_close = false;
warn_report("-no-quit is deprecated, please use "
"-display ...,window-close=off instead.");
break;
case QEMU_OPTION_sdl: case QEMU_OPTION_sdl:
warn_report("-sdl is deprecated, use -display sdl instead."); warn_report("-sdl is deprecated, use -display sdl instead.");
#ifdef CONFIG_SDL #ifdef CONFIG_SDL

View File

@ -960,9 +960,11 @@ int main(int argc, char **argv)
qtest_add_func("hd-geo/ide/device/user/chst", test_ide_device_user_chst); qtest_add_func("hd-geo/ide/device/user/chst", test_ide_device_user_chst);
if (have_qemu_img()) { if (have_qemu_img()) {
qtest_add_func("hd-geo/override/ide", test_override_ide); qtest_add_func("hd-geo/override/ide", test_override_ide);
qtest_add_func("hd-geo/override/scsi", test_override_scsi); if (qtest_has_device("lsi53c895a")) {
qtest_add_func("hd-geo/override/scsi_2_controllers", qtest_add_func("hd-geo/override/scsi", test_override_scsi);
test_override_scsi_2_controllers); qtest_add_func("hd-geo/override/scsi_2_controllers",
test_override_scsi_2_controllers);
}
qtest_add_func("hd-geo/override/virtio_blk", test_override_virtio_blk); qtest_add_func("hd-geo/override/virtio_blk", test_override_virtio_blk);
qtest_add_func("hd-geo/override/zero_chs", test_override_zero_chs); qtest_add_func("hd-geo/override/zero_chs", test_override_zero_chs);
qtest_add_func("hd-geo/override/scsi_hot_unplug", qtest_add_func("hd-geo/override/scsi_hot_unplug",

View File

@ -302,54 +302,65 @@ int main(int argc, char **argv)
/* Check compatibility of old machine-types that didn't /* Check compatibility of old machine-types that didn't
* auto-increase level/xlevel/xlevel2: */ * auto-increase level/xlevel/xlevel2: */
if (qtest_has_machine("pc-i440fx-2.7")) {
add_cpuid_test("x86/cpuid/auto-level/pc-2.7", add_cpuid_test("x86/cpuid/auto-level/pc-2.7",
"-machine pc-i440fx-2.7 -cpu 486,arat=on,avx512vbmi=on,xsaveopt=on", "-machine pc-i440fx-2.7 -cpu 486,arat=on,avx512vbmi=on,xsaveopt=on",
"level", 1); "level", 1);
add_cpuid_test("x86/cpuid/auto-xlevel/pc-2.7", add_cpuid_test("x86/cpuid/auto-xlevel/pc-2.7",
"-machine pc-i440fx-2.7 -cpu 486,3dnow=on,sse4a=on,invtsc=on,npt=on,svm=on", "-machine pc-i440fx-2.7 -cpu 486,3dnow=on,sse4a=on,invtsc=on,npt=on,svm=on",
"xlevel", 0); "xlevel", 0);
add_cpuid_test("x86/cpuid/auto-xlevel2/pc-2.7", add_cpuid_test("x86/cpuid/auto-xlevel2/pc-2.7",
"-machine pc-i440fx-2.7 -cpu 486,xstore=on", "-machine pc-i440fx-2.7 -cpu 486,xstore=on",
"xlevel2", 0); "xlevel2", 0);
}
/* /*
* QEMU 1.4.0 had auto-level enabled for CPUID[7], already, * QEMU 1.4.0 had auto-level enabled for CPUID[7], already,
* and the compat code that sets default level shouldn't * and the compat code that sets default level shouldn't
* disable the auto-level=7 code: * disable the auto-level=7 code:
*/ */
add_cpuid_test("x86/cpuid/auto-level7/pc-i440fx-1.4/off", if (qtest_has_machine("pc-i440fx-1.4")) {
"-machine pc-i440fx-1.4 -cpu Nehalem", add_cpuid_test("x86/cpuid/auto-level7/pc-i440fx-1.4/off",
"level", 2); "-machine pc-i440fx-1.4 -cpu Nehalem",
add_cpuid_test("x86/cpuid/auto-level7/pc-i440fx-1.5/on", "level", 2);
"-machine pc-i440fx-1.4 -cpu Nehalem,smap=on", add_cpuid_test("x86/cpuid/auto-level7/pc-i440fx-1.5/on",
"level", 7); "-machine pc-i440fx-1.4 -cpu Nehalem,smap=on",
add_cpuid_test("x86/cpuid/auto-level7/pc-i440fx-2.3/off", "level", 7);
"-machine pc-i440fx-2.3 -cpu Penryn", }
"level", 4); if (qtest_has_machine("pc-i440fx-2.3")) {
add_cpuid_test("x86/cpuid/auto-level7/pc-i440fx-2.3/on", add_cpuid_test("x86/cpuid/auto-level7/pc-i440fx-2.3/off",
"-machine pc-i440fx-2.3 -cpu Penryn,erms=on", "-machine pc-i440fx-2.3 -cpu Penryn",
"level", 7); "level", 4);
add_cpuid_test("x86/cpuid/auto-level7/pc-i440fx-2.9/off", add_cpuid_test("x86/cpuid/auto-level7/pc-i440fx-2.3/on",
"-machine pc-i440fx-2.9 -cpu Conroe", "-machine pc-i440fx-2.3 -cpu Penryn,erms=on",
"level", 10); "level", 7);
add_cpuid_test("x86/cpuid/auto-level7/pc-i440fx-2.9/on", }
"-machine pc-i440fx-2.9 -cpu Conroe,erms=on", if (qtest_has_machine("pc-i440fx-2.9")) {
"level", 10); add_cpuid_test("x86/cpuid/auto-level7/pc-i440fx-2.9/off",
"-machine pc-i440fx-2.9 -cpu Conroe",
"level", 10);
add_cpuid_test("x86/cpuid/auto-level7/pc-i440fx-2.9/on",
"-machine pc-i440fx-2.9 -cpu Conroe,erms=on",
"level", 10);
}
/* /*
* xlevel doesn't have any feature that triggers auto-level * xlevel doesn't have any feature that triggers auto-level
* code on old machine-types. Just check that the compat code * code on old machine-types. Just check that the compat code
* is working correctly: * is working correctly:
*/ */
add_cpuid_test("x86/cpuid/xlevel-compat/pc-i440fx-2.3", if (qtest_has_machine("pc-i440fx-2.3")) {
"-machine pc-i440fx-2.3 -cpu SandyBridge", add_cpuid_test("x86/cpuid/xlevel-compat/pc-i440fx-2.3",
"xlevel", 0x8000000a); "-machine pc-i440fx-2.3 -cpu SandyBridge",
add_cpuid_test("x86/cpuid/xlevel-compat/pc-i440fx-2.4/npt-off", "xlevel", 0x8000000a);
"-machine pc-i440fx-2.4 -cpu SandyBridge,", }
"xlevel", 0x80000008); if (qtest_has_machine("pc-i440fx-2.4")) {
add_cpuid_test("x86/cpuid/xlevel-compat/pc-i440fx-2.4/npt-on", add_cpuid_test("x86/cpuid/xlevel-compat/pc-i440fx-2.4/npt-off",
"-machine pc-i440fx-2.4 -cpu SandyBridge,svm=on,npt=on", "-machine pc-i440fx-2.4 -cpu SandyBridge,",
"xlevel", 0x80000008); "xlevel", 0x80000008);
add_cpuid_test("x86/cpuid/xlevel-compat/pc-i440fx-2.4/npt-on",
"-machine pc-i440fx-2.4 -cpu SandyBridge,svm=on,npt=on",
"xlevel", 0x80000008);
}
/* Test feature parsing */ /* Test feature parsing */
add_feature_test("x86/cpuid/features/plus", add_feature_test("x86/cpuid/features/plus",

View File

@ -305,9 +305,11 @@ static void test_socket_unix_abstract(void)
}; };
int i; int i;
i = g_file_open_tmp("unix-XXXXXX", &addr.u.q_unix.path, NULL);
g_assert_true(i >= 0);
close(i);
addr.type = SOCKET_ADDRESS_TYPE_UNIX; addr.type = SOCKET_ADDRESS_TYPE_UNIX;
addr.u.q_unix.path = g_strdup_printf("unix-%d-%u",
getpid(), g_random_int());
addr.u.q_unix.has_abstract = true; addr.u.q_unix.has_abstract = true;
addr.u.q_unix.abstract = true; addr.u.q_unix.abstract = true;
addr.u.q_unix.has_tight = false; addr.u.q_unix.has_tight = false;