summaryrefslogtreecommitdiffstats
path: root/tests/basic/playground
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2018-06-29 23:40:53 +0530
committerAmar Tumballi <amarts@redhat.com>2018-08-22 15:47:38 +0000
commita2112bd6fa2e4851cd982a691165f76f0c90d977 (patch)
tree51dd84fbaaa75a3a94167337dc8de920a2111f57 /tests/basic/playground
parentbfba1d3602b20895956767c668e86390f16cb782 (diff)
xlators/playground: fix the template files with latest requirements
* Make use of xlator_api * Make use of gf_msg() * Make use of mem-pool * Add a sample metrics dump function * Provide an dummy option, which can be initialized, and reconfigured * Add a test case to make sure template xlator is built and used with default fops * Make a change in rpc-coverage to run without lock tests. Updates: bz#1193929 Change-Id: I377dd67b656f440f9bc7c0098e21c0c1934e9096 Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'tests/basic/playground')
-rwxr-xr-xtests/basic/playground/template-xlator-sanity.t27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/basic/playground/template-xlator-sanity.t b/tests/basic/playground/template-xlator-sanity.t
new file mode 100755
index 00000000000..c3090dae5a8
--- /dev/null
+++ b/tests/basic/playground/template-xlator-sanity.t
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../volume.rc
+
+cleanup;
+
+TEST mkdir -p $B0/single-brick
+cat > $B0/template.vol <<EOF
+volume posix
+ type storage/posix
+ option directory $B0/single-brick
+end-volume
+
+volume template
+ type playground/template
+ subvolumes posix
+end-volume
+EOF
+
+TEST glusterfs -f $B0/template.vol $M0
+
+TEST $(dirname $0)/../rpc-coverage.sh --no-locks $M0
+
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
+
+cleanup;