diff options
author | Amar Tumballi <amarts@redhat.com> | 2018-06-29 23:40:53 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-08-22 15:47:38 +0000 |
commit | a2112bd6fa2e4851cd982a691165f76f0c90d977 (patch) | |
tree | 51dd84fbaaa75a3a94167337dc8de920a2111f57 /tests | |
parent | bfba1d3602b20895956767c668e86390f16cb782 (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')
-rwxr-xr-x | tests/basic/playground/template-xlator-sanity.t | 27 | ||||
-rwxr-xr-x | tests/basic/rpc-coverage.sh | 13 |
2 files changed, 37 insertions, 3 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; diff --git a/tests/basic/rpc-coverage.sh b/tests/basic/rpc-coverage.sh index 11d3be66dcb..b7aaef0bcb5 100755 --- a/tests/basic/rpc-coverage.sh +++ b/tests/basic/rpc-coverage.sh @@ -437,7 +437,9 @@ function run_tests() test_chmod; test_chown; test_utimes; - test_locks; + if $run_lock_tests; then + test_locks; + fi test_readdir; test_setxattr; test_listxattr; @@ -453,14 +455,19 @@ function _init() DIR=$(pwd); } - +run_lock_tests=1 function parse_cmdline() { if [ "x$1" == "x" ] ; then - echo "Usage: $0 /path/mount" + echo "Usage: $0 [--no-locks] /path/mount" exit 1 fi + if [ "$1" == "--no-locks" ] ; then + run_lock_tests=0 + shift + fi + DIR=$1; if [ ! -d "$DIR" ] ; then |