Merge pull request #12330 from rajkan01/bug_fix_storage_sd

Fix FAT filesystem `ferror` greentea test(SD Component)
pull/12354/head
Kevin Bracey 2020-01-31 16:22:53 +02:00 committed by GitHub
commit 370a936147
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -90,7 +90,9 @@ FATFileSystem fs("sd", &sd);
#define FSFAT_FOPEN_TEST_05 fsfat_fopen_test_05
#define FSFAT_FOPEN_TEST_06 fsfat_fopen_test_06
#define FSFAT_FOPEN_TEST_07 fsfat_fopen_test_07
#if !defined(__MICROLIB)
#define FSFAT_FOPEN_TEST_08 fsfat_fopen_test_08
#endif
#define FSFAT_FOPEN_TEST_09 fsfat_fopen_test_09
#define FSFAT_FOPEN_TEST_10 fsfat_fopen_test_10
#define FSFAT_FOPEN_TEST_11 fsfat_fopen_test_11
@ -859,6 +861,7 @@ control_t fsfat_fopen_test_07(const size_t call_count)
*
* @return on success returns CaseNext to continue to next test case, otherwise will assert on errors.
*/
#if !defined(__MICROLIB)
control_t fsfat_fopen_test_08(const size_t call_count)
{
FILE *fp = NULL;
@ -925,7 +928,7 @@ control_t fsfat_fopen_test_08(const size_t call_count)
fclose(fp);
return CaseNext;
}
#endif // !defined(__MICROLIB)
/** @brief test for operation of ftell()
*
@ -1575,7 +1578,10 @@ Case cases[] = {
#endif
Case("FSFAT_FOPEN_TEST_06: fopen() with bad filenames (minimal).", FSFAT_FOPEN_TEST_06),
Case("FSFAT_FOPEN_TEST_07: fopen()/errno handling.", FSFAT_FOPEN_TEST_07),
#if !defined(__MICROLIB)
// Microlib does not support ferror()
Case("FSFAT_FOPEN_TEST_08: ferror()/clearerr()/errno handling.", FSFAT_FOPEN_TEST_08),
#endif
Case("FSFAT_FOPEN_TEST_09: ftell() handling.", FSFAT_FOPEN_TEST_09),
Case("FSFAT_FOPEN_TEST_10: remove() test.", FSFAT_FOPEN_TEST_10),
Case("FSFAT_FOPEN_TEST_11: rename().", FSFAT_FOPEN_TEST_11),