|
@@ -80,7 +80,7 @@ code = '''
|
|
|
// we should be able to read the version using lfs_fs_stat
|
|
// we should be able to read the version using lfs_fs_stat
|
|
|
struct lfs_fsinfo fsinfo;
|
|
struct lfs_fsinfo fsinfo;
|
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
|
- assert(fsinfo.minor_version == LFSP_DISK_VERSION_MINOR);
|
|
|
|
|
|
|
+ assert(fsinfo.disk_version == LFSP_DISK_VERSION);
|
|
|
|
|
|
|
|
lfs_unmount(&lfs) => 0;
|
|
lfs_unmount(&lfs) => 0;
|
|
|
'''
|
|
'''
|
|
@@ -113,7 +113,7 @@ code = '''
|
|
|
// we should be able to read the version using lfs_fs_stat
|
|
// we should be able to read the version using lfs_fs_stat
|
|
|
struct lfs_fsinfo fsinfo;
|
|
struct lfs_fsinfo fsinfo;
|
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
|
- assert(fsinfo.minor_version == LFSP_DISK_VERSION_MINOR);
|
|
|
|
|
|
|
+ assert(fsinfo.disk_version == LFSP_DISK_VERSION);
|
|
|
|
|
|
|
|
// can we list the directories?
|
|
// can we list the directories?
|
|
|
lfs_dir_t dir;
|
|
lfs_dir_t dir;
|
|
@@ -182,7 +182,7 @@ code = '''
|
|
|
// we should be able to read the version using lfs_fs_stat
|
|
// we should be able to read the version using lfs_fs_stat
|
|
|
struct lfs_fsinfo fsinfo;
|
|
struct lfs_fsinfo fsinfo;
|
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
|
- assert(fsinfo.minor_version == LFSP_DISK_VERSION_MINOR);
|
|
|
|
|
|
|
+ assert(fsinfo.disk_version == LFSP_DISK_VERSION);
|
|
|
|
|
|
|
|
// can we list the files?
|
|
// can we list the files?
|
|
|
lfs_dir_t dir;
|
|
lfs_dir_t dir;
|
|
@@ -272,7 +272,7 @@ code = '''
|
|
|
// we should be able to read the version using lfs_fs_stat
|
|
// we should be able to read the version using lfs_fs_stat
|
|
|
struct lfs_fsinfo fsinfo;
|
|
struct lfs_fsinfo fsinfo;
|
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
|
- assert(fsinfo.minor_version == LFSP_DISK_VERSION_MINOR);
|
|
|
|
|
|
|
+ assert(fsinfo.disk_version == LFSP_DISK_VERSION);
|
|
|
|
|
|
|
|
// can we list the directories?
|
|
// can we list the directories?
|
|
|
lfs_dir_t dir;
|
|
lfs_dir_t dir;
|
|
@@ -369,7 +369,7 @@ code = '''
|
|
|
// we should be able to read the version using lfs_fs_stat
|
|
// we should be able to read the version using lfs_fs_stat
|
|
|
struct lfs_fsinfo fsinfo;
|
|
struct lfs_fsinfo fsinfo;
|
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
|
- assert(fsinfo.minor_version == LFSP_DISK_VERSION_MINOR);
|
|
|
|
|
|
|
+ assert(fsinfo.disk_version == LFSP_DISK_VERSION);
|
|
|
|
|
|
|
|
// write another COUNT/2 dirs
|
|
// write another COUNT/2 dirs
|
|
|
for (lfs_size_t i = COUNT/2; i < COUNT; i++) {
|
|
for (lfs_size_t i = COUNT/2; i < COUNT; i++) {
|
|
@@ -451,7 +451,7 @@ code = '''
|
|
|
// we should be able to read the version using lfs_fs_stat
|
|
// we should be able to read the version using lfs_fs_stat
|
|
|
struct lfs_fsinfo fsinfo;
|
|
struct lfs_fsinfo fsinfo;
|
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
|
- assert(fsinfo.minor_version == LFSP_DISK_VERSION_MINOR);
|
|
|
|
|
|
|
+ assert(fsinfo.disk_version == LFSP_DISK_VERSION);
|
|
|
|
|
|
|
|
// write half COUNT files
|
|
// write half COUNT files
|
|
|
prng = 42;
|
|
prng = 42;
|
|
@@ -573,7 +573,7 @@ code = '''
|
|
|
// we should be able to read the version using lfs_fs_stat
|
|
// we should be able to read the version using lfs_fs_stat
|
|
|
struct lfs_fsinfo fsinfo;
|
|
struct lfs_fsinfo fsinfo;
|
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
|
- assert(fsinfo.minor_version == LFSP_DISK_VERSION_MINOR);
|
|
|
|
|
|
|
+ assert(fsinfo.disk_version == LFSP_DISK_VERSION);
|
|
|
|
|
|
|
|
// write half COUNT files
|
|
// write half COUNT files
|
|
|
prng = 42;
|
|
prng = 42;
|
|
@@ -1358,7 +1358,7 @@ code = '''
|
|
|
|
|
|
|
|
struct lfs_fsinfo fsinfo;
|
|
struct lfs_fsinfo fsinfo;
|
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
|
- assert(fsinfo.minor_version == LFS_DISK_VERSION_MINOR-1);
|
|
|
|
|
|
|
+ assert(fsinfo.disk_version == LFS_DISK_VERSION-1);
|
|
|
|
|
|
|
|
lfs_file_open(&lfs, &file, "test", LFS_O_RDONLY) => 0;
|
|
lfs_file_open(&lfs, &file, "test", LFS_O_RDONLY) => 0;
|
|
|
uint8_t buffer[8];
|
|
uint8_t buffer[8];
|
|
@@ -1368,7 +1368,7 @@ code = '''
|
|
|
|
|
|
|
|
// minor version should be unchanged
|
|
// minor version should be unchanged
|
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
|
- assert(fsinfo.minor_version == LFS_DISK_VERSION_MINOR-1);
|
|
|
|
|
|
|
+ assert(fsinfo.disk_version == LFS_DISK_VERSION-1);
|
|
|
|
|
|
|
|
lfs_unmount(&lfs) => 0;
|
|
lfs_unmount(&lfs) => 0;
|
|
|
|
|
|
|
@@ -1376,7 +1376,7 @@ code = '''
|
|
|
lfs_mount(&lfs, cfg) => 0;
|
|
lfs_mount(&lfs, cfg) => 0;
|
|
|
|
|
|
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
|
- assert(fsinfo.minor_version == LFS_DISK_VERSION_MINOR-1);
|
|
|
|
|
|
|
+ assert(fsinfo.disk_version == LFS_DISK_VERSION-1);
|
|
|
|
|
|
|
|
lfs_file_open(&lfs, &file, "test", LFS_O_WRONLY | LFS_O_TRUNC) => 0;
|
|
lfs_file_open(&lfs, &file, "test", LFS_O_WRONLY | LFS_O_TRUNC) => 0;
|
|
|
lfs_file_write(&lfs, &file, "teeeeest", 8) => 8;
|
|
lfs_file_write(&lfs, &file, "teeeeest", 8) => 8;
|
|
@@ -1384,7 +1384,7 @@ code = '''
|
|
|
|
|
|
|
|
// minor version should be changed
|
|
// minor version should be changed
|
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
|
- assert(fsinfo.minor_version == LFS_DISK_VERSION_MINOR);
|
|
|
|
|
|
|
+ assert(fsinfo.disk_version == LFS_DISK_VERSION);
|
|
|
|
|
|
|
|
lfs_unmount(&lfs) => 0;
|
|
lfs_unmount(&lfs) => 0;
|
|
|
|
|
|
|
@@ -1393,7 +1393,7 @@ code = '''
|
|
|
|
|
|
|
|
// minor version should have changed
|
|
// minor version should have changed
|
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
|
- assert(fsinfo.minor_version == LFS_DISK_VERSION_MINOR);
|
|
|
|
|
|
|
+ assert(fsinfo.disk_version == LFS_DISK_VERSION);
|
|
|
|
|
|
|
|
lfs_file_open(&lfs, &file, "test", LFS_O_RDONLY) => 0;
|
|
lfs_file_open(&lfs, &file, "test", LFS_O_RDONLY) => 0;
|
|
|
lfs_file_read(&lfs, &file, buffer, 8) => 8;
|
|
lfs_file_read(&lfs, &file, buffer, 8) => 8;
|
|
@@ -1402,7 +1402,7 @@ code = '''
|
|
|
|
|
|
|
|
// yep, still changed
|
|
// yep, still changed
|
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
lfs_fs_stat(&lfs, &fsinfo) => 0;
|
|
|
- assert(fsinfo.minor_version == LFS_DISK_VERSION_MINOR);
|
|
|
|
|
|
|
+ assert(fsinfo.disk_version == LFS_DISK_VERSION);
|
|
|
|
|
|
|
|
lfs_unmount(&lfs) => 0;
|
|
lfs_unmount(&lfs) => 0;
|
|
|
'''
|
|
'''
|