Update management tests for WO (Write-only) cache mode

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
Adam Rutkowski
2019-05-30 12:50:03 -04:00
parent 82e8c55f4a
commit a6312eb8aa
2 changed files with 26 additions and 16 deletions

View File

@@ -74,8 +74,17 @@ class CacheMode(IntEnum):
WA = 2
PT = 3
WI = 4
WO = 5
DEFAULT = WT
def lazy_write(self):
return self.value in [CacheMode.WB, CacheMode.WO]
def write_insert(self):
return self.value not in [CacheMode.PT, CacheMode.WA, CacheMode.WI]
def read_insert(self):
return self.value not in [CacheMode.PT, CacheMode.WO]
class EvictionPolicy(IntEnum):
LRU = 0