Date: Tue, 4 Apr 2017 21:36:13 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316505 - head/usr.sbin/extattr/tests Message-ID: <201704042136.v34LaDEf090856@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Tue Apr 4 21:36:13 2017 New Revision: 316505 URL: https://svnweb.freebsd.org/changeset/base/316505 Log: Don't assume NAME_MAX is 255 Query the filesystem limit via getconf(3) instead MFC after: 2 months Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/extattr/tests/extattr_test.sh Modified: head/usr.sbin/extattr/tests/extattr_test.sh ============================================================================== --- head/usr.sbin/extattr/tests/extattr_test.sh Tue Apr 4 21:30:24 2017 (r316504) +++ head/usr.sbin/extattr/tests/extattr_test.sh Tue Apr 4 21:36:13 2017 (r316505) @@ -70,10 +70,15 @@ long_name_head() { } long_name_body() { 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 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 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704042136.v34LaDEf090856>