diff --git a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/chmod/02.t b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/chmod/02.t index 7a5b4a4..ba30b69 100755 --- a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/chmod/02.t +++ b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/chmod/02.t @@ -6,6 +6,11 @@ desc="chmod returns ENAMETOOLONG if a component of a pathname exceeded 255 chara dir=`dirname $0` . ${dir}/../misc.sh +# acid-store does not have a maximum file name length. +if [ "$fs" = "acid-store" ]; then + quick_exit +fi + echo "1..5" expect 0 create ${name255} 0644 diff --git a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/chown/02.t b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/chown/02.t index e9814bd..653a52e 100755 --- a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/chown/02.t +++ b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/chown/02.t @@ -6,6 +6,11 @@ desc="chown returns ENAMETOOLONG if a component of a pathname exceeded 255 chara dir=`dirname $0` . ${dir}/../misc.sh +# acid-store does not have a maximum file name length. +if [ "$fs" = "acid-store" ]; then + quick_exit +fi + echo "1..5" expect 0 create ${name255} 0644 diff --git a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/conf b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/conf index 8497d3e..a5fd0fc 100644 --- a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/conf +++ b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/conf @@ -4,5 +4,5 @@ # Known operating systems: FreeBSD, SunOS, Linux os=`uname` -# Known file systems: UFS, ZFS, ext3, ext4, ntfs-3g, xfs, btrfs, glusterfs, HFS+, secfs, cgofuse -fs="secfs" +# Known file systems: UFS, ZFS, ext3, ext4, ntfs-3g, xfs, btrfs, glusterfs, HFS+, secfs, cgofuse, acid-store +fs="acid-store" diff --git a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/link/02.t b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/link/02.t index 6c34e8e..8a6ab7d 100755 --- a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/link/02.t +++ b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/link/02.t @@ -6,6 +6,11 @@ desc="link returns ENAMETOOLONG if a component of either pathname exceeded 255 c dir=`dirname $0` . ${dir}/../misc.sh +# acid-store does not have a maximum file name length. +if [ "$fs" = "acid-store" ]; then + quick_exit +fi + echo "1..10" n0=`namegen` diff --git a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/mkdir/02.t b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/mkdir/02.t index b23f9f5..3d4ee56 100755 --- a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/mkdir/02.t +++ b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/mkdir/02.t @@ -6,6 +6,11 @@ desc="mkdir returns ENAMETOOLONG if a component of a pathname exceeded 255 chara dir=`dirname $0` . ${dir}/../misc.sh +# acid-store does not have a maximum file name length. +if [ "$fs" = "acid-store" ]; then + quick_exit +fi + echo "1..3" expect 0 mkdir ${name255} 0755 diff --git a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/mkfifo/02.t b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/mkfifo/02.t index f0d5cae..ffe58ab 100755 --- a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/mkfifo/02.t +++ b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/mkfifo/02.t @@ -6,6 +6,11 @@ desc="mkfifo returns ENAMETOOLONG if a component of a pathname exceeded 255 char dir=`dirname $0` . ${dir}/../misc.sh +# acid-store does not have a maximum file name length. +if [ "$fs" = "acid-store" ]; then + quick_exit +fi + echo "1..3" expect 0 mkfifo ${name255} 0644 diff --git a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/open/02.t b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/open/02.t index 6ac818e..364536e 100755 --- a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/open/02.t +++ b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/open/02.t @@ -6,6 +6,11 @@ desc="open returns ENAMETOOLONG if a component of a pathname exceeded 255 charac dir=`dirname $0` . ${dir}/../misc.sh +# acid-store does not have a maximum file name length. +if [ "$fs" = "acid-store" ]; then + quick_exit +fi + echo "1..4" expect 0 open ${name255} O_CREAT 0620 diff --git a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/rename/00.t b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/rename/00.t index 1cee061..dbbd705 100755 --- a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/rename/00.t +++ b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/rename/00.t @@ -78,7 +78,7 @@ sleep 1 expect 0 rename ${n0} ${n1} ctime2=`${fstest} stat ${n1} ctime` case "${os}:${fs}" in -Darwin:*|*:secfs|*:cgofuse) +Darwin:*|*:secfs|*:cgofuse|*:acid-store) # This test wants ctime of a renamed file to be updated, but POSIX does not require it # and Darwin (and secfs) do not update it! # @@ -104,7 +104,7 @@ sleep 1 expect 0 rename ${n0} ${n1} ctime2=`${fstest} stat ${n1} ctime` case "${os}:${fs}" in -Darwin:*|*:secfs|*:cgofuse) +Darwin:*|*:secfs|*:cgofuse|*:acid-store) # This test wants ctime of a renamed file to be updated, but POSIX does not require it # and Darwin (and secfs) do not update it! # @@ -123,7 +123,7 @@ sleep 1 expect 0 rename ${n0} ${n1} ctime2=`${fstest} stat ${n1} ctime` case "${os}:${fs}" in -Darwin:*|*:secfs|*:cgofuse) +Darwin:*|*:secfs|*:cgofuse|*:acid-store) # This test wants ctime of a renamed file to be updated, but POSIX does not require it # and Darwin (and secfs) do not update it! # @@ -142,7 +142,7 @@ sleep 1 expect 0 rename ${n0} ${n1} ctime2=`${fstest} lstat ${n1} ctime` case "${os}:${fs}" in -Darwin:*|*:secfs|*:cgofuse) +Darwin:*|*:secfs|*:cgofuse|*:acid-store) # This test wants ctime of a renamed file to be updated, but POSIX does not require it # and Darwin (and secfs) do not update it! # diff --git a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/rename/01.t b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/rename/01.t index ec29101..b8515d0 100755 --- a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/rename/01.t +++ b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/rename/01.t @@ -6,6 +6,11 @@ desc="rename returns ENAMETOOLONG if a component of either pathname exceeded 255 dir=`dirname $0` . ${dir}/../misc.sh +# acid-store does not have a maximum file name length. +if [ "$fs" = "acid-store" ]; then + quick_exit +fi + echo "1..8" n0=`namegen` diff --git a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/rmdir/02.t b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/rmdir/02.t index a37a7a4..1ea9976 100755 --- a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/rmdir/02.t +++ b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/rmdir/02.t @@ -6,6 +6,11 @@ desc="rmdir returns ENAMETOOLONG if a component of a pathname exceeded 255 chara dir=`dirname $0` . ${dir}/../misc.sh +# acid-store does not have a maximum file name length. +if [ "$fs" = "acid-store" ]; then + quick_exit +fi + echo "1..4" expect 0 mkdir ${name255} 0755 diff --git a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/symlink/02.t b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/symlink/02.t index 2ab046c..2a5350f 100755 --- a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/symlink/02.t +++ b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/symlink/02.t @@ -6,6 +6,11 @@ desc="symlink returns ENAMETOOLONG if a component of the name2 pathname exceeded dir=`dirname $0` . ${dir}/../misc.sh +# acid-store does not have a maximum file name length. +if [ "$fs" = "acid-store" ]; then + quick_exit +fi + echo "1..7" n0=`namegen` diff --git a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/truncate/02.t b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/truncate/02.t index b104ec6..6b67aae 100755 --- a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/truncate/02.t +++ b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/truncate/02.t @@ -6,6 +6,11 @@ desc="truncate returns ENAMETOOLONG if a component of a pathname exceeded 255 ch dir=`dirname $0` . ${dir}/../misc.sh +# acid-store does not have a maximum file name length. +if [ "$fs" = "acid-store" ]; then + quick_exit +fi + echo "1..5" expect 0 create ${name255} 0644 diff --git a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/unlink/02.t b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/unlink/02.t index af9a386..df4c379 100755 --- a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/unlink/02.t +++ b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/unlink/02.t @@ -6,6 +6,11 @@ desc="unlink returns ENAMETOOLONG if a component of a pathname exceeded 255 char dir=`dirname $0` . ${dir}/../misc.sh +# acid-store does not have a maximum file name length. +if [ "$fs" = "acid-store" ]; then + quick_exit +fi + echo "1..4" expect 0 create ${name255} 0644 diff --git a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/xacl/01.t b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/xacl/01.t index fbe54f6..852d201 100755 --- a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/xacl/01.t +++ b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/xacl/01.t @@ -69,11 +69,24 @@ expect 'u::r-x,u:root:--x,u:65531:-wx,g::-wx,g:root:r-x,g:65532:--x,m::rwx,o::r- # Do the same with a different umask, it should be ignored # (it is not with fuse) # -rm -rf ${d0}/${n2} ${d0}/${d1} -expect 0 -U 077 create ${d0}/${n2} 077 -expect 'u::---,u:root:--x,u:65531:-wx,g::-wx,g:root:r-x,g:65532:--x,m::rwx,o::r-x' getfacl ${d0}/${n2} access -expect 0 -U 077 mkdir ${d0}/${d1} 077 -expect 'u::---,u:root:--x,u:65531:-wx,g::-wx,g:root:r-x,g:65532:--x,m::rwx,o::r-x' getfacl ${d0}/${d1} access +# libfuse handles the umask, so it is impossible to ignore it in FUSE file systems. +case "${os}:${fs}" in +*:acid-store) + rm -rf ${d0}/${n2} ${d0}/${d1} + expect 0 -U 077 create ${d0}/${n2} 077 + expect 'u::---,u:root:--x,u:65531:-wx,g::-wx,g:root:r-x,g:65532:--x,m::---,o::---' getfacl ${d0}/${n2} access + expect 0 -U 077 mkdir ${d0}/${d1} 077 + expect 'u::---,u:root:--x,u:65531:-wx,g::-wx,g:root:r-x,g:65532:--x,m::---,o::---' getfacl ${d0}/${d1} access + ;; +*) + rm -rf ${d0}/${n2} ${d0}/${d1} + expect 0 -U 077 create ${d0}/${n2} 077 + expect 'u::---,u:root:--x,u:65531:-wx,g::-wx,g:root:r-x,g:65532:--x,m::rwx,o::r-x' getfacl ${d0}/${n2} access + expect 0 -U 077 mkdir ${d0}/${d1} 077 + expect 'u::---,u:root:--x,u:65531:-wx,g::-wx,g:root:r-x,g:65532:--x,m::rwx,o::r-x' getfacl ${d0}/${d1} access + ;; +esac + # # Clean # diff --git a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/xacl/04.t b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/xacl/04.t index 6984e87..6386a60 100755 --- a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/xacl/04.t +++ b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/xacl/04.t @@ -20,8 +20,15 @@ if setfacl -m 'm::5' ${n1} 2> /dev/null then rmdir ${n1} + +# FUSE file systems mounted with `default_permissions` do not support ACL access checking. +if [ "$fs" = "acid-store" ]; then + quick_exit +fi + echo "1..53" + # create a basic directory, clean its inherited ACLs, and check initial ACL # 1 expect 0 mkdir ${d0} 0777 diff --git a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/xacl/05.t b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/xacl/05.t index 24eba0e..d2ac7bb 100755 --- a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/xacl/05.t +++ b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/xacl/05.t @@ -18,7 +18,15 @@ if setfacl -m 'm::5' ${n1} 2> /dev/null then rmdir ${n1} -echo "1..21" + +case "${os}:${fs}" in +*:acid-store) + echo "1..17" + ;; +*) + echo "1..21" + ;; +esac # create a basic directory, clean its inherited ACLs, and check initial ACL # 1 @@ -47,10 +55,13 @@ expect EACCES -u 65533 -g 65533 getfacl ${d0}/${n1} default # # ENAMETOOLONG path to file name is too long # 15 -expect 0 create ${d0}/${name255} 0644 -expect 'u::rw-,g::r--,o::r--' getfacl ${d0}/${name255} access -expect 0 unlink ${d0}/${name255} -expect ENAMETOOLONG getfacl ${d0}/${name256} access +if [ "$fs" != "acid-store" ]; then + # acid-store does not have a maximum file name length. + expect 0 create ${d0}/${name255} 0644 + expect 'u::rw-,g::r--,o::r--' getfacl ${d0}/${name255} access + expect 0 unlink ${d0}/${name255} + expect ENAMETOOLONG getfacl ${d0}/${name256} access +fi # # ENOENT file does not exist # or no file name @@ -76,4 +87,3 @@ else rmdir ${n1} quick_exit fi - diff --git a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/xacl/06.t b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/xacl/06.t index 55fe3c6..ddb535e 100755 --- a/fstest/ntfs-3g-pjd-fstest-8af5670/tests/xacl/06.t +++ b/fstest/ntfs-3g-pjd-fstest-8af5670/tests/xacl/06.t @@ -18,7 +18,15 @@ if setfacl -m 'm::5' ${n1} 2> /dev/null then rmdir ${n1} -echo "1..42" + +case "${os}:${fs}" in +*:acid-store) + echo "1..15" + ;; +*) + echo "1..42" + ;; +esac # create a basic file, clean its inherited ACLs, and check initial ACL # 1 @@ -34,13 +42,16 @@ expect EACCES getfacl ${d0}/${n1} default # or wrong ACL type # only for acl_set_file() # 8 -expect 0 setfacl ${d0} m 'u::rw,g::rwx,o::rwx,m::rwx' -expect 'u::rw-,g::rwx,m::rwx,o::rwx' getfacl ${d0} access -expect EACCES -u 65533 -g 65533 setfacl ${d0}/${n1} m 'u::rw-,g::r--,o::r--' -expect 0 setfacl ${d0} m 'u::rwx,g::rwx,o::rwx,m::rwx' -expect 'u::rwx,g::rwx,m::rwx,o::rwx' getfacl ${d0} access -expect 0 -u 65533 -g 65533 setfacl ${d0}/${n1} m 'u::rw-,g::r--,o::r--' -expect EACCES -u 65533 -g 65533 setfacl ${d0}/${n1} md 'u::rw-,g::r--,o::r--' +if [ "$fs" != "acid-store" ]; then + # FUSE file systems mounted with `default_permissions` do not support ACL access checking. + expect 0 setfacl ${d0} m 'u::rw,g::rwx,o::rwx,m::rwx' + expect 'u::rw-,g::rwx,m::rwx,o::rwx' getfacl ${d0} access + expect EACCES -u 65533 -g 65533 setfacl ${d0}/${n1} m 'u::rw-,g::r--,o::r--' + expect 0 setfacl ${d0} m 'u::rwx,g::rwx,o::rwx,m::rwx' + expect 'u::rwx,g::rwx,m::rwx,o::rwx' getfacl ${d0} access + expect 0 -u 65533 -g 65533 setfacl ${d0}/${n1} m 'u::rw-,g::r--,o::r--' + expect EACCES -u 65533 -g 65533 setfacl ${d0}/${n1} md 'u::rw-,g::r--,o::r--' +fi # # # EINVAL argument does not point to a valid ACL @@ -60,21 +71,23 @@ expect 0 -u 65533 -g 65533 setfacl ${d0}/${n1} k # not mentioned for acl_delete_def_file(), but it obviously # happens nevertheless # 17 -expect 0 create ${d0}/${name255} 0644 -expect 0 setfacl ${d0}/${name255} m 'u::rw,g::rwx,o::-,u:65532:x,m::w' -expect 0620 stat ${d0}/${name255} mode -expect 'u::rw-,u:65532:--x,g::rwx,m::-w-,o::---' getfacl ${d0}/${name255} access -expect 0 unlink ${d0}/${name255} -expect ENAMETOOLONG setfacl ${d0}/${name256} m 'u::w,g::r--,o::r--' -# -expect 0 mkdir ${d0}/${name255} 0755 -expect 0 setfacl ${d0}/${name255} md 'u::rw,g::rwx,o::-,u:65532:x,m::w' -expect 'u::rw-,u:65532:--x,g::rwx,m::-w-,o::---' getfacl ${d0}/${name255} default -expect 0 setfacl ${d0}/${name255} k -expect void getfacl ${d0}/${name255} default -expect 'u::rwx,g::r-x,o::r-x' getfacl ${d0}/${name255} access -expect 0 rmdir ${d0}/${name255} -expect ENAMETOOLONG setfacl ${d0}/${name256} k +if [ "$fs" != "acid-store" ]; then + # acid-store does not have a maximum file name length. + expect 0 create ${d0}/${name255} 0644 + expect 0 setfacl ${d0}/${name255} m 'u::rw,g::rwx,o::-,u:65532:x,m::w' + expect 0620 stat ${d0}/${name255} mode + expect 'u::rw-,u:65532:--x,g::rwx,m::-w-,o::---' getfacl ${d0}/${name255} access + expect 0 unlink ${d0}/${name255} + expect ENAMETOOLONG setfacl ${d0}/${name256} m 'u::w,g::r--,o::r--' + expect 0 mkdir ${d0}/${name255} 0755 + expect 0 setfacl ${d0}/${name255} md 'u::rw,g::rwx,o::-,u:65532:x,m::w' + expect 'u::rw-,u:65532:--x,g::rwx,m::-w-,o::---' getfacl ${d0}/${name255} default + expect 0 setfacl ${d0}/${name255} k + expect void getfacl ${d0}/${name255} default + expect 'u::rwx,g::r-x,o::r-x' getfacl ${d0}/${name255} access + expect 0 rmdir ${d0}/${name255} + expect ENAMETOOLONG setfacl ${d0}/${name256} k +fi # # ENOENT file does not exist # or no file name @@ -101,13 +114,15 @@ expect ENOTDIR setfacl ${d0}/${n1}/none k # # EPERM process is not allowed to set the ACL # 37 -expect EPERM -u 65531 -g 65531 setfacl ${d0}/${n1} m 'u::rw-,g::r--,o::r--' -expect EPERM -u 65531 -g 65533 setfacl ${d0}/${n1} m 'u::rw-,g::r--,o::r--' -expect 0 -u 65533 -g 65533 setfacl ${d0}/${n1} m 'u::rw-,g::r--,o::r--' -# -expect EPERM -u 65531 -g 65531 setfacl ${d0} k -expect EPERM -u 65531 -g 65533 setfacl ${d0} k -expect 0 -u 65533 -g 65533 setfacl ${d0} k +if [ "$fs" != "acid-store" ]; then + # FUSE file systems mounted with `default_permissions` do not support ACL access checking. + expect EPERM -u 65531 -g 65531 setfacl ${d0}/${n1} m 'u::rw-,g::r--,o::r--' + expect EPERM -u 65531 -g 65533 setfacl ${d0}/${n1} m 'u::rw-,g::r--,o::r--' + expect 0 -u 65533 -g 65533 setfacl ${d0}/${n1} m 'u::rw-,g::r--,o::r--' + expect EPERM -u 65531 -g 65531 setfacl ${d0} k + expect EPERM -u 65531 -g 65533 setfacl ${d0} k + expect 0 -u 65533 -g 65533 setfacl ${d0} k +fi # # EROFS file system is read-only # not done, meaningless here