aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest/libqtest-single.h
AgeCommit message (Collapse)AuthorFilesLines
2022-09-27tests/qtest: libqtest: Adapt global_qtest declaration for win32Xuzhou Cheng1-0/+4
Commit dd2107497275 ("tests/libqtest: Use libqtest-single.h in tests that require global_qtest") moved global_qtest to libqtest-single.h, by declaring global_qtest attribute to be common and weak. This trick unfortunately does not work on Windows, and building qtest test cases results in multiple definition errors of the weak symbol global_qtest, as Windows PE does not have the concept of the so-called weak symbol like ELF in the *nix world. However Windows does provide a trick to declare a variable to be a common symbol, via __declspec(selectany) [1]. It does not provide the "strong override weak" effect but we don't need it in our use case anyway. So let's use it for win32. [1] https://docs.microsoft.com/en-us/cpp/cpp/selectany Signed-off-by: Xuzhou Cheng <xuzhou.cheng@windriver.com> Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20220925113032.1949844-33-bmeng.cn@gmail.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2022-05-03tests: move libqtest.h back under qtest/Marc-André Lureau1-1/+1
Since commit a2ce7dbd917 ("meson: convert tests/qtest to meson"), libqtest.h is under libqos/ directory, while libqtest.c is still in qtest/. Move back to its original location to avoid mixing with libqos/. Suggested-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
2022-03-22Replace GCC_FMT_ATTR with G_GNUC_PRINTFMarc-André Lureau1-1/+1
One less qemu-specific macro. It also helps to make some headers/units only depend on glib, and thus moved in standalone projects eventually. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
2020-11-10qtest: Update references to parse_escape() in commentsPeter Maydell1-1/+1
In commit 61030280ca2d67bd in 2018 we renamed the parse_escape() function to parse_interpolation(), but we didn't catch the references to this function in doc comments in libqtest.h. Update them. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20201109162621.18885-1-peter.maydell@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-08-21meson: convert tests/qtest to mesonPaolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-01-12test: Move qtests to a separate directoryThomas Huth1-0/+315
The tests directory itself is pretty overcrowded, and it's hard to see which test belongs to which test subsystem (unit, qtest, ...). Let's move the qtests to a separate folder for more clarity. Message-Id: <20191218103059.11729-6-thuth@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>