diff options
author | Bin Meng <bin.meng@windriver.com> | 2022-08-24 17:39:50 +0800 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2022-08-25 15:24:09 +0200 |
commit | 413bebc04603d87d1889c919fbdd4adf30d4ebb5 (patch) | |
tree | 909f642556b0d633694a2698fbe7bda3fcb6dec1 /tests/migration | |
parent | 3c239aa77ed19521992a0b14594907adc0d79a6c (diff) | |
download | qemu-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/migration')
-rw-r--r-- | tests/migration/stress.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/migration/stress.c b/tests/migration/stress.c index b7240a1..88acf8d 100644 --- a/tests/migration/stress.c +++ b/tests/migration/stress.c @@ -232,7 +232,7 @@ static void stress(unsigned long long ramsizeGB, int ncpus) static int mount_misc(const char *fstype, const char *dir) { - if (mkdir(dir, 0755) < 0 && errno != EEXIST) { + if (g_mkdir_with_parents(dir, 0755) < 0 && errno != EEXIST) { fprintf(stderr, "%s (%05d): ERROR: cannot create %s: %s\n", argv0, gettid(), dir, strerror(errno)); return -1; |