Tweaked gstate after mid changes

- Fixed LFSR_GRM_DSIZE upper bound, since our mids now fit in a single
  leb128.

- Renamed pgrm -> ggrm. To be honest I don't have a great name for this
  variable.
This commit is contained in:
Christopher Haster
2023-09-14 13:19:32 -05:00
parent d0c5bf1210
commit 518e9634e7
3 changed files with 91 additions and 94 deletions
+5 -5
View File
@@ -5159,7 +5159,7 @@ static int lfsr_mdir_commit(lfs_t *lfs, lfsr_mdir_t *mdir,
// xor with our current gstate to find our initial gdelta
int err = lfsr_grm_xor(lfs, lfs->dgrm,
LFSR_DATA(lfs->pgrm, LFSR_GRM_DSIZE));
LFSR_DATA(lfs->ggrm, LFSR_GRM_DSIZE));
if (err) {
return err;
}
@@ -5587,7 +5587,7 @@ static int lfsr_mdir_commit(lfs_t *lfs, lfsr_mdir_t *mdir,
lfs->grm = *(lfsr_grm_t*)attrs[i].data.u.b.buffer;
// keep track of the exact encoding on-disk
lfsr_data_fromgrm(lfs, &lfs->grm, lfs->pgrm);
lfsr_data_fromgrm(lfs, &lfs->grm, lfs->ggrm);
}
}
@@ -6536,10 +6536,10 @@ static int lfsr_mountinited(lfs_t *lfs) {
// TODO should the consumegdelta above take gstate/gdelta as a parameter?
// keep track of the current gstate on disk
memcpy(lfs->pgrm, lfs->dgrm, LFSR_GRM_DSIZE);
memcpy(lfs->ggrm, lfs->dgrm, LFSR_GRM_DSIZE);
// decode grm so we can report any removed files as missing
int err = lfsr_data_readgrm(lfs, &LFSR_DATA(lfs->pgrm, LFSR_GRM_DSIZE),
int err = lfsr_data_readgrm(lfs, &LFSR_DATA(lfs->ggrm, LFSR_GRM_DSIZE),
&lfs->grm);
if (err) {
return err;
@@ -10906,7 +10906,7 @@ static int lfs_init(lfs_t *lfs, const struct lfs_config *cfg) {
lfs->opened[LFS_TYPE_DIR] = NULL;
// zero gstate
memset(lfs->pgrm, 0, LFSR_GRM_DSIZE);
memset(lfs->ggrm, 0, LFSR_GRM_DSIZE);
memset(lfs->dgrm, 0, LFSR_GRM_DSIZE);
return 0;
+4 -7
View File
@@ -405,12 +405,9 @@ typedef struct lfsr_openedmdir {
} lfsr_openedmdir_t;
// space for:
// - type - 1 leb128 - 1 byte (worst case)
// - mid0 - 1 leb128 - 5 bytes (worst case)
// - rid0 - 1 leb128 - 5 bytes (worst case)
// - mid1 - 1 leb128 - 5 bytes (worst case)
// - rid1 - 1 leb128 - 5 bytes (worst case)
#define LFSR_GRM_DSIZE (1+5+5+5+5)
// - type - 1 leb128 - 1 byte (worst case)
// - 2 mids - 2 leb128 - 10 bytes (worst case)
#define LFSR_GRM_DSIZE (1+5+5)
typedef struct lfsr_grm {
lfsr_smid_t rms[2];
@@ -514,7 +511,7 @@ typedef struct lfs {
// begin lfsr things
lfsr_grm_t grm;
uint8_t pgrm[LFSR_GRM_DSIZE];
uint8_t ggrm[LFSR_GRM_DSIZE];
uint8_t dgrm[LFSR_GRM_DSIZE];
uint8_t mbits;
+82 -82
View File
@@ -24,7 +24,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdir worked with stat
@@ -74,7 +74,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// and check that this didn't interfere with our original directory
@@ -120,7 +120,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// and check that this didn't interfere with our original directory
@@ -170,7 +170,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// and check that this didn't interfere with our original directory
@@ -242,7 +242,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdir worked with stat
@@ -297,7 +297,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// and check that this didn't interfere with our original directory
@@ -351,7 +351,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// and check that this didn't interfere with our original directory
@@ -443,7 +443,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdir worked
@@ -573,7 +573,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdirs worked
@@ -656,7 +656,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
}
@@ -719,7 +719,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
}
@@ -788,7 +788,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
}
}
@@ -895,7 +895,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
}
}
@@ -1023,7 +1023,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
}
@@ -1125,7 +1125,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// test that our directories match our simulation
@@ -1272,7 +1272,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdirs worked
@@ -1433,7 +1433,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdirs worked
@@ -1596,7 +1596,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdirs worked
@@ -1759,7 +1759,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdirs worked
@@ -1837,7 +1837,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdir worked with stat
@@ -1869,7 +1869,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that remove worked with stat
@@ -1920,7 +1920,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// and check that this didn't interfere with our original directory
@@ -1975,7 +1975,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// and check that this didn't interfere with our original directory
@@ -2063,7 +2063,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdir worked with stat
@@ -2093,7 +2093,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that remove worked with stat
@@ -2144,7 +2144,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// and check that this didn't interfere with our original directory
@@ -2236,7 +2236,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdir worked
@@ -2277,7 +2277,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our remove worked
@@ -2313,7 +2313,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our remove worked
@@ -2344,7 +2344,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our remove worked
@@ -2459,7 +2459,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdirs worked
@@ -2520,7 +2520,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our remove worked
@@ -2576,7 +2576,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our remove worked
@@ -2617,7 +2617,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our remove worked
@@ -2670,7 +2670,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdir worked
@@ -2713,7 +2713,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
}
@@ -2785,7 +2785,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdir worked
@@ -2828,7 +2828,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
}
@@ -2907,7 +2907,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdirs worked
@@ -2984,7 +2984,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
}
@@ -2999,7 +2999,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
}
@@ -3118,7 +3118,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdirs worked
@@ -3227,7 +3227,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
}
@@ -3242,7 +3242,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
}
@@ -3257,7 +3257,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
}
@@ -3403,7 +3403,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdir worked
@@ -3451,7 +3451,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
}
@@ -3571,7 +3571,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// test that our directories match our simulation
@@ -3640,7 +3640,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdir worked with stat
@@ -3672,7 +3672,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that rename worked with stat
@@ -3722,7 +3722,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdir worked with stat
@@ -3757,7 +3757,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that rename worked with stat
@@ -3805,7 +3805,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdir worked with stat
@@ -3837,7 +3837,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that rename worked with stat
@@ -3896,7 +3896,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// and check that this didn't interfere with our original directory
@@ -3952,7 +3952,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// and check that this didn't interfere with our original directory
@@ -4061,7 +4061,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdir worked with stat
@@ -4091,7 +4091,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that rename worked with stat
@@ -4145,7 +4145,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// and check that this didn't interfere with our original directory
@@ -4274,7 +4274,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdir worked
@@ -4315,7 +4315,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our rename worked
@@ -4356,7 +4356,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our rename worked
@@ -4397,7 +4397,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our rename worked
@@ -4620,7 +4620,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdirs worked
@@ -4681,7 +4681,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our rename worked
@@ -4742,7 +4742,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our rename worked
@@ -4803,7 +4803,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our rename worked
@@ -4892,7 +4892,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdir worked
@@ -4939,7 +4939,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
}
@@ -5007,7 +5007,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdir worked
@@ -5054,7 +5054,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
}
@@ -5129,7 +5129,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdirs worked
@@ -5207,7 +5207,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
for (lfs_size_t j = 0; j < N; j++) {
@@ -5226,7 +5226,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
}
}
@@ -5341,7 +5341,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdirs worked
@@ -5450,7 +5450,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
for (lfs_size_t j = 0; j < N; j++) {
@@ -5469,7 +5469,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
for (lfs_size_t k = 0; k < N; k++) {
@@ -5490,7 +5490,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
}
}
@@ -5630,7 +5630,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// check that our mkdir worked
@@ -5686,7 +5686,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// update old_name's path
@@ -5833,7 +5833,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// test that our directories match our simulation
@@ -5988,7 +5988,7 @@ code = '''
lfsr_unmount(&lfs) => 0;
lfsr_mount(&lfs, CFG) => 0;
// grm should be zero here
assert(lfs.pgrm[0] == 0);
assert(lfs.ggrm[0] == 0);
}
// test that our directories match our simulation