Merge pull request #12850 from kyle-cypress/pr/general-filesystem-init

Fix intermittent sync fail in tests-filesystem-general_filesystem
pull/12866/head
Martin Kojtal 2020-04-24 10:11:59 +02:00 committed by GitHub
commit 906999a61c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -44,8 +44,8 @@ static const size_t test_files = 2;
FILE *fd[test_files];
BlockDevice *bd = BlockDevice::get_default_instance();
FileSystem *fs = FileSystem::get_default_instance();
BlockDevice *bd;
FileSystem *fs;
const char *bd_type;
/*----------------help functions------------------*/
@ -76,6 +76,9 @@ static void deinit()
//init the blockdevice and reformat the filesystem
static void bd_init_fs_reformat()
{
bd = BlockDevice::get_default_instance();
fs = FileSystem::get_default_instance();
bd_type = bd->get_type();
init();
}