<div dir="ltr">Reviewed-by: Robin Dong <<a href="mailto:sanbai@taobao.com">sanbai@taobao.com</a>></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/12/10 Liu Yuan <span dir="ltr"><<a href="mailto:namei.unix@gmail.com" target="_blank">namei.unix@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Signed-off-by: Liu Yuan <<a href="mailto:namei.unix@gmail.com">namei.unix@gmail.com</a>><br>
---<br>
tests/functional/080 | 37 +++++++++++++++++++++++++++++++++++++<br>
tests/functional/080.out | 14 ++++++++++++++<br>
tests/functional/group | 1 +<br>
3 files changed, 52 insertions(+)<br>
create mode 100755 tests/functional/080<br>
create mode 100644 tests/functional/080.out<br>
<br>
diff --git a/tests/functional/080 b/tests/functional/080<br>
new file mode 100755<br>
index 0000000..cf416b5<br>
--- /dev/null<br>
+++ b/tests/functional/080<br>
@@ -0,0 +1,37 @@<br>
+#!/bin/bash<br>
+<br>
+# Test sheep strict mode for write<br>
+<br>
+. ./common<br>
+<br>
+for i in `seq 0 5`; do<br>
+ _start_sheep $i<br>
+done<br>
+<br>
+_wait_for_sheep 6<br>
+<br>
+_cluster_format -c 4:2 -t<br>
+<br>
+$DOG vdi create test 10M<br>
+$DOG node kill 3<br>
+echo hello | $DOG vdi write test 0 512<br>
+_vdi_list<br>
+<br>
+# Should fail<br>
+$DOG vdi create test1 10M<br>
+echo world | $DOG vdi write test 0 512<br>
+<br>
+$DOG cluster shutdown<br>
+sleep 1<br>
+<br>
+for i in 0 1 2 4 5; do<br>
+ _start_sheep $i<br>
+done<br>
+<br>
+_wait_for_sheep 5<br>
+<br>
+# Should fail<br>
+$DOG vdi create test1 10M<br>
+echo world | $DOG vdi write test 0 512<br>
+<br>
+_vdi_list<br>
diff --git a/tests/functional/080.out b/tests/functional/080.out<br>
new file mode 100644<br>
index 0000000..01c116b<br>
--- /dev/null<br>
+++ b/tests/functional/080.out<br>
@@ -0,0 +1,14 @@<br>
+QA output created by 080<br>
+using backend plain store<br>
+Failed to write object 7c2b2500000000: IO has halted as there are not enough living nodes<br>
+Failed to write VDI<br>
+ Name Id Size Used Shared Creation time VDI id Copies Tag<br>
+ test 0 10 MB 0.0 MB 0.0 MB DATE 7c2b25 6<br>
+Failed to create VDI test1: Failed to write to requested VDI<br>
+Failed to write object 7c2b2500000000: IO has halted as there are not enough living nodes<br>
+Failed to write VDI<br>
+Failed to create VDI test1: Failed to write to requested VDI<br>
+Failed to write object 7c2b2500000000: IO has halted as there are not enough living nodes<br>
+Failed to write VDI<br>
+ Name Id Size Used Shared Creation time VDI id Copies Tag<br>
+ test 0 10 MB 0.0 MB 0.0 MB DATE 7c2b25 6<br>
diff --git a/tests/functional/group b/tests/functional/group<br>
index 4de1f73..e999b6f 100644<br>
--- a/tests/functional/group<br>
+++ b/tests/functional/group<br>
@@ -94,3 +94,4 @@<br>
077 auto quick vdi<br>
078 auto quick vdi md<br>
079 auto quick vdi md<br>
+080 auto quick vdi md<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.9.5<br>
<br>
--<br>
sheepdog mailing list<br>
<a href="mailto:sheepdog@lists.wpkg.org">sheepdog@lists.wpkg.org</a><br>
<a href="http://lists.wpkg.org/mailman/listinfo/sheepdog" target="_blank">http://lists.wpkg.org/mailman/listinfo/sheepdog</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>--<br>Best Regard<br>Robin Dong
</div>