diff options
author | Amar Tumballi <amar@gluster.com> | 2010-10-21 04:51:47 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-10-27 04:13:33 -0700 |
commit | e4a43cf475f5a2d908cffdb518028ba74dc9f8b1 (patch) | |
tree | a06bd190126d314c96c71e4783889671bf3ede74 | |
parent | 1bafcd847a2bdaea7aebdb212bbb480eaeee7ede (diff) |
added a test script to test rpc procedures
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
-rwxr-xr-x | extras/rpc-coverage.sh | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/extras/rpc-coverage.sh b/extras/rpc-coverage.sh new file mode 100755 index 00000000000..1f4dfcc9a9d --- /dev/null +++ b/extras/rpc-coverage.sh @@ -0,0 +1,83 @@ +#!/bin/sh + +# This script can be used to provoke 35 fops (if afr is used), +# 28 fops (if afr is not used) (-fstat,-readdirp, and lk,xattrop calls) +# Pending are 7 procedures. +# getspec, fsyncdir, access, fentrylk, fsetxattr, fgetxattr, rchecksum +# TODO: add commands which can generate fops for missing fops + +## Script tests below File Operations over RPC (when afr is used) + +# CREATE +# ENTRYLK +# FINODELK +# FLUSH +# FSTAT +# FSYNC +# FTRUNCATE +# FXATTROP +# GETXATTR +# INODELK +# LINK +# LK +# LOOKUP +# MKDIR +# MKNOD +# OPEN +# OPENDIR +# READ +# READDIR +# READDIRP +# READLINK +# RELEASE +# RELEASEDIR +# REMOVEXATTR +# RENAME +# RMDIR +# SETATTR +# SETXATTR +# STAT +# STATFS +# SYMLINK +# TRUNCATE +# UNLINK +# WRITE +# XATTROP + +set -e + +MOUNTPOINT=$1; + +[ -z $MOUNTPOINT ] && { + MOUNTPOINT="/mnt/glusterfs"; +} +current_dir=$PWD; + +TESTDIR="${MOUNTPOINT}/fop-test-$(date +%Y%m%d%H%M%S)" +mkdir $TESTDIR; +cd $TESTDIR; + +echo "Lets see open working" >> testfile; +echo "Lets see truncate working 012345678" > testfile; +truncate -s 30 testfile; +mkdir testdir; +mkfifo testfifo; +ln testfile testfile-ln; +ln -sf testfile testfile-symlink; +mv testfile-symlink testfile-symlink-mv; +chmod 0777 testfile; +flock -x testfile.lock dd if=/dev/zero of=testfile1 conv=fsync bs=1M count=2 > /dev/null 2>&1; +cat testfile1 > /dev/null; +ls -lR . > /dev/null; +setfattr -n trusted.rpc.coverage -v testing testfile; +getfattr -d -m . testfile > /dev/null; +setfattr -x trusted.rpc.coverage testfile; +df -h testdir > /dev/null; + +rm -f testfifo testfile testfile1 testfile-ln testfile.lock testfile-symlink-mv; +rmdir testdir; + +cd $current_dir; + +rmdir ${TESTDIR} + |