mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
16985be90e
Test nfs4_getfacl gets ACL list correctly from server when the ACL
length is close enough to the end of a page. On buggy NFS client
getxattr could return ERANGE. Upstream commit ed92d8c137b7 ("NFSv4:
fix getacl ERANGE for some ACL buffer sizes") fixed this bug in 4.11
kernel.
Note that this reproducer was originally written by J. Bruce Fields.
Cc: J. Bruce Fields <bfields@redhat.com>
Cc: Weston Andros Adamson <dros@primarydata.com>
Cc: linux-nfs@vger.kernel.org
Reviewed-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
36 lines
794 B
Plaintext
36 lines
794 B
Plaintext
#
|
|
# NFS specific common functions.
|
|
#
|
|
|
|
# given an NFS export and a NFS version number, return 0 if
|
|
# the mounted NFS is the given version. e.g.
|
|
# _is_nfs_version $SCRATCH_DEV 4.2
|
|
_is_nfs_version()
|
|
{
|
|
local nfs_exp=$1
|
|
local nfs_ver=$2
|
|
_fs_options $1 | grep -q "vers=$2"
|
|
}
|
|
|
|
# require $TEST_DEV mounted as a given NFS version
|
|
# e.g. _require_test_nfs_version 4.2
|
|
_require_test_nfs_version()
|
|
{
|
|
_require_test
|
|
if ! _is_nfs_version $TEST_DEV $1; then
|
|
_notrun "Test requires \$TEST_DEV mounted as NFSv$1"
|
|
fi
|
|
}
|
|
|
|
# require $SCRATCH_DEV mounted as a given NFS version
|
|
# e.g. _require_scratch_nfs_version 4
|
|
_require_scratch_nfs_version()
|
|
{
|
|
_require_scratch
|
|
_scratch_mount
|
|
if ! _is_nfs_version $SCRATCH_DEV $1; then
|
|
_notrun "Test requires \$SCRATCH_DEV mounted as NFSv$1"
|
|
fi
|
|
_scratch_unmount
|
|
}
|