]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: snaptest-xattrwb.sh
authorSage Weil <sage@newdream.net>
Tue, 24 Aug 2010 17:46:23 +0000 (10:46 -0700)
committerSage Weil <sage@newdream.net>
Tue, 24 Aug 2010 19:13:53 +0000 (12:13 -0700)
qa/workunits/snaptest-xattrflush.sh [deleted file]
qa/workunits/snaptest-xattrwb.sh [new file with mode: 0755]

diff --git a/qa/workunits/snaptest-xattrflush.sh b/qa/workunits/snaptest-xattrflush.sh
deleted file mode 100755 (executable)
index 4545638..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh -x
-
-set -e
-
-mkdir a
-mkdir a/b
-mkdir a/b/c
-# b now has As but not Ax
-setfattr -n user.foo a/b
-mkdir a/.snap/s
-mkdir a/b/cc
-# b now has been cowed on the server, but we still have dirty xattr caps
-getfattr -n user.foo a/b          # there they are...
-r=`getfattr -n user.foo a/.snap/s/b`  # should be there, too!
-echo $r
-[ -z "$r" ] && echo "didn't find user.foo xattr in snapped version" && false
-
-# ok, clean up
-rmdir a/.snap/s
-rm -r a
-
diff --git a/qa/workunits/snaptest-xattrwb.sh b/qa/workunits/snaptest-xattrwb.sh
new file mode 100755 (executable)
index 0000000..52973cc
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/sh -x
+
+set -e
+
+echo "testing simple xattr wb"
+touch x
+setfattr -n user.foo x
+mkdir .snap/s1
+getfattr -n user.foo .snap/s1/x | grep user.foo
+rm x
+rmdir .snap/s1
+
+echo "testing wb with pre-wb server cow"
+mkdir a
+mkdir a/b
+mkdir a/b/c
+# b now has As but not Ax
+setfattr -n user.foo a/b
+mkdir a/.snap/s
+mkdir a/b/cc
+# b now has been cowed on the server, but we still have dirty xattr caps
+getfattr -n user.foo a/b          # there they are...
+getfattr -n user.foo a/.snap/s/b | grep user.foo  # should be there, too!
+
+# ok, clean up
+rmdir a/.snap/s
+rm -r a
+