From b57aa4ab6641d264e83301ad1afac411fe2e9843 Mon Sep 17 00:00:00 2001 From: Vinayak Hegde Date: Wed, 28 Oct 2009 22:20:24 -0700 Subject: Regression testcase for bug 131 Signed-off-by: Vijay Bellur --- 131/regr/spec_files/client1.vol | 33 +++++++++++++++++++++++++++++++ 131/regr/spec_files/server1.vol | 24 ++++++++++++++++++++++ 131/regr/spec_files/server2.vol | 24 ++++++++++++++++++++++ 131/regr/testcase | 44 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 125 insertions(+) create mode 100644 131/regr/spec_files/client1.vol create mode 100644 131/regr/spec_files/server1.vol create mode 100644 131/regr/spec_files/server2.vol create mode 100755 131/regr/testcase diff --git a/131/regr/spec_files/client1.vol b/131/regr/spec_files/client1.vol new file mode 100644 index 0000000..465385e --- /dev/null +++ b/131/regr/spec_files/client1.vol @@ -0,0 +1,33 @@ +volume remote1 + type protocol/client + option transport-type tcp + option remote-port 9335 + option remote-host 127.0.0.1 + option remote-subvolume brick +end-volume + +volume remote2 + type protocol/client + option transport-type tcp + option remote-port 9336 + option remote-host 127.0.0.1 + option remote-subvolume brick +end-volume + +volume distribute + type cluster/distribute + subvolumes remote1 remote2 +end-volume + +volume writebehind + type performance/write-behind + option window-size 1MB + subvolumes distribute +end-volume + +volume cache + type performance/io-cache + option cache-size 512MB + subvolumes writebehind +end-volume + diff --git a/131/regr/spec_files/server1.vol b/131/regr/spec_files/server1.vol new file mode 100644 index 0000000..90ca750 --- /dev/null +++ b/131/regr/spec_files/server1.vol @@ -0,0 +1,24 @@ +volume posix + type storage/posix + option directory /jbod/regr/131/export1 +end-volume + +volume locks + type features/locks + subvolumes posix +end-volume + +volume brick + type performance/io-threads + option thread-count 8 + subvolumes locks +end-volume + +volume server + type protocol/server + option transport-type tcp + option listen-port 9335 + option auth.addr.brick.allow * + subvolumes brick +end-volume + diff --git a/131/regr/spec_files/server2.vol b/131/regr/spec_files/server2.vol new file mode 100644 index 0000000..ae92061 --- /dev/null +++ b/131/regr/spec_files/server2.vol @@ -0,0 +1,24 @@ +volume posix + type storage/posix + option directory /jbod/regr/131/export2 +end-volume + +volume locks + type features/locks + subvolumes posix +end-volume + +volume brick + type performance/io-threads + option thread-count 8 + subvolumes locks +end-volume + +volume server + type protocol/server + option transport-type tcp + option listen-port 9336 + option auth.addr.brick.allow * + subvolumes brick +end-volume + diff --git a/131/regr/testcase b/131/regr/testcase new file mode 100755 index 0000000..1726bbb --- /dev/null +++ b/131/regr/testcase @@ -0,0 +1,44 @@ +#!/bin/bash + +description="# (131) provide a way to get the file location in clustered storage" +comments="#doesn't have a mechanism to get the location of the file" + +version=$1 +bugid=$(pwd | cut -d '/' -f 4) + +exportdir=/jbod/regr/$bugid +mountdir=/mnt/regr/$bugid/$version + +function ok () { + desc=$@ + echo "ok - $desc" +} + +function not_ok () { + desc=$@ + echo "not ok - $desc" +} + + +function comment () { + desc=$@ + echo "$desc" +} + +[ $# -ne 1 ] && { + not_ok "#" + exit +} + + +/opt/qa/regr/setup $version $bugid + +sleep 5 +if [ $(getfattr -d -e hex -m "trusted.glusterfs.location" $mountdir/client1 2> /dev/null | wc -l) -ne 0 ];then + ok $description +else + not_ok $desrciption + comment $comments +fi + +/opt/qa/regr/cleanup $version $bugid -- cgit