diff options
Diffstat (limited to 'tests/bugs/md-cache')
| -rwxr-xr-x[-rw-r--r--] | tests/bugs/md-cache/bug-1211863.t | 2 | ||||
| -rw-r--r-- | tests/bugs/md-cache/bug-1476324.t | 27 | ||||
| -rwxr-xr-x | tests/bugs/md-cache/bug-1632503.t | 24 | ||||
| -rw-r--r-- | tests/bugs/md-cache/bug-1726205.t | 22 | ||||
| -rwxr-xr-x | tests/bugs/md-cache/setxattr-prepoststat.t | 38 |
5 files changed, 112 insertions, 1 deletions
diff --git a/tests/bugs/md-cache/bug-1211863.t b/tests/bugs/md-cache/bug-1211863.t index ece42fe8d81..ba9bde9fee8 100644..100755 --- a/tests/bugs/md-cache/bug-1211863.t +++ b/tests/bugs/md-cache/bug-1211863.t @@ -16,7 +16,7 @@ TEST $CLI volume start $V0 ## 4. Enable the upcall xlator, and increase the md-cache timeout to max TEST $CLI volume set $V0 performance.md-cache-timeout 600 -TEST $CLI volume set $V0 performance.cache-samba-metadata on +TEST $CLI volume set $V0 performance.xattr-cache-list "user.*" ## 6. Create two gluster mounts TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 diff --git a/tests/bugs/md-cache/bug-1476324.t b/tests/bugs/md-cache/bug-1476324.t new file mode 100644 index 00000000000..c34f412a15e --- /dev/null +++ b/tests/bugs/md-cache/bug-1476324.t @@ -0,0 +1,27 @@ +#!/bin/bash + +. $(dirname $0)/../../include.rc +. $(dirname $0)/../../volume.rc + +cleanup; + +TEST glusterd; + +TEST $CLI volume create $V0 $H0:$B0/${V0}{1,2,3}; + +TEST $CLI volume start $V0 + +TEST $CLI volume set $V0 performance.md-cache-timeout 600 +TEST $CLI volume set $V0 performance.cache-samba-metadata on + +TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 + +TEST touch $M0/file1 + +TEST "setfattr -n user.DOSATTRIB -v 0sAAOW $M0/file1" +TEST "getfattr -n user.DOSATTRIB $M0/file1 -e base64 | grep -q 0sAAOW" + +TEST "setfattr -n user.DOSATTRIB -v 0x00ff $M0/file1" +TEST "getfattr -n user.DOSATTRIB $M0/file1 -e hex | grep -q 0x00ff" + +cleanup; diff --git a/tests/bugs/md-cache/bug-1632503.t b/tests/bugs/md-cache/bug-1632503.t new file mode 100755 index 00000000000..aeb57f65639 --- /dev/null +++ b/tests/bugs/md-cache/bug-1632503.t @@ -0,0 +1,24 @@ +#!/bin/bash + +. $(dirname $0)/../../include.rc +. $(dirname $0)/../../volume.rc + +cleanup; +TESTS_EXPECTED_IN_LOOP=5 + +TEST glusterd; + +TEST $CLI volume create $V0 $H0:$B0/${V0}{1,2,3}; + +TEST $CLI volume start $V0 + +TEST $CLI volume set $V0 performance.md-cache-timeout 600 +TEST $CLI volume set $V0 performance.md-cache-statfs on + +TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 + +for i in $(seq 1 5); do + TEST_IN_LOOP df $M0; +done + +cleanup; diff --git a/tests/bugs/md-cache/bug-1726205.t b/tests/bugs/md-cache/bug-1726205.t new file mode 100644 index 00000000000..795130e9bd8 --- /dev/null +++ b/tests/bugs/md-cache/bug-1726205.t @@ -0,0 +1,22 @@ +#!/bin/bash + +. $(dirname $0)/../../include.rc +. $(dirname $0)/../../volume.rc + +cleanup; + +TEST glusterd; + +TEST $CLI volume create $V0 $H0:$B0/${V0}{1,2,3}; + +TEST $CLI volume start $V0 + +TEST $CLI volume set $V0 group samba + +TEST $GFS --volfile-id=/$V0 --volfile-server=$H0 $M0 + +TEST touch $M0/file +TEST "setfattr -n "user.DosStream.Zone.Identifier:\$DATA" -v '\0' $M0/file" +TEST "getfattr -n "user.DosStream.Zone.Identifier:\$DATA" -e hex $M0/file | grep -q 0x00" + +cleanup; diff --git a/tests/bugs/md-cache/setxattr-prepoststat.t b/tests/bugs/md-cache/setxattr-prepoststat.t new file mode 100755 index 00000000000..01fa768299c --- /dev/null +++ b/tests/bugs/md-cache/setxattr-prepoststat.t @@ -0,0 +1,38 @@ +#!/bin/bash + +. $(dirname $0)/../../include.rc +. $(dirname $0)/../../volume.rc + +cleanup; + +## 1. Start glusterd +TEST glusterd; + +## 2. Lets create volume +TEST $CLI volume create $V0 disperse 6 redundancy 2 $H0:$B0/${V0}{0..5} + +TEST $CLI volume set $V0 group metadata-cache +TEST $CLI volume set $V0 performance.xattr-cache-list "user.*" +TEST $CLI volume start $V0 + +TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 +TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M1 + +TEST touch $M0/file1 +TEST `echo "abakjshdjahskjdhakjhdskjac" >> $M0/file1` +size=`stat -c '%s' $M0/file1` + +## Setxattr from mount-0 +TEST "setfattr -n user.DOSATTRIB -v "abc" $M0/file1" +EXPECT $size stat -c '%s' $M0/file1 + +## Getxattr from mount-1, this should return the correct value +TEST "getfattr -n user.DOSATTRIB $M1/file1 | grep -q abc" + +TEST "setfattr -x user.DOSATTRIB $M1/file1" +EXPECT $size stat -c '%s' $M1/file1 + +EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0 +EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M1 + +cleanup; |
