File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
tests/unittests/tests-spiffs Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -111,30 +111,30 @@ static void tests_spiffs_write2(void)
111111 buf [i ] = 'A' + (i % 30 );
112112 }
113113
114- int mp = vfs_mount (& spiffs_file_system , "/" , & spiffs_desc );
114+ int mp = vfs_mount (& _test_spiffs_mount );
115115 TEST_ASSERT (mp >= 0 );
116116
117117 int res ;
118- for (int j = 0 ; j < 20 ; j ++ ) {
119- int fd = vfs_open ("/test.txt" , O_CREAT | O_RDWR , 0 );
118+ for (int j = 0 ; j < 10 ; j ++ ) {
119+ int fd = vfs_open ("/test-spiffs/test .txt" , O_CREAT | O_RDWR , 0 );
120120 TEST_ASSERT (fd >= 0 );
121121
122- for (int i = 0 ; i < 1000 ; i ++ ) {
122+ for (int i = 0 ; i < 500 ; i ++ ) {
123123 res = vfs_write (fd , buf , sizeof (buf ));
124124 TEST_ASSERT_EQUAL_INT (sizeof (buf ), res );
125125 }
126126
127127 res = vfs_lseek (fd , 0 , SEEK_SET );
128- TEST_ASSERT ( res == 0 );
128+ TEST_ASSERT_EQUAL_INT ( 0 , res );
129129
130130 res = vfs_close (fd );
131- TEST_ASSERT ( res == 0 );
131+ TEST_ASSERT_EQUAL_INT ( 0 , res );
132132
133- res = vfs_unlink ("/test.txt" );
134- TEST_ASSERT ( res == 0 );
133+ res = vfs_unlink ("/test-spiffs/test .txt" );
134+ TEST_ASSERT_EQUAL_INT ( 0 , res );
135135 }
136136
137- res = vfs_umount (mp );
137+ res = vfs_umount (& _test_spiffs_mount );
138138 TEST_ASSERT (res >= 0 );
139139}
140140
You can’t perform that action at this time.
0 commit comments