summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPeter Maydell2019-12-17 16:55:20 +0100
committerPeter Maydell2019-12-17 16:55:20 +0100
commitaceeaa69d28e6f08a24395d0aa6915b687d0a681 (patch)
treed41f95a304e7f984455b8fac4992cf0d2e000dcc /tests
parentMerge remote-tracking branch 'remotes/cleber/tags/python-next-pull-request' i... (diff)
parenttests: use g_test_rand_int (diff)
downloadqemu-aceeaa69d28e6f08a24395d0aa6915b687d0a681.tar.gz
qemu-aceeaa69d28e6f08a24395d0aa6915b687d0a681.tar.xz
qemu-aceeaa69d28e6f08a24395d0aa6915b687d0a681.zip
Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2019-12-17' into staging
* Removal of the deprecated bluetooth code * Some qtest and misc patches # gpg: Signature made Tue 17 Dec 2019 08:09:08 GMT # gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5 # gpg: issuer "thuth@redhat.com" # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full] # gpg: aka "Thomas Huth <thuth@redhat.com>" [full] # gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full] # gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown] # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * remotes/huth-gitlab/tags/pull-request-2019-12-17: tests: use g_test_rand_int tests/Makefile: Fix check-report.* targets shown in check-help glib: use portable g_setenv() hw/misc/ivshmem: Bury dead legacy INTx code pseries: disable migration-test if /dev/kvm cannot be used tests: fix modules-test 'duplicate test case' error Remove libbluetooth / bluez from the CI tests Remove the core bluetooth code hw/usb: Remove the USB bluetooth dongle device hw/arm/nseries: Replace the bluetooth chardev with a "null" chardev Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.include4
-rw-r--r--tests/docker/dockerfiles/fedora.docker1
-rw-r--r--tests/docker/dockerfiles/ubuntu.docker1
-rw-r--r--tests/docker/dockerfiles/ubuntu1804.docker1
-rw-r--r--tests/ivshmem-test.c2
-rw-r--r--tests/libqtest.c2
-rw-r--r--tests/migration-test.c3
-rw-r--r--tests/modules-test.c3
-rw-r--r--tests/test-bitmap.c8
-rw-r--r--tests/test-crypto-tlscredsx509.c2
-rw-r--r--tests/test-crypto-tlssession.c2
-rw-r--r--tests/test-io-channel-tls.c2
-rw-r--r--tests/test-qga.c4
-rw-r--r--tests/test-vmstate.c2
14 files changed, 17 insertions, 20 deletions
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 82dab2a36a..b381387048 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -16,12 +16,10 @@ check-help:
@echo " $(MAKE) check-softfloat Run FPU emulation tests"
@echo " $(MAKE) check-acceptance Run all acceptance (functional) tests"
@echo
- @echo " $(MAKE) check-report.html Generates an HTML test report"
+ @echo " $(MAKE) check-report.tap Generates an aggregated TAP test report"
@echo " $(MAKE) check-venv Creates a Python venv for tests"
@echo " $(MAKE) check-clean Clean the tests and related data"
@echo
- @echo "Please note that HTML reports do not regenerate if the unit tests"
- @echo "have not changed."
@echo
@echo "The variable SPEED can be set to control the gtester speed setting."
@echo "Default options are -k and (for $(MAKE) V=1) --verbose; they can be"
diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker
index 47732fc5d5..51d475e6be 100644
--- a/tests/docker/dockerfiles/fedora.docker
+++ b/tests/docker/dockerfiles/fedora.docker
@@ -2,7 +2,6 @@ FROM fedora:30
ENV PACKAGES \
bc \
bison \
- bluez-libs-devel \
brlapi-devel \
bzip2 \
bzip2-devel \
diff --git a/tests/docker/dockerfiles/ubuntu.docker b/tests/docker/dockerfiles/ubuntu.docker
index ecea155646..18f1100409 100644
--- a/tests/docker/dockerfiles/ubuntu.docker
+++ b/tests/docker/dockerfiles/ubuntu.docker
@@ -19,7 +19,6 @@ ENV PACKAGES flex bison \
glusterfs-common \
libaio-dev \
libattr1-dev \
- libbluetooth-dev \
libbrlapi-dev \
libbz2-dev \
libcacard-dev \
diff --git a/tests/docker/dockerfiles/ubuntu1804.docker b/tests/docker/dockerfiles/ubuntu1804.docker
index 32a607471a..0766f94cf4 100644
--- a/tests/docker/dockerfiles/ubuntu1804.docker
+++ b/tests/docker/dockerfiles/ubuntu1804.docker
@@ -8,7 +8,6 @@ ENV PACKAGES flex bison \
glusterfs-common \
libaio-dev \
libattr1-dev \
- libbluetooth-dev \
libbrlapi-dev \
libbz2-dev \
libcacard-dev \
diff --git a/tests/ivshmem-test.c b/tests/ivshmem-test.c
index be9aa92a61..ecda256472 100644
--- a/tests/ivshmem-test.c
+++ b/tests/ivshmem-test.c
@@ -443,7 +443,7 @@ static gchar *mktempshm(int size, int *fd)
while (true) {
gchar *name;
- name = g_strdup_printf("/qtest-%u-%u", getpid(), g_random_int());
+ name = g_strdup_printf("/qtest-%u-%u", getpid(), g_test_rand_int());
*fd = shm_open(name, O_CREAT|O_RDWR|O_EXCL,
S_IRWXU|S_IRWXG|S_IRWXO);
if (*fd > 0) {
diff --git a/tests/libqtest.c b/tests/libqtest.c
index 91e9cb220c..f36e30a4de 100644
--- a/tests/libqtest.c
+++ b/tests/libqtest.c
@@ -254,7 +254,7 @@ QTestState *qtest_init_without_qmp_handshake(const char *extra_args)
s->expected_status = 0;
s->qemu_pid = fork();
if (s->qemu_pid == 0) {
- setenv("QEMU_AUDIO_DRV", "none", true);
+ g_setenv("QEMU_AUDIO_DRV", "none", true);
execlp("/bin/sh", "sh", "-c", command, NULL);
exit(1);
}
diff --git a/tests/migration-test.c b/tests/migration-test.c
index ebd77a581a..a5343fdc66 100644
--- a/tests/migration-test.c
+++ b/tests/migration-test.c
@@ -1349,7 +1349,8 @@ int main(int argc, char **argv)
* some reason)
*/
if (g_str_equal(qtest_get_arch(), "ppc64") &&
- access("/sys/module/kvm_hv", F_OK)) {
+ (access("/sys/module/kvm_hv", F_OK) ||
+ access("/dev/kvm", R_OK | W_OK))) {
g_test_message("Skipping test: kvm_hv not available");
return g_test_run();
}
diff --git a/tests/modules-test.c b/tests/modules-test.c
index d1a6ace218..88217686e1 100644
--- a/tests/modules-test.c
+++ b/tests/modules-test.c
@@ -64,7 +64,8 @@ int main(int argc, char *argv[])
g_test_init(&argc, &argv, NULL);
for (i = 0; i < G_N_ELEMENTS(modules); i += 2) {
- char *testname = g_strdup_printf("/module/load/%s", modules[i + 1]);
+ char *testname = g_strdup_printf("/module/load/%s%s",
+ modules[i], modules[i + 1]);
qtest_add_data_func(testname, modules + i, test_modules_load);
g_free(testname);
}
diff --git a/tests/test-bitmap.c b/tests/test-bitmap.c
index 087e02a26c..2f5b71458a 100644
--- a/tests/test-bitmap.c
+++ b/tests/test-bitmap.c
@@ -22,10 +22,10 @@ static void check_bitmap_copy_with_offset(void)
bmap2 = bitmap_new(BMAP_SIZE);
bmap3 = bitmap_new(BMAP_SIZE);
- bmap1[0] = random();
- bmap1[1] = random();
- bmap1[2] = random();
- bmap1[3] = random();
+ bmap1[0] = g_test_rand_int();
+ bmap1[1] = g_test_rand_int();
+ bmap1[2] = g_test_rand_int();
+ bmap1[3] = g_test_rand_int();
total = BITS_PER_LONG * 4;
/* Shift 115 bits into bmap2 */
diff --git a/tests/test-crypto-tlscredsx509.c b/tests/test-crypto-tlscredsx509.c
index a27efb7540..f487349c32 100644
--- a/tests/test-crypto-tlscredsx509.c
+++ b/tests/test-crypto-tlscredsx509.c
@@ -141,7 +141,7 @@ int main(int argc, char **argv)
module_call_init(MODULE_INIT_QOM);
g_test_init(&argc, &argv, NULL);
- setenv("GNUTLS_FORCE_FIPS_MODE", "2", 1);
+ g_setenv("GNUTLS_FORCE_FIPS_MODE", "2", 1);
mkdir(WORKDIR, 0700);
diff --git a/tests/test-crypto-tlssession.c b/tests/test-crypto-tlssession.c
index 6560d7134f..8b2453fa79 100644
--- a/tests/test-crypto-tlssession.c
+++ b/tests/test-crypto-tlssession.c
@@ -398,7 +398,7 @@ int main(int argc, char **argv)
module_call_init(MODULE_INIT_QOM);
g_test_init(&argc, &argv, NULL);
- setenv("GNUTLS_FORCE_FIPS_MODE", "2", 1);
+ g_setenv("GNUTLS_FORCE_FIPS_MODE", "2", 1);
mkdir(WORKDIR, 0700);
diff --git a/tests/test-io-channel-tls.c b/tests/test-io-channel-tls.c
index 3c9ef6f941..ad7554c534 100644
--- a/tests/test-io-channel-tls.c
+++ b/tests/test-io-channel-tls.c
@@ -273,7 +273,7 @@ int main(int argc, char **argv)
module_call_init(MODULE_INIT_QOM);
g_test_init(&argc, &argv, NULL);
- setenv("GNUTLS_FORCE_FIPS_MODE", "2", 1);
+ g_setenv("GNUTLS_FORCE_FIPS_MODE", "2", 1);
mkdir(WORKDIR, 0700);
diff --git a/tests/test-qga.c b/tests/test-qga.c
index 1ca49bbced..d2b2435bb4 100644
--- a/tests/test-qga.c
+++ b/tests/test-qga.c
@@ -143,7 +143,7 @@ static void qmp_assertion_message_error(const char *domain,
static void test_qga_sync_delimited(gconstpointer fix)
{
const TestFixture *fixture = fix;
- guint32 v, r = g_random_int();
+ guint32 v, r = g_test_rand_int();
unsigned char c;
QDict *ret;
@@ -186,7 +186,7 @@ static void test_qga_sync_delimited(gconstpointer fix)
static void test_qga_sync(gconstpointer fix)
{
const TestFixture *fixture = fix;
- guint32 v, r = g_random_int();
+ guint32 v, r = g_test_rand_int();
QDict *ret;
/*
diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c
index 1e5be1d4ff..8f184f3556 100644
--- a/tests/test-vmstate.c
+++ b/tests/test-vmstate.c
@@ -1325,7 +1325,7 @@ int main(int argc, char **argv)
module_call_init(MODULE_INIT_QOM);
- setenv("QTEST_SILENT_ERRORS", "1", 1);
+ g_setenv("QTEST_SILENT_ERRORS", "1", 1);
g_test_init(&argc, &argv, NULL);
g_test_add_func("/vmstate/simple/primitive", test_simple_primitive);