summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPeter Maydell2020-10-01 13:23:19 +0200
committerPeter Maydell2020-10-01 13:23:19 +0200
commit37a712a0f969ca2df7f01182409a6c4825cebfb5 (patch)
tree6eeb0b7f0bde4c8a0f8e1115b990530c5c62e9fe /tests
parentMerge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (diff)
parenthw/net/can: Correct Kconfig dependencies (diff)
downloadqemu-37a712a0f969ca2df7f01182409a6c4825cebfb5.tar.gz
qemu-37a712a0f969ca2df7f01182409a6c4825cebfb5.tar.xz
qemu-37a712a0f969ca2df7f01182409a6c4825cebfb5.zip
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging
* SCSI fix (Dmitry, Li Feng, Li Qiang) * memory API fixes (Eduardo) * removal of deprecated '-numa node', 'cpu-add', '-smp' (Igor) * ACPI fix for VMBus (Jon) * relocatable install (myself) * always remove docker containers (myself) * serial cleanups (Philippe) * vmware cpuid leaf for tsc and apic frequency (Sunil) * KVM_FEATURE_ASYNC_PF_INT support (Vitaly) * i386 XSAVE bugfix (Xiaoyao) * QOM developer documentation in docs/devel (Eduardo) * new checkpatch tests (Dov) * x86_64 syscall fix (Douglas) * interrupt-based APF fix (Vitaly) * always create kvmclock (Vitaly) * fix bios-tables-test (Eduardo) * KVM PV features cleanup (myself) * CAN FD (Pavel) meson: * fixes (Marc-André, Max, Stefan, Alexander, myself) * moved libmpathpersist, cocoa, malloc tests (myself) * support for 0.56 introspected test dependencies (myself) # gpg: Signature made Wed 30 Sep 2020 18:11:45 BST # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini-gitlab/tags/for-upstream: (86 commits) hw/net/can: Correct Kconfig dependencies hw/net/can: Documentation for CTU CAN FD IP open hardware core emulation. hw/net/can: CTU CAN FD IP open hardware core emulation. hw/net/can/ctucafd: Add CTU CAN FD core register definitions. net/can: Add can_dlc2len and can_len2dlc for CAN FD. hw/net/can: sja1000 ignore CAN FD frames net/can: Initial host SocketCan support for CAN FD. target/i386: kvm: do not use kvm_check_extension to find paravirtual capabilities bios-tables-test: Remove kernel-irqchip=off option target/i386: always create kvmclock device target/i386: Fix VM migration when interrupt based APF is enabled helper_syscall x86_64: clear exception_is_int checkpatch: Detect '%#' or '%0#' in printf-style format strings typedefs: Restrict PCMachineState to 'hw/i386/pc.h' hw/xen: Split x86-specific declaration from generic hardware ones stubs: Split accelerator / hardware related stubs sysemu/xen: Add missing 'exec/cpu-common.h' header for ram_addr_t type hw/i386/xen: Rename X86/PC specific function as xen_hvm_init_pc() docs: Move object.h overview doc comment to qom.rst docs: Create docs/devel/qom.rst ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/fp/meson.build2
-rw-r--r--tests/meson.build9
-rw-r--r--tests/qemu-iotests/meson.build3
-rw-r--r--tests/qtest/bios-tables-test.c3
-rw-r--r--tests/qtest/fuzz/fuzz.c12
-rw-r--r--tests/qtest/meson.build8
-rw-r--r--tests/tcg/Makefile.qemu13
-rwxr-xr-xtests/tcg/configure.sh4
8 files changed, 34 insertions, 20 deletions
diff --git a/tests/fp/meson.build b/tests/fp/meson.build
index 8779a17aab..24739ad421 100644
--- a/tests/fp/meson.build
+++ b/tests/fp/meson.build
@@ -541,7 +541,6 @@ fpcflags += [
fptest = executable(
'fp-test',
['fp-test.c', tfdir / 'slowfloat.c', '../../fpu/softfloat.c'],
- build_by_default: false,
link_with: [libtestfloat, libsoftfloat],
dependencies: [qemuutil],
include_directories: [sfinc, include_directories(tfdir)],
@@ -628,7 +627,6 @@ test('fp-test:mulAdd', fptest,
fpbench = executable(
'fp-bench',
['fp-bench.c', '../../fpu/softfloat.c'],
- build_by_default: false,
link_with: [libtestfloat, libsoftfloat],
dependencies: [qemuutil],
include_directories: [sfinc, include_directories(tfdir)],
diff --git a/tests/meson.build b/tests/meson.build
index 04072a64ca..3c2969092d 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -56,7 +56,7 @@ test_qapi_files = custom_target('Test QAPI files',
# perhaps change qapi_gen to replace / with _, like Meson itself does?
subdir('include')
-libtestqapi = static_library('testqapi', sources: [test_qapi_files, test_qapi_outputs_extra])
+libtestqapi = static_library('testqapi', sources: [test_qapi_files, genh, test_qapi_outputs_extra])
testqapi = declare_dependency(link_with: libtestqapi)
testblock = declare_dependency(dependencies: [block], sources: 'iothread.c')
@@ -232,7 +232,7 @@ foreach test_name, extra: tests
src += test_ss.all_sources()
deps += test_ss.all_dependencies()
endif
- exe = executable(test_name, src, dependencies: deps)
+ exe = executable(test_name, src, genh, dependencies: deps)
test(test_name, exe,
depends: test_deps.get(test_name, []),
@@ -251,12 +251,11 @@ foreach bench_name, deps: benchs
suite: ['speed'])
endforeach
-if have_tools and 'CONFIG_VHOST_USER' in config_host
+if have_tools and 'CONFIG_VHOST_USER' in config_host and 'CONFIG_LINUX' in config_host
executable('vhost-user-bridge',
sources: files('vhost-user-bridge.c'),
link_with: [libvhost_user],
- dependencies: [qemuutil],
- build_by_default: false)
+ dependencies: [qemuutil])
endif
if have_system and 'CONFIG_POSIX' in config_host
diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build
index 60470936b4..67aed1e492 100644
--- a/tests/qemu-iotests/meson.build
+++ b/tests/qemu-iotests/meson.build
@@ -1,6 +1,5 @@
if 'CONFIG_LINUX' in config_host
- socket_scm_helper = executable('socket_scm_helper', 'socket_scm_helper.c',
- build_by_default: false)
+ socket_scm_helper = executable('socket_scm_helper', 'socket_scm_helper.c')
else
socket_scm_helper = []
endif
diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
index b514b70b62..67d1bed082 100644
--- a/tests/qtest/bios-tables-test.c
+++ b/tests/qtest/bios-tables-test.c
@@ -663,8 +663,7 @@ static void test_acpi_one(const char *params, test_data *data)
data->uefi_fl1, data->uefi_fl2, data->cd, params ? params : "");
} else {
- /* Disable kernel irqchip to be able to override apic irq0. */
- args = g_strdup_printf("-machine %s,kernel-irqchip=off %s -accel tcg "
+ args = g_strdup_printf("-machine %s %s -accel tcg "
"-net none -display none %s "
"-drive id=hd0,if=none,file=%s,format=raw "
"-device %s,drive=hd0 ",
diff --git a/tests/qtest/fuzz/fuzz.c b/tests/qtest/fuzz/fuzz.c
index 7f266ffc63..d926c490c5 100644
--- a/tests/qtest/fuzz/fuzz.c
+++ b/tests/qtest/fuzz/fuzz.c
@@ -143,7 +143,8 @@ int LLVMFuzzerInitialize(int *argc, char ***argv, char ***envp)
{
char *target_name;
- char *bindir, *datadir;
+ const char *bindir;
+ char *datadir;
bool serialize = false;
/* Initialize qgraph and modules */
@@ -152,6 +153,7 @@ int LLVMFuzzerInitialize(int *argc, char ***argv, char ***envp)
module_call_init(MODULE_INIT_QOM);
module_call_init(MODULE_INIT_LIBQOS);
+ qemu_init_exec_dir(**argv);
target_name = strstr(**argv, "-target-");
if (target_name) { /* The binary name specifies the target */
target_name += strlen("-target-");
@@ -164,13 +166,13 @@ int LLVMFuzzerInitialize(int *argc, char ***argv, char ***envp)
* location of the executable. Using this we add exec_dir/pc-bios to
* the datadirs.
*/
- bindir = g_path_get_dirname(**argv);
+ bindir = qemu_get_exec_dir();
datadir = g_build_filename(bindir, "pc-bios", NULL);
- g_free(bindir);
if (g_file_test(datadir, G_FILE_TEST_IS_DIR)) {
qemu_add_data_dir(datadir);
- }
- g_free(datadir);
+ } else {
+ g_free(datadir);
+ }
} else if (*argc > 1) { /* The target is specified as an argument */
target_name = (*argv)[1];
if (!strstr(target_name, "--fuzz-target=")) {
diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
index 874b5be62b..4f7757ee93 100644
--- a/tests/qtest/meson.build
+++ b/tests/qtest/meson.build
@@ -228,10 +228,15 @@ foreach dir : target_dirs
endif
target_base = dir.split('-')[0]
+ qtest_emulator = emulators['qemu-system-' + target_base]
qtests = get_variable('qtests_' + target_base, []) + qtests_generic
+ test_deps = []
qtest_env = environment()
- qtest_env.set('QTEST_QEMU_IMG', './qemu-img')
+ if have_tools
+ qtest_env.set('QTEST_QEMU_IMG', './qemu-img')
+ test_deps += [qemu_img]
+ endif
qtest_env.set('G_TEST_DBUS_DAEMON', meson.source_root() / 'tests/dbus-vmstate-daemon.sh')
qtest_env.set('QTEST_QEMU_BINARY', './qemu-system-' + target_base)
@@ -248,6 +253,7 @@ foreach dir : target_dirs
# FIXME: missing dependency on the emulator binary and qemu-img
test('qtest-@0@: @1@'.format(target_base, test),
qtest_executables[test],
+ depends: [test_deps, qtest_emulator],
env: qtest_env,
args: ['--tap', '-k'],
protocol: 'tap',
diff --git a/tests/tcg/Makefile.qemu b/tests/tcg/Makefile.qemu
index 0332bad10f..c096c611a2 100644
--- a/tests/tcg/Makefile.qemu
+++ b/tests/tcg/Makefile.qemu
@@ -11,9 +11,20 @@
# The configure script fills in extra information about
# useful docker images or alternative compiler flags.
+# Usage: $(call quiet-command,command and args,"NAME","args to print")
+# This will run "command and args", and either:
+# if V=1 just print the whole command and args
+# otherwise print the 'quiet' output in the format " NAME args to print"
+# NAME should be a short name of the command, 7 letters or fewer.
+# If called with only a single argument, will print nothing in quiet mode.
+quiet-command-run = $(if $(V),,$(if $2,printf " %-7s %s\n" $2 $3 && ))$1
+quiet-@ = $(if $(V),,@)
+quiet-command = $(quiet-@)$(call quiet-command-run,$1,$2,$3)
+
CROSS_CC_GUEST:=
DOCKER_IMAGE:=
--include $(BUILD_DIR)/tests/tcg/config-$(TARGET).mak
+
+-include tests/tcg/config-$(TARGET).mak
GUEST_BUILD=
TCG_MAKE=../Makefile.target
diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
index 598a50cd4f..be51bdb5a4 100755
--- a/tests/tcg/configure.sh
+++ b/tests/tcg/configure.sh
@@ -193,11 +193,11 @@ for target in $target_list; do
case $target in
*-linux-user | *-bsd-user)
echo "CONFIG_USER_ONLY=y" >> $config_target_mak
- echo "QEMU=\$(BUILD_DIR)/qemu-$arch" >> $config_target_mak
+ echo "QEMU=$PWD/qemu-$arch" >> $config_target_mak
;;
*-softmmu)
echo "CONFIG_SOFTMMU=y" >> $config_target_mak
- echo "QEMU=\$(BUILD_DIR)/qemu-system-$arch" >> $config_target_mak
+ echo "QEMU=$PWD/qemu-system-$arch" >> $config_target_mak
;;
esac