testing/fstest: Don't reuse the deleted name

to simplify the root cause analysis

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2021-11-09 01:54:04 +08:00 committed by Gustavo Henrique Nihei
parent 1187351144
commit 7c4ddaeede

View File

@ -200,7 +200,7 @@ static bool fstest_checkexist(FAR struct fstest_filedesc_s *file)
for (i = 0; i < CONFIG_TESTING_FSTEST_MAXOPEN; i++)
{
if (!g_files[i].deleted && &g_files[i] != file &&
if (&g_files[i] != file && g_files[i].name &&
strcmp(g_files[i].name, file->name) == 0)
{
ret = true;