aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2024-03-31 16:42:58 +0100
committerPeter Maydell <peter.maydell@linaro.org>2024-03-31 16:42:59 +0100
commitfa967115cbee0ec89f53b2d96bd3e6e16365eb1e (patch)
tree075057be78b2b5d97c5360647887d2306961835b /tests
parentc919bc65c54433420eecf8dc918ed6bcfeab40bf (diff)
parentdcae75fba1084823d0fc87caa13f0ba6f32155f3 (diff)
Merge tag 'pull-9p-20240329' of https://github.com/cschoenebeck/qemu into staging
Changes for 9p tests only: * Fix 9p tests for riscv. * Re-enable 9p 'local' tests for running in CI pipelines. # -----BEGIN PGP SIGNATURE----- # # iQJLBAABCgA1FiEEltjREM96+AhPiFkBNMK1h2Wkc5UFAmYGf9oXHHFlbXVfb3Nz # QGNydWRlYnl0ZS5jb20ACgkQNMK1h2Wkc5Xy6RAApJ+UCRRf5fbZ6DRKm8ZVVwXa # YVtwDYy1fEbljN2kud1WeRiw+pTOa/8W4h/QzgR+q0SN3RKhGvGvmKf+X1N+/Z0H # YpOG1fDmgnyh20VNIwZi2WSoX0pS8DQrlWgGCmsWdOjLmflq4qUJSQ/p/Z2Z0OFJ # V90w5CtPpFq1X8LgPMKHXe2U0orBlPU3zguw6LPYFPp4LY3p3me9TkufcnuIW3Xg # Mxp+ZYvkKER9vfhgH0Yz0MecQGkfIEKdP3KNQCgwvynPTbDzXCEj0iaASD5+8dP4 # u8AEoBQccONRm9+iQn1Fk1nhTDTjmhdrD0yfbwqJzbOy4k0W/wFpOR2l+J1QqvFX # 3LdmalzJ6ZHaT5Kl7QDJj6lBNfVZ9QUS7WKiVnDM5ifoqlfzTgFEr6RXdqSgc/oy # ax+zF0PhTDckg7/kRCXh+60/kMXG1L2PmlbCOccuk9Z0P9T0GrFhWlvs9Kq+URPh # r/amaV7+p2XmK/v4sF+IcgZaXwD8ppLFjFVie1/Ol/6kUakzO5Co0WRgCDDW8HkK # aJz9OBmJnS8Fzf0WwwKMzoNKwrmjiaF9DXIlMYc2carZ4OJNS5ZVpG6Lh/MD8keg # otzoQpUhfyvu5BZH2sSMrVOJy1VtjP89pcF++zQ5T2RgODCVb0WOgPPS3q1NQowm # hoxlKvVGZfK/gKOd1+E= # =xodL # -----END PGP SIGNATURE----- # gpg: Signature made Fri 29 Mar 2024 08:46:18 GMT # gpg: using RSA key 96D8D110CF7AF8084F88590134C2B58765A47395 # gpg: issuer "qemu_oss@crudebyte.com" # gpg: Good signature from "Christian Schoenebeck <qemu_oss@crudebyte.com>" [unknown] # 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: ECAB 1A45 4014 1413 BA38 4926 30DB 47C3 A012 D5F4 # Subkey fingerprint: 96D8 D110 CF7A F808 4F88 5901 34C2 B587 65A4 7395 * tag 'pull-9p-20240329' of https://github.com/cschoenebeck/qemu: qtest/virtio-9p-test.c: remove g_test_slow() gate qtest/virtio-9p-test.c: create/remove temp dirs after each test Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/qtest/virtio-9p-test.c32
1 files changed, 11 insertions, 21 deletions
diff --git a/tests/qtest/virtio-9p-test.c b/tests/qtest/virtio-9p-test.c
index 65e69491e5..3c8cd235cf 100644
--- a/tests/qtest/virtio-9p-test.c
+++ b/tests/qtest/virtio-9p-test.c
@@ -693,9 +693,20 @@ static void fs_unlinkat_hardlink(void *obj, void *data,
g_assert(stat(real_file, &st_real) == 0);
}
+static void cleanup_9p_local_driver(void *data)
+{
+ /* remove previously created test dir when test is completed */
+ virtio_9p_remove_local_test_dir();
+}
+
static void *assign_9p_local_driver(GString *cmd_line, void *arg)
{
+ /* make sure test dir for the 'local' tests exists */
+ virtio_9p_create_local_test_dir();
+
virtio_9p_assign_local_driver(cmd_line, "security_model=mapped-xattr");
+
+ g_test_queue_destroy(cleanup_9p_local_driver, NULL);
return arg;
}
@@ -735,15 +746,6 @@ static void register_virtio_9p_test(void)
/* 9pfs test cases using the 'local' filesystem driver */
-
- /*
- * XXX: Until we are sure that these tests can run everywhere,
- * keep them as "slow" so that they aren't run with "make check".
- */
- if (!g_test_slow()) {
- return;
- }
-
opts.before = assign_9p_local_driver;
qos_add_test("local/config", "virtio-9p", pci_config, &opts);
qos_add_test("local/create_dir", "virtio-9p", fs_create_dir, &opts);
@@ -759,15 +761,3 @@ static void register_virtio_9p_test(void)
}
libqos_init(register_virtio_9p_test);
-
-static void __attribute__((constructor)) construct_9p_test(void)
-{
- /* make sure test dir for the 'local' tests exists */
- virtio_9p_create_local_test_dir();
-}
-
-static void __attribute__((destructor)) destruct_9p_test(void)
-{
- /* remove previously created test dir when test suite completed */
- virtio_9p_remove_local_test_dir();
-}