glusterfs/tests/performance/quick-read.t
Anand Avati 4cbb14cf6f quick-read: various fixes
- initialize xdata in qr_lookup even if it was NULL from top. This
  allows qr to do its job even if lookup originated from fuse-resolve.c

- extend test cases to include 1 second delay and retry

- fix bug while checking condition for cached unwind

  qr_readv_cached() unwinds if op_ret > 0. Therefore qr_readv()
  must wind to subvol only if !(op_ret > 0) (i.e, op_ret <= 0).

- qr_readv_cached() is using uninitialized @conf pointer. Thanks
  to Raghavendra Bhat for catching this!

Change-Id: Ifaf2ea2685e452210ef9ba3c2d1f2ab51900650c
BUG: 846240
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/4452
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-01-29 11:56:42 -08:00

56 lines
898 B
Bash

#!/bin/bash
. $(dirname $0)/../include.rc
cleanup;
TEST glusterd
TEST pidof glusterd
TEST $CLI volume info;
TEST $CLI volume create $V0 $H0:$B0/${V0}{1,2};
TEST $CLI volume start $V0;
## Mount FUSE
TEST glusterfs -s $H0 --volfile-id $V0 $M0;
TEST glusterfs -s $H0 --volfile-id $V0 $M1;
D0="hello-this-is-a-test-message0";
F0="test-file0";
function write_to()
{
local file="$1";
local data="$2";
echo "$data" > "$file";
}
TEST write_to "$M0/$F0" "$D0";
EXPECT "$D0" cat $M1/$F0;
EXPECT "$D0" cat $M0/$F0;
EXPECT "$D0" cat $M1/$F0;
EXPECT "$D0" cat $M0/$F0;
sleep 1;
EXPECT "$D0" cat $M1/$F0;
EXPECT "$D0" cat $M0/$F0;
EXPECT "$D0" cat $M1/$F0;
EXPECT "$D0" cat $M0/$F0;
TEST $CLI volume set $V0 performance.quick-read off;
D1="hello-this-is-a-test-message1";
F1="test-file1";
TEST write_to "$M0/$F1" "$D1";
EXPECT "$D1" cat $M0/$F1;
EXPECT "$D0" cat $M1/$F0;
cleanup;