From 4f4524ba361ed5312c13a9bda36b6b1b5772983a Mon Sep 17 00:00:00 2001 From: Vinayak Hegde Date: Mon, 9 Nov 2009 21:39:03 -0800 Subject: Regression testcase for bug-28. Signed-off-by: Vijay Bellur --- 28/regr/spec_files/client1.vol | 33 +++++++++++++++++++++++++++++++++ 28/regr/spec_files/server1.vol | 24 ++++++++++++++++++++++++ 28/regr/spec_files/server2.vol | 25 +++++++++++++++++++++++++ 28/regr/testcase | 25 +++++++++++++++++++++++++ 4 files changed, 107 insertions(+) create mode 100644 28/regr/spec_files/client1.vol create mode 100644 28/regr/spec_files/server1.vol create mode 100644 28/regr/spec_files/server2.vol create mode 100755 28/regr/testcase diff --git a/28/regr/spec_files/client1.vol b/28/regr/spec_files/client1.vol new file mode 100644 index 0000000..448789c --- /dev/null +++ b/28/regr/spec_files/client1.vol @@ -0,0 +1,33 @@ +volume remote1 + type protocol/client + option transport-type tcp + option remote-port 9322 + 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 9323 + option remote-host 127.0.0.1 + option remote-subvolume brick +end-volume + +volume replicate + type cluster/replicate + subvolumes remote1 remote2 +end-volume + +volume writebehind + type performance/write-behind + option window-size 1MB + subvolumes replicate +end-volume + +volume cache + type performance/io-cache + option cache-size 512MB + subvolumes writebehind +end-volume + diff --git a/28/regr/spec_files/server1.vol b/28/regr/spec_files/server1.vol new file mode 100644 index 0000000..3be6fbc --- /dev/null +++ b/28/regr/spec_files/server1.vol @@ -0,0 +1,24 @@ +volume posix + type storage/posix + option directory /jbod/regr/28/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 9322 + option auth.addr.brick.allow * + subvolumes brick +end-volume + diff --git a/28/regr/spec_files/server2.vol b/28/regr/spec_files/server2.vol new file mode 100644 index 0000000..690ca71 --- /dev/null +++ b/28/regr/spec_files/server2.vol @@ -0,0 +1,25 @@ +volume posix + type storage/posix + option directory /jbod/regr/28/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 9323 + option auth.addr.brick.allow * + subvolumes brick +end-volume + + diff --git a/28/regr/testcase b/28/regr/testcase new file mode 100755 index 0000000..8a86c88 --- /dev/null +++ b/28/regr/testcase @@ -0,0 +1,25 @@ +#!/bin/bash + +description="# (28) Deleting a backend export directory in an AFR setup can cause a segfault while trying to self heal" +comments="# If the backend export directory is deleted, self heal tries to mkdir and while doing so accesses loc->parent which is NULL and segfaults." + +source ../../init + +start_glusterfs + +sleep 5 + +rmdir $EXPORTDIR/export1 +for var in `seq 1 100`; do + ls $MOUNTDIR/client1 2> tmpfile + if [ $(grep "Transport endpoint is not connected" tmpfile | wc -l) -ne 0 ];then + not_ok $description + comment $comments + break + fi +done +rm tmpfile + +[ $var -eq 100 ] && ok $description + +cleanup_glusterfs -- cgit