|
|
|
@@ -41,7 +41,7 @@ def test_neg_change_cache_mode(pyocf_ctx, cm, cls):
|
|
|
|
|
:param cls: cache line size we start with
|
|
|
|
|
"""
|
|
|
|
|
# Start cache device
|
|
|
|
|
cache_device = Volume(S.from_MiB(30))
|
|
|
|
|
cache_device = Volume(S.from_MiB(50))
|
|
|
|
|
cache = Cache.start_on_device(cache_device, cache_mode=cm, cache_line_size=cls)
|
|
|
|
|
|
|
|
|
|
# Change cache mode to invalid one and check if failed
|
|
|
|
@@ -65,7 +65,7 @@ def test_neg_set_cleaning_policy(pyocf_ctx, cm, cls):
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
|
# Start cache device
|
|
|
|
|
cache_device = Volume(S.from_MiB(30))
|
|
|
|
|
cache_device = Volume(S.from_MiB(50))
|
|
|
|
|
cache = Cache.start_on_device(cache_device, cache_mode=cm, cache_line_size=cls)
|
|
|
|
|
|
|
|
|
|
# Set cleaning policy to invalid one and check if failed
|
|
|
|
@@ -90,7 +90,7 @@ def test_neg_attach_cls(pyocf_ctx, cm, cls):
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
|
# Start cache device
|
|
|
|
|
cache_device = Volume(S.from_MiB(30))
|
|
|
|
|
cache_device = Volume(S.from_MiB(50))
|
|
|
|
|
cache = Cache(owner=cache_device.owner, cache_mode=cm, cache_line_size=cls)
|
|
|
|
|
cache.start_cache()
|
|
|
|
|
|
|
|
|
@@ -115,7 +115,7 @@ def test_neg_cache_set_seq_cut_off_policy(pyocf_ctx, cm, cls):
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
|
# Start cache device
|
|
|
|
|
cache_device = Volume(S.from_MiB(30))
|
|
|
|
|
cache_device = Volume(S.from_MiB(50))
|
|
|
|
|
cache = Cache.start_on_device(cache_device, cache_mode=cm, cache_line_size=cls)
|
|
|
|
|
|
|
|
|
|
# Create 2 core devices
|
|
|
|
@@ -149,7 +149,7 @@ def test_neg_cache_set_seq_cut_off_promotion(pyocf_ctx, cm, cls):
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
|
# Start cache device
|
|
|
|
|
cache_device = Volume(S.from_MiB(30))
|
|
|
|
|
cache_device = Volume(S.from_MiB(50))
|
|
|
|
|
cache = Cache.start_on_device(cache_device, cache_mode=cm, cache_line_size=cls)
|
|
|
|
|
|
|
|
|
|
# Create 2 core devices
|
|
|
|
@@ -185,7 +185,7 @@ def test_neg_core_set_seq_cut_off_promotion(pyocf_ctx, cm, cls):
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
|
# Start cache device
|
|
|
|
|
cache_device = Volume(S.from_MiB(30))
|
|
|
|
|
cache_device = Volume(S.from_MiB(50))
|
|
|
|
|
cache = Cache.start_on_device(cache_device, cache_mode=cm, cache_line_size=cls)
|
|
|
|
|
|
|
|
|
|
# Create core device
|
|
|
|
@@ -218,7 +218,7 @@ def test_neg_cache_set_seq_cut_off_threshold(pyocf_ctx, cm, cls):
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
|
# Start cache device
|
|
|
|
|
cache_device = Volume(S.from_MiB(30))
|
|
|
|
|
cache_device = Volume(S.from_MiB(50))
|
|
|
|
|
cache = Cache.start_on_device(cache_device, cache_mode=cm, cache_line_size=cls)
|
|
|
|
|
|
|
|
|
|
# Create 2 core devices
|
|
|
|
@@ -254,7 +254,7 @@ def test_neg_core_set_seq_cut_off_threshold(pyocf_ctx, cm, cls):
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
|
# Start cache device
|
|
|
|
|
cache_device = Volume(S.from_MiB(30))
|
|
|
|
|
cache_device = Volume(S.from_MiB(50))
|
|
|
|
|
cache = Cache.start_on_device(cache_device, cache_mode=cm, cache_line_size=cls)
|
|
|
|
|
|
|
|
|
|
# Create core device
|
|
|
|
@@ -287,7 +287,7 @@ def test_neg_core_set_seq_cut_off_policy(pyocf_ctx, cm, cls):
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
|
# Start cache device
|
|
|
|
|
cache_device = Volume(S.from_MiB(30))
|
|
|
|
|
cache_device = Volume(S.from_MiB(50))
|
|
|
|
|
cache = Cache.start_on_device(cache_device, cache_mode=cm, cache_line_size=cls)
|
|
|
|
|
|
|
|
|
|
# Create core device
|
|
|
|
@@ -318,7 +318,7 @@ def test_neg_set_alru_param(pyocf_ctx, cm, cls):
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
|
# Start cache device
|
|
|
|
|
cache_device = Volume(S.from_MiB(30))
|
|
|
|
|
cache_device = Volume(S.from_MiB(50))
|
|
|
|
|
cache = Cache.start_on_device(cache_device, cache_mode=cm, cache_line_size=cls)
|
|
|
|
|
|
|
|
|
|
# Change invalid alru param and check if failed
|
|
|
|
@@ -355,7 +355,7 @@ def test_neg_set_alru_param_value(pyocf_ctx, cm, cls, param):
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
|
# Start cache device
|
|
|
|
|
cache_device = Volume(S.from_MiB(30))
|
|
|
|
|
cache_device = Volume(S.from_MiB(50))
|
|
|
|
|
cache = Cache.start_on_device(cache_device, cache_mode=cm, cache_line_size=cls)
|
|
|
|
|
|
|
|
|
|
cache.set_cleaning_policy(CleaningPolicy.ALRU)
|
|
|
|
@@ -382,7 +382,7 @@ def test_neg_set_acp_param(pyocf_ctx, cm, cls):
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
|
# Start cache device
|
|
|
|
|
cache_device = Volume(S.from_MiB(30))
|
|
|
|
|
cache_device = Volume(S.from_MiB(50))
|
|
|
|
|
cache = Cache.start_on_device(cache_device, cache_mode=cm, cache_line_size=cls)
|
|
|
|
|
|
|
|
|
|
# Change invalid acp param and check if failed
|
|
|
|
@@ -415,7 +415,7 @@ def test_neg_set_acp_param_value(pyocf_ctx, cm, cls, param):
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
|
# Start cache device
|
|
|
|
|
cache_device = Volume(S.from_MiB(30))
|
|
|
|
|
cache_device = Volume(S.from_MiB(50))
|
|
|
|
|
cache = Cache.start_on_device(cache_device, cache_mode=cm, cache_line_size=cls)
|
|
|
|
|
|
|
|
|
|
cache.set_cleaning_policy(CleaningPolicy.ACP)
|
|
|
|
@@ -442,7 +442,7 @@ def test_neg_set_promotion_policy(pyocf_ctx, cm, cls):
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
|
# Start cache device
|
|
|
|
|
cache_device = Volume(S.from_MiB(30))
|
|
|
|
|
cache_device = Volume(S.from_MiB(50))
|
|
|
|
|
cache = Cache.start_on_device(cache_device, cache_mode=cm, cache_line_size=cls)
|
|
|
|
|
|
|
|
|
|
# Change to invalid promotion policy and check if failed
|
|
|
|
@@ -466,7 +466,7 @@ def test_neg_set_nhit_promotion_policy_param(pyocf_ctx, cm, cls):
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
|
# Start cache device
|
|
|
|
|
cache_device = Volume(S.from_MiB(30))
|
|
|
|
|
cache_device = Volume(S.from_MiB(50))
|
|
|
|
|
cache = Cache.start_on_device(
|
|
|
|
|
cache_device,
|
|
|
|
|
cache_mode=cm,
|
|
|
|
@@ -496,7 +496,7 @@ def test_neg_set_nhit_promotion_policy_param_trigger(pyocf_ctx, cm, cls):
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
|
# Start cache device
|
|
|
|
|
cache_device = Volume(S.from_MiB(30))
|
|
|
|
|
cache_device = Volume(S.from_MiB(50))
|
|
|
|
|
cache = Cache.start_on_device(
|
|
|
|
|
cache_device,
|
|
|
|
|
cache_mode=cm,
|
|
|
|
@@ -528,7 +528,7 @@ def test_neg_set_nhit_promotion_policy_param_threshold(pyocf_ctx, cm, cls):
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
|
# Start cache device
|
|
|
|
|
cache_device = Volume(S.from_MiB(30))
|
|
|
|
|
cache_device = Volume(S.from_MiB(50))
|
|
|
|
|
cache = Cache.start_on_device(
|
|
|
|
|
cache_device,
|
|
|
|
|
cache_mode=cm,
|
|
|
|
@@ -559,7 +559,7 @@ def test_neg_set_ioclass_max_size(pyocf_ctx, cm, cls):
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
|
# Start cache device
|
|
|
|
|
cache_device = Volume(S.from_MiB(30))
|
|
|
|
|
cache_device = Volume(S.from_MiB(50))
|
|
|
|
|
cache = Cache.start_on_device(cache_device, cache_mode=cm, cache_line_size=cls)
|
|
|
|
|
|
|
|
|
|
# Set invalid max size and check if failed
|
|
|
|
@@ -589,7 +589,7 @@ def test_neg_set_ioclass_priority(pyocf_ctx, cm, cls):
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
|
# Start cache device
|
|
|
|
|
cache_device = Volume(S.from_MiB(30))
|
|
|
|
|
cache_device = Volume(S.from_MiB(50))
|
|
|
|
|
cache = Cache.start_on_device(cache_device, cache_mode=cm, cache_line_size=cls)
|
|
|
|
|
|
|
|
|
|
# Set invalid priority and check if failed
|
|
|
|
@@ -619,7 +619,7 @@ def test_neg_set_ioclass_cache_mode(pyocf_ctx, cm, cls):
|
|
|
|
|
:return:
|
|
|
|
|
"""
|
|
|
|
|
# Start cache device
|
|
|
|
|
cache_device = Volume(S.from_MiB(30))
|
|
|
|
|
cache_device = Volume(S.from_MiB(50))
|
|
|
|
|
cache = Cache.start_on_device(cache_device, cache_mode=cm, cache_line_size=cls)
|
|
|
|
|
|
|
|
|
|
# Set invalid cache mode and check if failed
|
|
|
|
@@ -644,7 +644,7 @@ def test_neg_set_ioclass_name(pyocf_ctx):
|
|
|
|
|
invalid_chars += [",", '"']
|
|
|
|
|
|
|
|
|
|
# Start cache device
|
|
|
|
|
cache_device = Volume(S.from_MiB(30))
|
|
|
|
|
cache_device = Volume(S.from_MiB(50))
|
|
|
|
|
cache = Cache.start_on_device(
|
|
|
|
|
cache_device, cache_mode=CacheMode.WT, cache_line_size=CacheLineSize.LINE_4KiB
|
|
|
|
|
)
|
|
|
|
@@ -669,7 +669,7 @@ def test_neg_set_ioclass_name_len(pyocf_ctx):
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
# Start cache device
|
|
|
|
|
cache_device = Volume(S.from_MiB(30))
|
|
|
|
|
cache_device = Volume(S.from_MiB(50))
|
|
|
|
|
cache = Cache.start_on_device(
|
|
|
|
|
cache_device, cache_mode=CacheMode.WT, cache_line_size=CacheLineSize.LINE_4KiB
|
|
|
|
|
)
|
|
|
|
|