[sheepdog] [PATCH] test: add a test description to output

Liu Yuan namei.unix at gmail.com
Thu Aug 23 13:27:38 CEST 2012


From: Liu Yuan <tailai.ly at taobao.com>

With this patch, the new look is:

tailai.ly at taobao:~/sheepdog/tests$ sudo ./check 27
PLATFORM      -- Linux/x86_64 taobao 2.6.35-32-generic

027 Last Used:7s. Test sheep recovery logic breadth-first algorithm
Passed all 1 tests

Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
 tests/001   |    2 ++
 tests/002   |    2 ++
 tests/003   |    2 ++
 tests/004   |    2 ++
 tests/005   |    2 ++
 tests/006   |    2 ++
 tests/007   |    2 ++
 tests/008   |    2 ++
 tests/009   |    2 ++
 tests/011   |    2 ++
 tests/012   |    2 ++
 tests/013   |    2 ++
 tests/014   |    2 ++
 tests/015   |    2 ++
 tests/016   |    2 ++
 tests/017   |    2 ++
 tests/027   |    2 +-
 tests/check |    5 +++--
 18 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/tests/001 b/tests/001
index 438c6e7..bfc8d40 100755
--- a/tests/001
+++ b/tests/001
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+# Test master node killing and master transfer
+
 seq=`basename $0`
 echo "QA output created by $seq"
 
diff --git a/tests/002 b/tests/002
index 6a97bb8..2ea92b9 100755
--- a/tests/002
+++ b/tests/002
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+# Test master transfer for crashed cluster
+
 seq=`basename $0`
 echo "QA output created by $seq"
 
diff --git a/tests/003 b/tests/003
index 5e0116f..13f550f 100755
--- a/tests/003
+++ b/tests/003
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+# Test master transfer for crashed cluster
+
 seq=`basename $0`
 echo "QA output created by $seq"
 
diff --git a/tests/004 b/tests/004
index f5d13f4..1cb99fc 100755
--- a/tests/004
+++ b/tests/004
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+# Test membership, add one node after killing existing one node
+
 seq=`basename $0`
 echo "QA output created by $seq"
 
diff --git a/tests/005 b/tests/005
index bc925e4..3e178a7 100755
--- a/tests/005
+++ b/tests/005
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+# Test cluster membership by killing and adding nodes
+
 seq=`basename $0`
 echo "QA output created by $seq"
 
diff --git a/tests/006 b/tests/006
index d1170f6..95909de 100755
--- a/tests/006
+++ b/tests/006
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+# Test launching sheeps simultaneously
+
 seq=`basename $0`
 echo "QA output created by $seq"
 
diff --git a/tests/007 b/tests/007
index 4ac722f..72ca3ce 100755
--- a/tests/007
+++ b/tests/007
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+# Test cluster rejecting node with wrong epoch
+
 seq=`basename $0`
 echo "QA output created by $seq"
 
diff --git a/tests/008 b/tests/008
index 25407be..92af96a 100755
--- a/tests/008
+++ b/tests/008
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+# Test doing heavy IO while confchg change
+
 seq=`basename $0`
 echo "QA output created by $seq"
 
diff --git a/tests/009 b/tests/009
index 29c86be..ad3d06a 100755
--- a/tests/009
+++ b/tests/009
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+# Test data integrity after joining a new node
+
 seq=`basename $0`
 echo "QA output created by $seq"
 
diff --git a/tests/011 b/tests/011
index a4950a7..781c4fb 100755
--- a/tests/011
+++ b/tests/011
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+# Test sheep booting on existing images mounted as loop device
+
 seq=`basename $0`
 echo "QA output created by $seq"
 
diff --git a/tests/012 b/tests/012
index 48be894..2a46335 100755
--- a/tests/012
+++ b/tests/012
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+# Test gateway only functionality
+
 seq=`basename $0`
 echo "QA output created by $seq"
 
diff --git a/tests/013 b/tests/013
index d98c158..9a1a21b 100755
--- a/tests/013
+++ b/tests/013
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+# Test snapshot functionality
+
 seq=`basename $0`
 echo "QA output created by $seq"
 
diff --git a/tests/014 b/tests/014
index 05d64fa..442fc7e 100755
--- a/tests/014
+++ b/tests/014
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+# Test vdi setattr/getattr
+
 seq=`basename $0`
 echo "QA output created by $seq"
 
diff --git a/tests/015 b/tests/015
index 3fdebb2..71b0b0c 100755
--- a/tests/015
+++ b/tests/015
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+# Test vdi setattr/getattr failure mode
+
 seq=`basename $0`
 echo "QA output created by $seq"
 
diff --git a/tests/016 b/tests/016
index 72678aa..ddf9c6b 100755
--- a/tests/016
+++ b/tests/016
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+# Test vdi clone functionality
+
 seq=`basename $0`
 echo "QA output created by $seq"
 
diff --git a/tests/017 b/tests/017
index 4d111c1..7cb7775 100755
--- a/tests/017
+++ b/tests/017
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+# Test vdi tree functionality
+
 seq=`basename $0`
 echo "QA output created by $seq"
 
diff --git a/tests/027 b/tests/027
index 5af8dab..a014fd0 100755
--- a/tests/027
+++ b/tests/027
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# Test sheep recovery logic
+# Test sheep recovery logic breadth-first algorithm
 
 seq=`basename $0`
 echo "QA output created by $seq"
diff --git a/tests/check b/tests/check
index 62746e4..8dfeb0c 100755
--- a/tests/check
+++ b/tests/check
@@ -417,10 +417,11 @@ do
 	#
 	rm -f $seq.out.bad
 	lasttime=`sed -n -e "/^$seq /s/.* //p" <check.time`
+	description=`sed -n '3s/# Test/Test/p' $seq`
 	if [ "X$lasttime" != X ]; then
-		echo -n " ${lasttime}s ..."
+		echo -n " Last Used:${lasttime}s. $description"
 	else
-		echo -n "	"	# prettier output with timestamps.
+		echo -n " $description"	# prettier output with timestamps.
 	fi
 	rm -f core $seq.notrun
 
-- 
1.7.10.2




More information about the sheepdog mailing list