diff options
Diffstat (limited to 'tests/features')
| -rwxr-xr-x | tests/features/glupy.t | 29 | ||||
| -rwxr-xr-x | tests/features/readdir-ahead.t | 44 |
2 files changed, 73 insertions, 0 deletions
diff --git a/tests/features/glupy.t b/tests/features/glupy.t new file mode 100755 index 000000000..49bf11df5 --- /dev/null +++ b/tests/features/glupy.t @@ -0,0 +1,29 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc + +cleanup; + +TEST mkdir -p $B0/glupytest +cat > $B0/glupytest.vol <<EOF +volume vol-posix + type storage/posix + option directory $B0/glupytest +end-volume + +volume vol-glupy + type features/glupy + option module-name helloworld + subvolumes vol-posix +end-volume +EOF + +TEST glusterfs -f $B0/glupytest.vol $M0; + +TEST touch $M0/filename; +EXPECT "filename" ls $M0 +TEST rm -f $M0/filename; + +TEST umount -l $M0; + +cleanup; diff --git a/tests/features/readdir-ahead.t b/tests/features/readdir-ahead.t new file mode 100755 index 000000000..c7ee637f0 --- /dev/null +++ b/tests/features/readdir-ahead.t @@ -0,0 +1,44 @@ +#!/bin/bash +# +# Test basic readdir-ahead functionality. Verify that readdir-ahead can be +# enabled, create a set of files and run some ls tests. +# +### + +. $(dirname $0)/../include.rc + +cleanup; + +TEST glusterd + +TEST $CLI volume create $V0 $H0:$B0/$V0 +TEST $CLI volume start $V0 + +TEST $CLI volume set $V0 readdir-ahead on + +TEST glusterfs --volfile-id=$V0 --volfile-server=$H0 $M0 + +TEST mkdir $M0/test +for i in $(seq 0 99) +do + touch $M0/test/$i +done + +count=`ls -1 $M0/test | wc -l` +TEST [ $count -eq 100 ] + +count=`ls -1 $M0/test | wc -l` +TEST [ $count -eq 100 ] + +TEST rm -rf $M0/test/* + +count=`ls -1 $M0/test | wc -l` +TEST [ $count -eq 0 ] + +TEST rmdir $M0/test + +TEST umount -l $M0; +TEST $CLI volume stop $V0 +TEST $CLI volume delete $V0 + +cleanup; |
