[sheepdog] [PATCH v2 09/11] tests: show ledger objects in list

MORITA Kazutaka morita.kazutaka at gmail.com
Tue Jun 18 19:14:29 CEST 2013


From: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>

Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 tests/functional/016.out   |    8 +--
 tests/functional/042.out   |   10 ++--
 tests/functional/044.out   |    8 +--
 tests/functional/057.out   |  140 ++++++++++++++++++++++----------------------
 tests/functional/058.out   |   16 ++---
 tests/functional/063.out   |   28 ++++-----
 tests/functional/064.out   |   38 ++++++------
 tests/functional/common.rc |   10 +++-
 8 files changed, 132 insertions(+), 126 deletions(-)

diff --git a/tests/functional/016.out b/tests/functional/016.out
index 56cf2f8..3377614 100644
--- a/tests/functional/016.out
+++ b/tests/functional/016.out
@@ -3,7 +3,7 @@ using backend plain store
 there should be no vdi
   Name        Id    Size    Used  Shared    Creation time   VDI id  Copies  Tag
 there should be no object
-STORE	DATA	VDI	VMSTATE	ATTR	STALE
-0	0	3	0	0	0
-1	0	3	0	0	0
-2	0	3	0	0	0
+STORE	DATA	VDI	VMSTATE	ATTR	LEDGER	STALE
+0	0	3	0	0	0	0
+1	0	3	0	0	0	0
+2	0	3	0	0	0	0
diff --git a/tests/functional/042.out b/tests/functional/042.out
index 2449d2f..8e0be4a 100644
--- a/tests/functional/042.out
+++ b/tests/functional/042.out
@@ -66,11 +66,11 @@ M   Id   Host:Port         V-Nodes       Zone
 -    1   127.0.0.1:7001      	126          1
 -    2   127.0.0.1:7002      	 2          2
 -    3   127.0.0.1:7003      	 2          3
-STORE	DATA	VDI	VMSTATE	ATTR	STALE
-0	22	4	0	0	0
-1	22	4	0	0	0
-2	0	1	0	0	0
-3	0	1	0	0	0
+STORE	DATA	VDI	VMSTATE	ATTR	LEDGER	STALE
+0	22	4	0	0	0	0
+1	22	4	0	0	0	0
+2	0	1	0	0	0	0
+3	0	1	0	0	0	0
 STORE/0/obj/00fd32fc00000000
 STORE/0/obj/00fd32fc00000001
 STORE/0/obj/00fd32fc00000002
diff --git a/tests/functional/044.out b/tests/functional/044.out
index 7fa9e17..ef06b65 100644
--- a/tests/functional/044.out
+++ b/tests/functional/044.out
@@ -3,7 +3,7 @@ using backend plain store
 there should be no vdi
   Name        Id    Size    Used  Shared    Creation time   VDI id  Copies  Tag
 there should be no object
-STORE	DATA	VDI	VMSTATE	ATTR	STALE
-0	0	36	0	0	0
-1	0	36	0	0	0
-2	0	36	0	0	0
+STORE	DATA	VDI	VMSTATE	ATTR	LEDGER	STALE
+0	0	36	0	0	0	0
+1	0	36	0	0	0	0
+2	0	36	0	0	0	0
diff --git a/tests/functional/057.out b/tests/functional/057.out
index 05d8ba9..46faf8c 100644
--- a/tests/functional/057.out
+++ b/tests/functional/057.out
@@ -1,30 +1,30 @@
 QA output created by 057
 using backend plain store
-STORE	DATA	VDI	VMSTATE	ATTR	STALE
-0/d0	8	0	0	0	0
-0/d1	8	0	0	0	0
-0/d2	9	1	0	0	0
-1/d0	8	0	0	0	0
-1/d1	12	0	0	0	0
-1/d2	5	1	0	0	0
-2/d0	10	1	0	0	0
-2/d1	8	0	0	0	0
-2/d2	7	0	0	0	0
-STORE	DATA	VDI	VMSTATE	ATTR	STALE
-0/d0	1	0	0	0	0
-0/d1	5	0	0	0	0
-0/d2	7	0	0	0	0
-0/d3	5	0	0	0	0
-0/d4	5	1	0	0	0
-1/d0	4	0	0	0	0
-1/d1	4	0	0	0	0
-1/d2	5	1	0	0	0
-2/d0	8	1	0	0	0
-2/d1	5	0	0	0	0
-2/d2	6	0	0	0	0
-3/d0	9	0	0	0	0
-3/d1	2	0	0	0	0
-3/d2	9	0	0	0	0
+STORE	DATA	VDI	VMSTATE	ATTR	LEDGER	STALE
+0/d0	8	0	0	0	0	0
+0/d1	8	0	0	0	0	0
+0/d2	9	1	0	0	0	0
+1/d0	8	0	0	0	0	0
+1/d1	12	0	0	0	0	0
+1/d2	5	1	0	0	0	0
+2/d0	10	1	0	0	0	0
+2/d1	8	0	0	0	0	0
+2/d2	7	0	0	0	0	0
+STORE	DATA	VDI	VMSTATE	ATTR	LEDGER	STALE
+0/d0	1	0	0	0	0	0
+0/d1	5	0	0	0	0	0
+0/d2	7	0	0	0	0	0
+0/d3	5	0	0	0	0	0
+0/d4	5	1	0	0	0	0
+1/d0	4	0	0	0	0	0
+1/d1	4	0	0	0	0	0
+1/d2	5	1	0	0	0	0
+2/d0	8	1	0	0	0	0
+2/d1	5	0	0	0	0	0
+2/d2	6	0	0	0	0	0
+3/d0	9	0	0	0	0	0
+3/d1	2	0	0	0	0	0
+3/d2	9	0	0	0	0	0
 finish check&repair test
 Cluster status: running, auto-recovery enabled
 
@@ -36,36 +36,36 @@ DATE      1 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002]
 Failed to execute request, look for sheep.log for more information
 Nodes In Recovery:
   Id   Host:Port         V-Nodes       Zone
-STORE	DATA	VDI	VMSTATE	ATTR	STALE
-0/d0	1	0	0	0	0
-0/d1	5	0	0	0	0
-0/d2	7	0	0	0	0
-0/d3	5	0	0	0	0
-0/d4	5	1	0	0	0
-1/d0	4	0	0	0	0
-1/d1	4	0	0	0	0
-1/d2	5	1	0	0	0
-2/d0	8	1	0	0	0
-2/d1	5	0	0	0	0
-2/d2	6	0	0	0	0
-3/d0	9	0	0	0	0
-3/d1	2	0	0	0	0
-3/d2	9	0	0	0	0
-STORE	DATA	VDI	VMSTATE	ATTR	STALE
-0/d0	1	0	0	0	0
-0/d1	5	0	0	0	0
-0/d2	7	0	0	0	0
-0/d3	8	0	0	0	0
-0/d4	8	1	0	0	0
-1/d0	4	0	0	0	0
-1/d1	4	0	0	0	0
-1/d2	5	1	0	0	0
-2/d0	8	1	0	0	0
-2/d1	5	0	0	0	0
-2/d2	6	0	0	0	0
-3/d0	9	0	0	0	0
-3/d1	2	0	0	0	0
-3/d2	9	0	0	0	0
+STORE	DATA	VDI	VMSTATE	ATTR	LEDGER	STALE
+0/d0	1	0	0	0	0	0
+0/d1	5	0	0	0	0	0
+0/d2	7	0	0	0	0	0
+0/d3	5	0	0	0	0	0
+0/d4	5	1	0	0	0	0
+1/d0	4	0	0	0	0	0
+1/d1	4	0	0	0	0	0
+1/d2	5	1	0	0	0	0
+2/d0	8	1	0	0	0	0
+2/d1	5	0	0	0	0	0
+2/d2	6	0	0	0	0	0
+3/d0	9	0	0	0	0	0
+3/d1	2	0	0	0	0	0
+3/d2	9	0	0	0	0	0
+STORE	DATA	VDI	VMSTATE	ATTR	LEDGER	STALE
+0/d0	1	0	0	0	0	0
+0/d1	5	0	0	0	0	0
+0/d2	7	0	0	0	0	0
+0/d3	8	0	0	0	0	0
+0/d4	8	1	0	0	0	0
+1/d0	4	0	0	0	0	0
+1/d1	4	0	0	0	0	0
+1/d2	5	1	0	0	0	0
+2/d0	8	1	0	0	0	0
+2/d1	5	0	0	0	0	0
+2/d2	6	0	0	0	0	0
+3/d0	9	0	0	0	0	0
+3/d1	2	0	0	0	0	0
+3/d2	9	0	0	0	0	0
 finish check&repair test
 Cluster status: running, auto-recovery enabled
 
@@ -77,21 +77,21 @@ DATE      1 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002]
 Failed to execute request, look for sheep.log for more information
 Nodes In Recovery:
   Id   Host:Port         V-Nodes       Zone
-STORE	DATA	VDI	VMSTATE	ATTR	STALE
-0/d0	1	0	0	0	0
-0/d1	5	0	0	0	0
-0/d2	7	0	0	0	0
-0/d3	8	0	0	0	0
-0/d4	8	1	0	0	0
-1/d0	4	0	0	0	0
-1/d1	4	0	0	0	0
-1/d2	5	1	0	0	0
-2/d0	8	1	0	0	0
-2/d1	5	0	0	0	0
-2/d2	6	0	0	0	0
-3/d0	9	0	0	0	0
-3/d1	2	0	0	0	0
-3/d2	9	0	0	0	0
+STORE	DATA	VDI	VMSTATE	ATTR	LEDGER	STALE
+0/d0	1	0	0	0	0	0
+0/d1	5	0	0	0	0	0
+0/d2	7	0	0	0	0	0
+0/d3	8	0	0	0	0	0
+0/d4	8	1	0	0	0	0
+1/d0	4	0	0	0	0	0
+1/d1	4	0	0	0	0	0
+1/d2	5	1	0	0	0	0
+2/d0	8	1	0	0	0	0
+2/d1	5	0	0	0	0	0
+2/d2	6	0	0	0	0	0
+3/d0	9	0	0	0	0	0
+3/d1	2	0	0	0	0	0
+3/d2	9	0	0	0	0	0
 Cluster status: running, auto-recovery enabled
 
 Cluster created at DATE
diff --git a/tests/functional/058.out b/tests/functional/058.out
index 758a027..c2fb08a 100644
--- a/tests/functional/058.out
+++ b/tests/functional/058.out
@@ -1,9 +1,9 @@
 QA output created by 058
 using backend plain store
-STORE	DATA	VDI	VMSTATE	ATTR	STALE
-0	25	1	0	0	0
-1	25	1	0	0	0
-2	25	1	0	0	0
+STORE	DATA	VDI	VMSTATE	ATTR	LEDGER	STALE
+0	25	1	0	0	0	0
+1	25	1	0	0	0	0
+2	25	1	0	0	0	0
 discard 104857600/104857600 bytes at offset 0
 100 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 finish check&repair test
@@ -32,7 +32,7 @@ The inode object 0x7c2b25 idx 21 is not allocated
 The inode object 0x7c2b25 idx 22 is not allocated
 The inode object 0x7c2b25 idx 23 is not allocated
 The inode object 0x7c2b25 idx 24 is not allocated
-STORE	DATA	VDI	VMSTATE	ATTR	STALE
-0	0	1	0	0	0
-1	0	1	0	0	0
-2	0	1	0	0	0
+STORE	DATA	VDI	VMSTATE	ATTR	LEDGER	STALE
+0	0	1	0	0	0	0
+1	0	1	0	0	0	0
+2	0	1	0	0	0	0
diff --git a/tests/functional/063.out b/tests/functional/063.out
index 194d523..68bd49b 100644
--- a/tests/functional/063.out
+++ b/tests/functional/063.out
@@ -1,24 +1,24 @@
 QA output created by 063
 using backend plain store
-STORE	DATA	VDI	VMSTATE	ATTR	STALE
-0	19	0	0	0	0
-1	13	1	0	0	0
-2	18	0	0	0	0
-3	0	0	0	0	0
-4	0	0	0	0	0
-5	0	0	0	0	0
+STORE	DATA	VDI	VMSTATE	ATTR	LEDGER	STALE
+0	19	0	0	0	0	0
+1	13	1	0	0	0	0
+2	18	0	0	0	0	0
+3	0	0	0	0	0	0
+4	0	0	0	0	0	0
+5	0	0	0	0	0	0
 M   Id   Host:Port         V-Nodes       Zone
 -    0   127.0.0.1:7000      	64          0
 -    1   127.0.0.1:7001      	64          1
 -    2   127.0.0.1:7002      	64          2
 -    3   127.0.0.1:7003      	 0          3
-STORE	DATA	VDI	VMSTATE	ATTR	STALE
-0	9	0	0	0	0
-1	13	1	0	0	0
-2	9	0	0	0	0
-3	0	0	0	0	0
-4	8	0	0	0	0
-5	11	0	0	0	0
+STORE	DATA	VDI	VMSTATE	ATTR	LEDGER	STALE
+0	9	0	0	0	0	0
+1	13	1	0	0	0	0
+2	9	0	0	0	0	0
+3	0	0	0	0	0	0
+4	8	0	0	0	0	0
+5	11	0	0	0	0	0
 M   Id   Host:Port         V-Nodes       Zone
 -    0   127.0.0.1:7000      	102          0
 -    1   127.0.0.1:7001      	51          1
diff --git a/tests/functional/064.out b/tests/functional/064.out
index 25b2f65..1e1f225 100644
--- a/tests/functional/064.out
+++ b/tests/functional/064.out
@@ -1,35 +1,35 @@
 QA output created by 064
 using backend plain store
-STORE	DATA	VDI	VMSTATE	ATTR	STALE
-0	17	1	0	0	0
-1	12	1	0	0	0
-2	21	0	0	0	0
-3	0	0	0	0	0
+STORE	DATA	VDI	VMSTATE	ATTR	LEDGER	STALE
+0	17	1	0	0	0	0
+1	12	1	0	0	0	0
+2	21	0	0	0	0	0
+3	0	0	0	0	0	0
 M   Id   Host:Port         V-Nodes       Zone
 -    0   127.0.0.1:7000      	48          0
 -    1   127.0.0.1:7001      	48          1
 -    2   127.0.0.1:7002      	96          2
-STORE	DATA	VDI	VMSTATE	ATTR	STALE
-0	8	1	0	0	0
-1	12	1	0	0	0
-2	21	0	0	0	0
-3	9	0	0	0	0
+STORE	DATA	VDI	VMSTATE	ATTR	LEDGER	STALE
+0	8	1	0	0	0	0
+1	12	1	0	0	0	0
+2	21	0	0	0	0	0
+3	9	0	0	0	0	0
 M   Id   Host:Port         V-Nodes       Zone
 -    0   127.0.0.1:7000      	48          0
 -    1   127.0.0.1:7001      	48          1
 -    2   127.0.0.1:7002      	96          2
-STORE	DATA	VDI	VMSTATE	ATTR	STALE
-0	11	1	0	0	0
-1	25	1	0	0	0
-3	14	0	0	0	0
+STORE	DATA	VDI	VMSTATE	ATTR	LEDGER	STALE
+0	11	1	0	0	0	0
+1	25	1	0	0	0	0
+3	14	0	0	0	0	0
 M   Id   Host:Port         V-Nodes       Zone
 -    0   127.0.0.1:7000      	85          0
 -    1   127.0.0.1:7001      	43          1
-STORE	DATA	VDI	VMSTATE	ATTR	STALE
-0	9	1	0	0	0
-1	10	1	0	0	0
-2	19	0	0	0	0
-3	12	0	0	0	0
+STORE	DATA	VDI	VMSTATE	ATTR	LEDGER	STALE
+0	9	1	0	0	0	0
+1	10	1	0	0	0	0
+2	19	0	0	0	0	0
+3	12	0	0	0	0	0
 M   Id   Host:Port         V-Nodes       Zone
 -    0   127.0.0.1:7000      	77          0
 -    1   127.0.0.1:7001      	38          1
diff --git a/tests/functional/common.rc b/tests/functional/common.rc
index 88f4c24..eb3685b 100644
--- a/tests/functional/common.rc
+++ b/tests/functional/common.rc
@@ -403,6 +403,11 @@ _list_attr_obj()
     find $STORE/$1 | grep -E /2[0-9a-f]\{15\} | grep -v .stale
 }
 
+_list_ledger_obj()
+{
+    find $STORE/$1 | grep -E /1[0-9a-f]\{15\} | grep -v .stale
+}
+
 _list_stale_obj()
 {
     find $STORE/$1 | grep -E /[0-9a-f]\{16\} | grep .stale
@@ -412,14 +417,15 @@ _stat_store()
 {
     local pattern=$1
     local idx
-    echo -e "STORE\tDATA\tVDI\tVMSTATE\tATTR\tSTALE"
+    echo -e "STORE\tDATA\tVDI\tVMSTATE\tATTR\tLEDGER\tSTALE"
     for idx in `ls -d $STORE/$pattern | sed s#$STORE/##g`; do
 	local data_obj=$(_list_data_obj $idx | wc -l)
 	local vdi_obj=$(_list_vdi_obj $idx | wc -l)
 	local vmstate_obj=$(_list_vmstate_obj $idx | wc -l)
 	local attr_obj=$(_list_attr_obj $idx | wc -l)
+	local ledger_obj=$(_list_ledger_obj $idx | wc -l)
 	local stale_obj=$(_list_stale_obj $idx | wc -l)
-	echo -e "$idx\t$data_obj\t$vdi_obj\t$vmstate_obj\t$attr_obj\t$stale_obj"
+	echo -e "$idx\t$data_obj\t$vdi_obj\t$vmstate_obj\t$attr_obj\t$ledger_obj\t$stale_obj"
     done
 }
 
-- 
1.7.9.5




More information about the sheepdog mailing list