aboutsummaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-04-21 09:27:54 -0700
committerRichard Henderson <richard.henderson@linaro.org>2022-04-21 09:27:54 -0700
commit28298069afff3eb696e4995e63b2579b27adf378 (patch)
tree1be2b9cb1763cfaaaa6c154fca54b6ef3c2c6b15 /tests/unit
parent401d46789410e88e9e90d76a11f46e8e9f358d55 (diff)
parent55fa0170721e827c1701db3a66a54d44b5660d53 (diff)
downloadqemu-28298069afff3eb696e4995e63b2579b27adf378.zip
qemu-28298069afff3eb696e4995e63b2579b27adf378.tar.gz
qemu-28298069afff3eb696e4995e63b2579b27adf378.tar.bz2
Merge tag 'misc-pull-request' of gitlab.com:marcandre.lureau/qemu into staging
Misc cleanups # -----BEGIN PGP SIGNATURE----- # # iQJQBAABCAA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmJhYIscHG1hcmNhbmRy # ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5W0jD/43n8PL2cv42lq6OaIS # OYN9vfW9xgA9THZiUH4xEHYreZh+KofmY1PbJn1n7q+v6DecBiqM4fZr1LY8X3PM # xRUH0l4gjXwYwX2cSSo5UTZ/PF248Uoo3tUE3vgMFkYghHMjKcTtaSkYEPGHf2nR # t3m1qLG9w9YPhVg7PNCntjUKi+w2TtcrRVzP7V7XyFc1HrAoT0ys6KaBBrXMbcjz # SxTRbcwSq+6aPjQIn0RWp8Hp1HkdNjegB98dkyqRLlVaugHZWPYDXDQTgVziQlX8 # dU8YrlvTOtDWwsNP6awWnW6/IjKuJjGR0wT3QKwi8JAZ0YV3egwEKoQRUAyHtnn2 # FkSMYgmJcF0ai1aIJFAx+3PIzCfS49lKXA0t303DtY3hRR9JKGMwaV2do9Wm2irt # o7T1lKKN7R7R8Q3U4OsatYMYm7KYL07NEDiQCPloGvCo27ezkAWCKXAw1mRUkxKF # jKwJPcnOUq21Jp6tpjsR8ifSw70jBSEWQSGqhXnDhZhx2C2/Qqkg2I8DagLiPger # kYxbQ13LTG0R25YHa1r3UmzuD+HpZOM8XoLJc5yun/1UrwyR9ghHrOoxkSnRT2Ks # QFn//xQ2SzUnGBNzNSMfTk8vzludxSWfFnOjkviF6E2Elnw3p8f/kOQRAft5dMBY # ftgoy2yLone3HpKfjuOriicIzg== # =0GLo # -----END PGP SIGNATURE----- # gpg: Signature made Thu 21 Apr 2022 06:47:55 AM PDT # gpg: using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5 # gpg: issuer "marcandre.lureau@redhat.com" # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full] # gpg: aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [full] * tag 'misc-pull-request' of gitlab.com:marcandre.lureau/qemu: (30 commits) qga: use fixed-length and GDateTime for log timestamp tests/fuzz: fix warning qga: remove need for QEMU atomic.h util: replace qemu_get_local_state_pathname() util: use qemu_create() in qemu_write_pidfile() util: use qemu_write_full() in qemu_write_pidfile() util: simplify write in signal handler qtest: simplify socket_send() qga: move qga_get_host_name() Move error_printf_unless_qmp() with monitor unit tests: run-time skip test-qga if TSAN is enabled compiler.h: add QEMU_SANITIZE_{ADDRESS,THREAD} tests: remove block/qdict checks from check-qobject.c include: move qdict_{crumple,flatten} declarations include: add qemu/keyval.h include: move qemu_fdatasync() to osdep include: move qemu_msync() to osdep compiler.h: replace QEMU_NORETURN with G_NORETURN osdep.h: move qemu_build_not_reached() doc/style: CLang -> Clang ... Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/check-qobject.c7
-rw-r--r--tests/unit/check-qom-proplist.c1
-rw-r--r--tests/unit/meson.build2
-rw-r--r--tests/unit/test-forward-visitor.c2
-rw-r--r--tests/unit/test-keyval.c2
-rw-r--r--tests/unit/test-qga.c7
6 files changed, 11 insertions, 10 deletions
diff --git a/tests/unit/check-qobject.c b/tests/unit/check-qobject.c
index 0ed094e..022b7c7 100644
--- a/tests/unit/check-qobject.c
+++ b/tests/unit/check-qobject.c
@@ -178,7 +178,6 @@ static void qobject_is_equal_list_test(void)
static void qobject_is_equal_dict_test(void)
{
g_autoptr(QDict) dict_cloned = NULL;
- g_autoptr(QDict) dict_crumpled = NULL;
g_autoptr(QDict) dict_0 = qdict_new();
g_autoptr(QDict) dict_1 = qdict_new();
g_autoptr(QDict) dict_different_key = qdict_new();
@@ -236,12 +235,6 @@ static void qobject_is_equal_dict_test(void)
dict_different_null_key, dict_longer, dict_shorter,
dict_nested);
- dict_crumpled = qobject_to(QDict, qdict_crumple(dict_1, &error_abort));
- check_equal(dict_crumpled, dict_nested);
-
- qdict_flatten(dict_nested);
- check_equal(dict_0, dict_nested);
-
/* Containing an NaN value will make this dict compare unequal to
* itself */
qdict_put(dict_0, "NaN", qnum_from_double(NAN));
diff --git a/tests/unit/check-qom-proplist.c b/tests/unit/check-qom-proplist.c
index ed34108..79d4a8b 100644
--- a/tests/unit/check-qom-proplist.c
+++ b/tests/unit/check-qom-proplist.c
@@ -27,6 +27,7 @@
#include "qom/object.h"
#include "qemu/module.h"
#include "qemu/option.h"
+#include "qemu/keyval.h"
#include "qemu/config-file.h"
#include "qom/object_interfaces.h"
diff --git a/tests/unit/meson.build b/tests/unit/meson.build
index 026e39f..ab01e00 100644
--- a/tests/unit/meson.build
+++ b/tests/unit/meson.build
@@ -153,7 +153,7 @@ if have_system
endif
endif
-if have_ga and targetos == 'linux' and 'CONFIG_TSAN' not in config_host
+if have_ga and targetos == 'linux'
tests += {'test-qga': ['../qtest/libqtest.c']}
test_deps += {'test-qga': qga}
endif
diff --git a/tests/unit/test-forward-visitor.c b/tests/unit/test-forward-visitor.c
index 01de155..eea8ffc 100644
--- a/tests/unit/test-forward-visitor.c
+++ b/tests/unit/test-forward-visitor.c
@@ -15,7 +15,7 @@
#include "qapi/qmp/qobject.h"
#include "qapi/qmp/qdict.h"
#include "test-qapi-visit.h"
-#include "qemu/option.h"
+#include "qemu/keyval.h"
typedef bool GenericVisitor (Visitor *, const char *, void **, Error **);
#define CAST_VISIT_TYPE(fn) ((GenericVisitor *)(fn))
diff --git a/tests/unit/test-keyval.c b/tests/unit/test-keyval.c
index af0581a..4dc52c7 100644
--- a/tests/unit/test-keyval.c
+++ b/tests/unit/test-keyval.c
@@ -19,7 +19,7 @@
#include "qapi/qobject-input-visitor.h"
#include "test-qapi-visit.h"
#include "qemu/cutils.h"
-#include "qemu/option.h"
+#include "qemu/keyval.h"
static void test_keyval_parse(void)
{
diff --git a/tests/unit/test-qga.c b/tests/unit/test-qga.c
index 5cb140d..e17a288 100644
--- a/tests/unit/test-qga.c
+++ b/tests/unit/test-qga.c
@@ -969,6 +969,13 @@ int main(int argc, char **argv)
TestFixture fix;
int ret;
+#ifdef QEMU_SANITIZE_THREAD
+ {
+ g_test_skip("tsan enabled, https://github.com/google/sanitizers/issues/1116");
+ return 0;
+ }
+#endif
+
setlocale (LC_ALL, "");
g_test_init(&argc, &argv, NULL);
fixture_setup(&fix, NULL, NULL);