From 19a683156ddb087f9ea390262a518d49b6bf7bd4 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Tue, 23 Mar 2010 00:32:46 -0700 Subject: Regression testcase for bug 639 Signed-off-by: Vijay Bellur --- 639/regr/spec_files/client1.vol | 14 ++++++++++++++ 639/regr/spec_files/server1.vol | 38 ++++++++++++++++++++++++++++++++++++++ 639/regr/testcase | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 639/regr/spec_files/client1.vol create mode 100644 639/regr/spec_files/server1.vol create mode 100755 639/regr/testcase (limited to '639') diff --git a/639/regr/spec_files/client1.vol b/639/regr/spec_files/client1.vol new file mode 100644 index 0000000..72d8df7 --- /dev/null +++ b/639/regr/spec_files/client1.vol @@ -0,0 +1,14 @@ +volume client1 + type protocol/client + option transport-type tcp + option remote-host 127.0.0.1 + option transport.socket.remote-port 7777 + option remote-subvolume brick1 +end-volume + +volume writebehind + type performance/write-behind + option cache-size 4MB + option flush-behind on + subvolumes client1 +end-volume \ No newline at end of file diff --git a/639/regr/spec_files/server1.vol b/639/regr/spec_files/server1.vol new file mode 100644 index 0000000..ccaa925 --- /dev/null +++ b/639/regr/spec_files/server1.vol @@ -0,0 +1,38 @@ +volume posix1 + type storage/posix + option directory /home/raghu/work/git.regression/639/regr/export/export1 +end-volume + + +volume locks + type features/posix-locks + subvolumes posix1 +end-volume + +volume iot + type performance/io-threads + option thread-count 8 + subvolumes locks +end-volume + +volume writebehind + type performance/write-behind + option cache-size 4MB + subvolumes iot +end-volume + +volume brick1 + type performance/read-ahead + option page-count 4 + option force-atime-update off + subvolumes writebehind +end-volume + +volume server + type protocol/server + option transport-type tcp + option transport.socket.listen-port 7777 + subvolumes brick1 + option auth.addr.brick1.allow * +end-volume + diff --git a/639/regr/testcase b/639/regr/testcase new file mode 100755 index 0000000..7af0c6f --- /dev/null +++ b/639/regr/testcase @@ -0,0 +1,33 @@ +#!/bin/bash + +description="# Write-behind at serverside causes data corruption" +comments="# Write-behind translator loaded in server volfile causes data corruption" + + +source ../../init + +start_glusterfs + +sleep 2 + +cd $MOUNTDIR/client1 +dd if=/dev/urandom of=$MOUNTDIR/random bs=1M count=10 2>1 1>/dev/null +dd if=$MOUNTDIR/random of=$MOUNTDIR/client1/random bs=1M count=10 2>1 1>/dev/null +gfs_md5sum=$(md5sum $MOUNTDIR/client1/random | cut -f 1 -d" ") +other_md5sum=$(md5sum $MOUNTDIR/random | cut -f 1 -d" ") + +if [ $gfs_md5sum == $other_md5sum ] ; then + ok $description + comment $comments +else + not_ok $description + comment $comments +fi + +rm $MOUNTDIR/random >/dev/null +rm $MOUNTDIR/client1/random >/dev/null + +cd - >/dev/null + +cleanup_glusterfs + -- cgit