Skip to content

Commit

Permalink
fix tests. If ReadWrite, the dirty flag will be set when opening the …
Browse files Browse the repository at this point in the history
…volume
  • Loading branch information
Martin Marmsoler committed Jul 7, 2024
1 parent 35e086b commit e7eb7ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/volume_mgr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1790,7 +1790,7 @@ mod tests {
VolumeManager::new_with_limits(DummyBlockDevice::new_not_dirty(), Clock, 0xAA00_0000);

let v = c
.open_raw_volume(VolumeIdx(0), VolumeOpenMode::ReadWrite)
.open_raw_volume(VolumeIdx(0), VolumeOpenMode::ReadOnly)
.unwrap();
let expected_id = RawVolume(SearchId(0xAA00_0000));
assert_eq!(v, expected_id);
Expand All @@ -1799,7 +1799,7 @@ mod tests {
&VolumeInfo {
volume_id: expected_id,
idx: VolumeIdx(0),
open_mode: VolumeOpenMode::ReadWrite,
open_mode: VolumeOpenMode::ReadOnly,
volume_type: VolumeType::Fat(crate::FatVolume {
lba_start: BlockIdx(1),
num_blocks: BlockCount(0x0011_2233),
Expand Down Expand Up @@ -1871,7 +1871,7 @@ mod tests {
);

let v = c
.open_raw_volume(VolumeIdx(0), VolumeOpenMode::ReadWrite)
.open_raw_volume(VolumeIdx(0), VolumeOpenMode::ReadOnly)
.unwrap();
let expected_id = RawVolume(SearchId(0xAA00_0000));
assert_eq!(v, expected_id);
Expand All @@ -1880,7 +1880,7 @@ mod tests {
&VolumeInfo {
volume_id: expected_id,
idx: VolumeIdx(0),
open_mode: VolumeOpenMode::ReadWrite,
open_mode: VolumeOpenMode::ReadOnly,
volume_type: VolumeType::Fat(crate::FatVolume {
lba_start: BlockIdx(1),
num_blocks: BlockCount(0x0011_2233),
Expand Down

0 comments on commit e7eb7ba

Please sign in to comment.