mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
3c239aa77e
commit
413bebc046
5 changed files with 12 additions and 12 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue