Created
May 16, 2014 12:19
-
-
Save akiradeveloper/55077445f0ac45c956c8 to your computer and use it in GitHub Desktop.
本当に動いたら最善手だと思う
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kira@Kamille:~/src/device-mapper-test-suite/lib/dmtest$ git di | |
diff --git a/lib/dmtest/tests/writeboost/stack.rb b/lib/dmtest/tests/writeboost/stack.rb | |
index 56b0d73..1aee66d 100644 | |
--- a/lib/dmtest/tests/writeboost/stack.rb | |
+++ b/lib/dmtest/tests/writeboost/stack.rb | |
@@ -78,6 +78,12 @@ class WriteboostStack | |
@fast_tvm.table('plog_dev') | |
) do |backing_dev, cache_dev, plog_dev| | |
@backing_dev = backing_dev | |
+ class << @backing_dev | |
+ def to_s | |
+ @slow_dev_name | |
+ end | |
+ end | |
+ | |
@cache_dev = cache_dev | |
@plog_dev = plog_dev | |
@@ -158,6 +164,12 @@ class WriteboostStack | |
end | |
end | |
+class WriteboostStackBackingDevice < WriteboostStack | |
+ def table | |
+ Table.new(LinearTarget.new(backing_sz, @slow_dev_name, 0) | |
+ end | |
+end | |
+ | |
class WriteboostStackType0 < WriteboostStack | |
def table | |
essentials = [0, @backing_dev, @cache_dev] | |
diff --git a/lib/dmtest/tests/writeboost/tests.rb b/lib/dmtest/tests/writeboost/tests.rb | |
index 4dab15f..b0d9fe6 100644 | |
--- a/lib/dmtest/tests/writeboost/tests.rb | |
+++ b/lib/dmtest/tests/writeboost/tests.rb | |
@@ -205,6 +205,15 @@ module WriteboostTests | |
end | |
end | |
+class WriteboostTestsBackingDevice < ThinpTestCase | |
+ include WriteboostTests | |
+ | |
+ def setup | |
+ super | |
+ @stack_maker = WriteboostStackBackingDevice | |
+ end | |
+end | |
+ | |
class WriteboostTestsType0 < ThinpTestCase | |
include WriteboostTests |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment