X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fkern%2Fkfile_test.c;h=fc760cb5373a67865100c2b857e898f9489919ed;hb=12ea7ad4a8eb2460e638367d256125c4535bd9b8;hp=21fc3d3bf73255aa8f4537c97dc67a50f5387b6b;hpb=96a5722d5be21779a7f58e16995de9a39ab91bad;p=bertos.git diff --git a/bertos/kern/kfile_test.c b/bertos/kern/kfile_test.c index 21fc3d3b..fc760cb5 100644 --- a/bertos/kern/kfile_test.c +++ b/bertos/kern/kfile_test.c @@ -58,8 +58,11 @@ MOD_DEFINE(kfile_test); +// Size of the "virtual" disk that +// we want to test. #define BUF_TEST_LEN 3209 +// Buffer for test typedef uint8_t fake_t; fake_t test_buf[BUF_TEST_LEN]; fake_t test_buf_save[BUF_TEST_LEN]; @@ -67,6 +70,9 @@ fake_t test_disk[BUF_TEST_LEN]; KFile fd; +/* + * Beckend to use kfile structure on pc. + */ static int fake_close(KFile *fd) { (void)fd; @@ -125,6 +131,9 @@ void fake_kfileInit(void) } +/* + * Help function to init disk and the buffers. + */ static void init_testBuf(void) { #include @@ -352,6 +361,7 @@ int kfile_testSetup(void) MOD_INIT(kfile_test); LOG_INFO("Mod init..ok\n"); + // Init our backend and the buffers fake_kfileInit(); init_testBuf(); @@ -373,3 +383,4 @@ int kfile_testTearDown(void) } TEST_MAIN(kfile); +