diff options
author | Raghavendra Bhat <raghavendrabhat@gluster.com> | 2010-03-23 00:32:46 -0700 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2010-04-08 11:09:16 +0530 |
commit | 19a683156ddb087f9ea390262a518d49b6bf7bd4 (patch) | |
tree | e81574c16e7ba6b9e9c2dac9918df4290661aca2 /639/regr | |
parent | 72bef58dc6af141e7c1d454dfe2760c27872bc80 (diff) |
Regression testcase for bug 639
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to '639/regr')
-rw-r--r-- | 639/regr/spec_files/client1.vol | 14 | ||||
-rw-r--r-- | 639/regr/spec_files/server1.vol | 38 | ||||
-rwxr-xr-x | 639/regr/testcase | 33 |
3 files changed, 85 insertions, 0 deletions
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 + |