From 413bebc04603d87d1889c919fbdd4adf30d4ebb5 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Wed, 24 Aug 2022 17:39:50 +0800 Subject: 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 Reviewed-by: Dr. David Alan Gilbert Message-Id: <20220824094029.1634519-13-bmeng.cn@gmail.com> Signed-off-by: Thomas Huth --- tests/migration/stress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/migration') diff --git a/tests/migration/stress.c b/tests/migration/stress.c index b7240a15c8..88acf8dc25 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; -- cgit v1.2.3-55-g7522