]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: test rados listomapvals with >512 keys 1022/head
authorJosh Durgin <josh.durgin@inktank.com>
Mon, 30 Dec 2013 21:31:18 +0000 (13:31 -0800)
committerJosh Durgin <josh.durgin@inktank.com>
Mon, 30 Dec 2013 21:36:37 +0000 (13:36 -0800)
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
qa/workunits/rados/test_rados_tool.sh [new file with mode: 0755]

diff --git a/qa/workunits/rados/test_rados_tool.sh b/qa/workunits/rados/test_rados_tool.sh
new file mode 100755 (executable)
index 0000000..9b77121
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh -ex
+
+OBJ=test_rados_obj
+POOL=rbd
+
+cleanup() {
+    rados -p $POOL rm $OBJ || true
+}
+
+test_omap() {
+    cleanup
+    for i in $(seq 1 1 600)
+    do
+        rados -p $POOL setomapval $OBJ $i $i
+        rados -p $POOL getomapval $OBJ $i | grep -q "\\: $i\$"
+    done
+    rados -p $POOL listomapvals $OBJ | grep -c value | grep 600
+    cleanup
+}
+
+test_omap
+
+echo OK
+exit 0