aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest/migration-test.c
diff options
context:
space:
mode:
authorBin Meng <bin.meng@windriver.com>2022-08-24 17:39:50 +0800
committerThomas Huth <thuth@redhat.com>2022-08-25 15:24:09 +0200
commit413bebc04603d87d1889c919fbdd4adf30d4ebb5 (patch)
tree909f642556b0d633694a2698fbe7bda3fcb6dec1 /tests/qtest/migration-test.c
parent3c239aa77ed19521992a0b14594907adc0d79a6c (diff)
downloadqemu-413bebc04603d87d1889c919fbdd4adf30d4ebb5.zip
qemu-413bebc04603d87d1889c919fbdd4adf30d4ebb5.tar.gz
qemu-413bebc04603d87d1889c919fbdd4adf30d4ebb5.tar.bz2
tests: Use g_mkdir_with_parents()
Use the same g_mkdir_with_parents() call to create a directory on all platforms. Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20220824094029.1634519-13-bmeng.cn@gmail.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/qtest/migration-test.c')
-rw-r--r--tests/qtest/migration-test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index 60f3d4e..21bd76b 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -761,14 +761,14 @@ test_migrate_tls_psk_start_common(QTestState *from,
data->workdir = g_strdup_printf("%s/tlscredspsk0", tmpfs);
data->pskfile = g_strdup_printf("%s/%s", data->workdir,
QCRYPTO_TLS_CREDS_PSKFILE);
- mkdir(data->workdir, 0700);
+ g_mkdir_with_parents(data->workdir, 0700);
test_tls_psk_init(data->pskfile);
if (mismatch) {
data->workdiralt = g_strdup_printf("%s/tlscredspskalt0", tmpfs);
data->pskfilealt = g_strdup_printf("%s/%s", data->workdiralt,
QCRYPTO_TLS_CREDS_PSKFILE);
- mkdir(data->workdiralt, 0700);
+ g_mkdir_with_parents(data->workdiralt, 0700);
test_tls_psk_init_alt(data->pskfilealt);
}
@@ -873,7 +873,7 @@ test_migrate_tls_x509_start_common(QTestState *from,
data->clientcert = g_strdup_printf("%s/client-cert.pem", data->workdir);
}
- mkdir(data->workdir, 0700);
+ g_mkdir_with_parents(data->workdir, 0700);
test_tls_init(data->keyfile);
g_assert(link(data->keyfile, data->serverkey) == 0);