From a91e10f8e4149777a8f219032b1a94a02c192ea9 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Wed, 24 Feb 2021 18:05:54 +0800 Subject: [PATCH] testing/fstest: Add O_TRUNC flag in fstest_wrfile MIRTOS-177 to avoid the interference from the lasting run Signed-off-by: Xiang Xiao --- testing/fstest/fstest_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/fstest/fstest_main.c b/testing/fstest/fstest_main.c index d3a1e83ea..9e7987a28 100644 --- a/testing/fstest/fstest_main.c +++ b/testing/fstest/fstest_main.c @@ -411,7 +411,7 @@ static inline int fstest_wrfile(FAR struct fstest_filedesc_s *file) fstest_randname(file); fstest_randfile(file); - fd = open(file->name, O_WRONLY | O_CREAT | O_EXCL, 0666); + fd = open(file->name, O_WRONLY | O_CREAT | O_EXCL | O_TRUNC, 0666); if (fd < 0) { /* If it failed because there is no space on the device, then don't