mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-01 08:27:59 +00:00
Don't assume NAME_MAX is 255
Query the filesystem limit via getconf(3) instead MFC after: 2 months Sponsored by: Dell EMC Isilon
This commit is contained in:
parent
d2d2a79c1a
commit
ba8c8a0ca2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=316505
@ -70,10 +70,15 @@ long_name_head() {
|
|||||||
}
|
}
|
||||||
long_name_body() {
|
long_name_body() {
|
||||||
check_fs
|
check_fs
|
||||||
|
|
||||||
|
if ! NAME_MAX=$(getconf NAME_MAX .); then
|
||||||
|
atf_skip "Filesystem not reporting NAME_MAX; skipping testcase"
|
||||||
|
fi
|
||||||
|
|
||||||
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=208965
|
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=208965
|
||||||
atf_expect_fail "BUG 208965 extattr(2) doesn't allow maxlen attr names"
|
atf_expect_fail "BUG 208965 extattr(2) doesn't allow maxlen attr names"
|
||||||
|
|
||||||
ATTRNAME=`jot -b X -s "" 255 0`
|
ATTRNAME=`jot -b X -s "" $NAME_MAX 0`
|
||||||
touch foo
|
touch foo
|
||||||
atf_check -s exit:0 -o empty setextattr user $ATTRNAME myvalue foo
|
atf_check -s exit:0 -o empty setextattr user $ATTRNAME myvalue foo
|
||||||
atf_check -s exit:0 -o inline:"${ATTRNAME}\n" lsextattr -q user foo
|
atf_check -s exit:0 -o inline:"${ATTRNAME}\n" lsextattr -q user foo
|
||||||
|
Loading…
Reference in New Issue
Block a user