于 2013年12月13日 16:17, Jean-Pierre André 写道:
> Hi,
>
> Thanks for the proposed patches.
>
> What are the situations where glusterfs should not behave
> like ext3/ext4 on Linux ?
The posix is a standard, GNU/Linux follow this standard, so the 
filesystem in linux should have same behavior. The glusterfs nearly no 
difference with other fs, but there are still to things I need to do:

1. you said in previous email:

"+test_check $ctime1 -le $ctime2
I do not agree with this change : the Posix specification
is unclear, and some implementers have chosen to update
ctime whereas other implementers have kept it unchanged.

But the test is also aimed at checking for no regression
after some change, and if the behavior for ctime changes
for some implementation, it has to be detected. This is
unfortunate, but the test has to accept both strategies
and identify unwanted changes. "

So there are many "unclear" place, which often use "case ...in ... esac" 
structure in the test cases. I need to make the glusterfs's "unclear" to 
"clear".

2. The pjd-fstest which I used is the newest version, so it's a test 
version, when many errors happend in glusterfs testing, I need to 
checked every error place, and judge it's test case bug or glusterfs 
bug. That's difficult, because there are nearly 70 errors when I test in 
glusterfs first time. And less than 10 errors in ext and xfs.
Now most of the errors I have reported bugs to redhat, few errors I have 
changed the code like below patch.

So the most work I need to do is ensure the pjd-fstest can run stably in 
RHEL's Ext, xfs and glusterfs. At the same time, found the reason of the 
errors and properly reported them to you or my company.

I just change a little code, I will explain the patch at below:

>
> I am planning an update, this will be at best in January.
That's a good news, but I think it maybe a test version when you public 
it first time.

>
> Jean-Pierre
>
>
> Zorro Lang wrote:
>> test on redhat's glusterfs, ext3 and xfs, and make sure that:
>> - ext3 and xfs all pasted for now,
>> - glusterfs has some bugs has been reported.
>> - The test cases can be used normally for linux ext, xfs and glusterfs.
>> ---
>>
>> Hi,
>>
>> I am Zorro Lang, from redhat fs-qe.
>>
>> This commit contain modification like below:
>> 1. modify tests/conf and README files, add glusterfs description to them
>> 2. add S_ISUID, S_ISGID and S_ISVTX test in chmod/00.t
>> 3. change the ctime judgement after chown(-1, -1) in chown/00.t
>> 4. change the ctime judgement after setfacl in xacl/00.t
>> 5. modify the problem that the test dir will not be remove after test 
>> on a fs not support acl.
>>
>> Because many errors happened when I tested in glusterfs, so I must 
>> check those
>> errors, to judge which is a glusterfs bug and which is a test case 
>> bug. Now I have use the
>> posix test to run in linux:ext3, linux:xfs and linux:glusterfs, ext3 
>> and xfs all passed.
>> In glusterfs the posix test can run normally, and glusterfs bugs have 
>> been
>> reported by me. Maybe there are still some bugs for test on 
>> glusterfs, I will try to find and
>> fix them in the future.
>>
>> Hope to submit the "glusterfs test" to the upstream, for many people 
>> can review, use
>> and test it, and report more bugs.
>>
>> Thank you,
>> Best Regards,
>> Zorro Lang
>>
>>
>> README | 4 ++--
>> tests/chmod/00.t | 60 
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++----
>> tests/chown/00.t | 28 ++++++++++++++++++--------
>> tests/conf | 2 +-
>> tests/xacl/00.t | 13 ++++++++++--
>> tests/xacl/01.t | 4 +++-
>> tests/xacl/02.t | 4 +++-
>> tests/xacl/03.t | 4 +++-
>> tests/xacl/04.t | 4 +++-
>> tests/xacl/05.t | 4 +++-
>> tests/xacl/06.t | 4 +++-
>> 11 files changed, 108 insertions(+), 23 deletions(-)
>>
>> diff --git a/README b/README
>> index d549e34..445a18a 100644
>> --- a/README
>> +++ b/README
>> @@ -5,7 +5,7 @@ Few notes on how to use fstest in short steps:
>> # cd fstest
>> # vi tests/conf
>> Change 'fs' to file system type you want to test. These can be:
>> - UFS, ZFS, ext3, ntfs-3g and xfs.
>> + UFS, ZFS, ext3, ntfs-3g, xfs, glusterfs.
>> # vi Makefile
>> You may need to manually tweak few things by editing CFLAGS lines
>> at the top of the file.
>> @@ -18,7 +18,7 @@ Few notes on how to use fstest in short steps:
>> That's all. Enjoy.
>>
>> Currently supported operating systems: FreeBSD, Solaris, Linux.
>> -Currently supported file system types: UFS, ZFS, ext3, ntfs-3g, xfs.
>> +Currently supported file system types: UFS, ZFS, ext3, ntfs-3g, xfs, 
>> glusterfs.
>>
>> Author:
>> Pawel Jakub Dawidek <[email protected]>
I just add glusterfs to README. But I think I should add more 
information for glusterfs test.

>> diff --git a/tests/chmod/00.t b/tests/chmod/00.t
>> index 74dc552..700fbb7 100755
>> --- a/tests/chmod/00.t
>> +++ b/tests/chmod/00.t
>> @@ -7,9 +7,9 @@ dir=`dirname $0`
>> . ${dir}/../misc.sh
>>
>> if supported lchmod; then
>> - echo "1..77"
>> + echo "1..125"
>> else
>> - echo "1..58"
>> + echo "1..106"
>> fi
>>
>> n0=`namegen`
>> @@ -19,7 +19,7 @@ n2=`namegen`
>> expect 0 mkdir ${n2} 0755
>> cdir=`pwd`
>> cd ${n2}
>> -
>> +# 2
>> expect 0 create ${n0} 0644
>> expect 0644 stat ${n0} mode
>> expect 0 chmod ${n0} 0111
>> @@ -31,7 +31,7 @@ expect 0755 stat ${n0} mode
>> expect 0 chmod ${n0} 0753
>> expect 0753 stat ${n0} mode
>> expect 0 rmdir ${n0}
>> -
>> +# 12
>> expect 0 mkfifo ${n0} 0644
>> expect 0644 stat ${n0} mode
>> expect 0 chmod ${n0} 0310
>> @@ -61,6 +61,58 @@ if supported lchmod; then
>> expect 0 unlink ${n1}
>> fi
>>
>> +# test S_ISUID, S_ISGID and S_ISVTX and permission bits combinations
>> +expect 0 create ${n0} 0644
>> +expect 0 chmod ${n0} 01111
>> +expect 01111 stat ${n0} mode
>> +expect 0 chmod ${n0} 02222
>> +expect 02222 stat ${n0} mode
>> +expect 0 chmod ${n0} 03333
>> +expect 03333 stat ${n0} mode
>> +expect 0 chmod ${n0} 04444
>> +expect 04444 stat ${n0} mode
>> +expect 0 chmod ${n0} 05555
>> +expect 05555 stat ${n0} mode
>> +expect 0 chmod ${n0} 06666
>> +expect 06666 stat ${n0} mode
>> +expect 0 chmod ${n0} 07777
>> +expect 07777 stat ${n0} mode
>> +expect 0 unlink ${n0}
>> +
>> +expect 0 mkdir ${n0} 0755
>> +expect 0 chmod ${n0} 01111
>> +expect 01111 stat ${n0} mode
>> +expect 0 chmod ${n0} 02222
>> +expect 02222 stat ${n0} mode
>> +expect 0 chmod ${n0} 03333
>> +expect 03333 stat ${n0} mode
>> +expect 0 chmod ${n0} 04444
>> +expect 04444 stat ${n0} mode
>> +expect 0 chmod ${n0} 05555
>> +expect 05555 stat ${n0} mode
>> +expect 0 chmod ${n0} 06666
>> +expect 06666 stat ${n0} mode
>> +expect 0 chmod ${n0} 07777
>> +expect 07777 stat ${n0} mode
>> +expect 0 rmdir ${n0}
>> +
>> +expect 0 mkfifo ${n0} 0644
>> +expect 0 chmod ${n0} 01111
>> +expect 01111 stat ${n0} mode
>> +expect 0 chmod ${n0} 02222
>> +expect 02222 stat ${n0} mode
>> +expect 0 chmod ${n0} 03333
>> +expect 03333 stat ${n0} mode
>> +expect 0 chmod ${n0} 04444
>> +expect 04444 stat ${n0} mode
>> +expect 0 chmod ${n0} 05555
>> +expect 05555 stat ${n0} mode
>> +expect 0 chmod ${n0} 06666
>> +expect 06666 stat ${n0} mode
>> +expect 0 chmod ${n0} 07777
>> +expect 07777 stat ${n0} mode
>> +expect 0 unlink ${n0}
>> +
>> # successful chmod(2) updates ctime.
>> expect 0 create ${n0} 0644
>> ctime1=`${fstest} stat ${n0} ctime`
I found a bug in glusterfs when I test xacl cases, but it was not a xacl 
bug, it's a chmod bug. The bug is "When chmod 03xxx or 07xxx for a file, 
it's will failed". If some one don't test xacl, he will not find this 
bug. But it's a chmod bug, so I add test cases to test "S_ISUID, S_ISGID 
and S_ISVTX and permission bits combination" in chmod/00.t. Maybe the 
change is not properly, but I think it's needed. You can tell me how to 
test it better:)

>> diff --git a/tests/chown/00.t b/tests/chown/00.t
>> index 577170d..fc0bd03 100755
>> --- a/tests/chown/00.t
>> +++ b/tests/chown/00.t
>> @@ -283,11 +283,14 @@ sleep 1
>> expect 0 -- chown ${n0} -1 -1
>> ctime2=`${fstest} stat ${n0} ctime`
>> case "${os}:${fs}" in
>> -Linux:ext3)
>> +Linux:ext3 | Linux:xfs | Linux:glusterfs)
>> test_check $ctime1 -lt $ctime2
>> ;;
>> -*)
>> +*:ext3 | *:xfs | *:ZFS | *:ntfs-3g | *:UFS)
>> test_check $ctime1 -eq $ctime2
>> + ;;
>> +*)
>> + test_check $ctime1 -le $ctime2
>> ;;
>> esac
>> expect 0 unlink ${n0}
>> @@ -298,11 +301,14 @@ sleep 1
>> expect 0 -- chown ${n0} -1 -1
>> ctime2=`${fstest} stat ${n0} ctime`
>> case "${os}:${fs}" in
>> -Linux:ext3)
>> +Linux:ext3 | Linux:xfs | Linux:glusterfs)
>> test_check $ctime1 -lt $ctime2
>> ;;
>> -*)
>> +*:ext3 | *:xfs | *:ZFS | *:ntfs-3g | *:UFS)
>> test_check $ctime1 -eq $ctime2
>> + ;;
>> +*)
>> + test_check $ctime1 -le $ctime2
>> ;;
>> esac
>> expect 0 rmdir ${n0}
>> @@ -313,11 +319,14 @@ sleep 1
>> expect 0 -- chown ${n0} -1 -1
>> ctime2=`${fstest} stat ${n0} ctime`
>> case "${os}:${fs}" in
>> -Linux:ext3)
>> +Linux:ext3 | Linux:xfs | Linux:glusterfs)
>> test_check $ctime1 -lt $ctime2
>> ;;
>> -*)
>> +*:ext3 | *:xfs | *:ZFS | *:ntfs-3g | *:UFS)
>> test_check $ctime1 -eq $ctime2
>> + ;;
>> +*)
>> + test_check $ctime1 -le $ctime2
>> ;;
>> esac
>> expect 0 unlink ${n0}
>> @@ -328,11 +337,14 @@ sleep 1
>> expect 0 -- lchown ${n0} -1 -1
>> ctime2=`${fstest} lstat ${n0} ctime`
>> case "${os}:${fs}" in
>> -Linux:ext3)
>> +Linux:ext3 | Linux:xfs | Linux:glusterfs)
>> test_check $ctime1 -lt $ctime2
>> ;;
>> -*)
>> +*:ext3 | *:xfs | *:ZFS | *:ntfs-3g | *:UFS)
>> test_check $ctime1 -eq $ctime2
>> + ;;
>> +*)
>> + test_check $ctime1 -le $ctime2
>> ;;
>> esac
>> expect 0 unlink ${n0}
The above is about the problem which we have talked about. "chown (-1, 
-1) need not to update the time." Do you remeber that? The original code 
is "test_check $ctime1 -eq $ctime2". But linux's VFS always update the 
ctime when chown (-1, -1). The standard said "need not", that's 
"unclear", so I want to change "-eq" to "-le", but you said:

"I do not agree with this change : the Posix specification
is unclear, and some implementers have chosen to update
ctime whereas other implementers have kept it unchanged.

But the test is also aimed at checking for no regression
after some change, and if the behavior for ctime changes
for some implementation, it has to be detected. This is
unfortunate, but the test has to accept both strategies
and identify unwanted changes. "

So I have to change it like above, you can give me a patch which you 
think it's properly.
>> diff --git a/tests/conf b/tests/conf
>> index 5e53ea4..98d8161 100644
>> --- a/tests/conf
>> +++ b/tests/conf
>> @@ -4,5 +4,5 @@
>> # Known operating systems: FreeBSD, SunOS, Linux
>> os=`uname`
>>
>> -# Known file systems: UFS, ZFS, ext3, ntfs-3g, xfs
>> +# Known file systems: UFS, ZFS, ext3, ntfs-3g, xfs, glusterfs
>> fs="ext3"
I just add glusterfs argument to tests/conf file, tell the user they can 
use "fs=glusterfs". But I don't know except linux, any other os use 
glusterfs?

>> diff --git a/tests/xacl/00.t b/tests/xacl/00.t
>> index c74d60a..6109931 100755
>> --- a/tests/xacl/00.t
>> +++ b/tests/xacl/00.t
>> @@ -94,12 +94,21 @@ expect 0 setfacl ${d0}/${n2} m 'u::x,g::x,o::x'
>> ctime3=`${fstest} stat ${d0} ctime`
>> ctime4=`${fstest} stat ${d0}/${n2} ctime`
>> test_check $ctime1 -eq $ctime3
>> -test_check $ctime2 -eq $ctime4
>> +case "${os}:${fs}" in
>> +Linux:ext3|Linux:xfs|Linux:glusterfs)
>> + test_check $ctime2 -lt $ctime4
>> + ;;
>> +*)
>> + test_check $ctime2 -eq $ctime4
>> + ;;
>> +esac
>>
After setfacl, the file's ctime will be update in linux's Ext, xfs and 
glusterfs. So I change the "-eq" to "-lt" for 
"Linux:ext3|Linux:xfs|Linux:glusterfs", and remain the "-eq" for others 
situation which I haven't tested.

>> #
>> # Clean
>> #
>> rm -rf ${d0}
>>
>> -else quick_exit
>> +else
>> +rmdir ${n1}
>> +quick_exit
>> fi
>> diff --git a/tests/xacl/01.t b/tests/xacl/01.t
>> index e972630..fbe54f6 100755
>> --- a/tests/xacl/01.t
>> +++ b/tests/xacl/01.t
>> @@ -79,5 +79,7 @@ expect 
>> 'u::---,u:root:--x,u:65531:-wx,g::-wx,g:root:r-x,g:65532:--x,m::rwx,o::r-
>> #
>> rm -rf ${d0}
>>
>> -else quick_exit
>> +else
>> +rmdir ${n1}
>> +quick_exit
>> fi
>> diff --git a/tests/xacl/02.t b/tests/xacl/02.t
>> index 1f6435c..91769cb 100755
>> --- a/tests/xacl/02.t
>> +++ b/tests/xacl/02.t
>> @@ -140,5 +140,7 @@ expect 
>> 'u::r--,u:root:r-x,u:65531:rwx,g::r--,g:root:rw-,g:65532:rwx,m::rwx,o::r-
>> #
>> rm -rf ${d0}
>>
>> -else quick_exit
>> +else
>> +rmdir ${n1}
>> +quick_exit
>> fi
>> diff --git a/tests/xacl/03.t b/tests/xacl/03.t
>> index 4aa6a3c..a27421e 100755
>> --- a/tests/xacl/03.t
>> +++ b/tests/xacl/03.t
>> @@ -132,5 +132,7 @@ expect EACCES getfacl ${d0}/${n2} default
>> #
>> rm -rf ${d0}
>>
>> -else quick_exit
>> +else
>> +rmdir ${n1}
>> +quick_exit
>> fi
>> diff --git a/tests/xacl/04.t b/tests/xacl/04.t
>> index b1f37a9..6984e87 100755
>> --- a/tests/xacl/04.t
>> +++ b/tests/xacl/04.t
>> @@ -110,5 +110,7 @@ expect 0 -u 65533 setfacl ${d0}/${n1} m 
>> 'u::rw,g::r,o::r,m::rx'
>> #
>> rm -rf ${d0}
>>
>> -else quick_exit
>> +else
>> +rmdir ${n1}
>> +quick_exit
>> fi
>> diff --git a/tests/xacl/05.t b/tests/xacl/05.t
>> index 3a06309..24eba0e 100755
>> --- a/tests/xacl/05.t
>> +++ b/tests/xacl/05.t
>> @@ -72,6 +72,8 @@ expect ENOTDIR getfacl ${d0}/${n1}/none access
>> #
>> rm -rf ${d0}
>>
>> -else quick_exit
>> +else
>> +rmdir ${n1}
>> +quick_exit
>> fi
>>
>> diff --git a/tests/xacl/06.t b/tests/xacl/06.t
>> index 0e9338f..55fe3c6 100755
>> --- a/tests/xacl/06.t
>> +++ b/tests/xacl/06.t
>> @@ -117,7 +117,9 @@ expect 0 -u 65533 -g 65533 setfacl ${d0} k
>> #
>> rm -rf ${d0}
>>
>> -else quick_exit
>> +else
>> +rmdir ${n1}
>> +quick_exit
>> fi
>>
When I test in a filesystem which not support ACL, the xacl test cases 
will be exit quickly, but the cases forgot to remove the test dir, so 
many "fstest-xxxxxxxxxxxx" directories will be l remained. I just add 
one line code to remove the test directory.

Maybe we should use another way to tell the tester the fs which he is 
testing not support ACL.

>> #/home/linux/rpmbuild/ntfs/fstest/pjd-fstest/fstest -u 65533 getfacl 
>> ${d0} access
>>
>
Hope your review and suggestion:)

Thank you,
Zorro Lang

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
ntfs-3g-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel

Reply via email to