tests: user_property: Clarify comments
Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Reviewed-by: Allan Jude <allan@klarasystems.com> Signed-off-by: Mateusz Piotrowski <0mp@FreeBSD.org> Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Closes #16248
This commit is contained in:
parent
5536c0dee2
commit
b38fccc646
|
@ -51,13 +51,23 @@ log_onexit cleanup_user_prop $TESTPOOL
|
|||
typeset -a names=()
|
||||
typeset -a values=()
|
||||
|
||||
# Too long property name (256 bytes, which is the 256-byte limit minus 1 byte
|
||||
# for the null byte plus 1 byte to reach back over the limit)
|
||||
names+=("$(awk 'BEGIN { printf "x:"; while (c++ < (256 - 2 - 1 + 1)) printf "a" }')")
|
||||
# A property name that is too long consists of 256 or more bytes (which is (1)
|
||||
# the 256-byte limit (2) minus 1 byte for the null byte (3) plus 1 byte to
|
||||
# reach back over the limit).
|
||||
names+=("$(awk '
|
||||
BEGIN {
|
||||
# Print a 2-byte prefix of the name.
|
||||
printf "x:";
|
||||
# Print the remaining 254 bytes.
|
||||
while (c++ < (256 - 2 - 1 + 1))
|
||||
printf "a"
|
||||
}'
|
||||
)")
|
||||
values+=("too-long-property-name")
|
||||
# Too long property value (the limits are 1024 on FreeBSD and 4096 on Linux, so
|
||||
# pick the right one; the too long value is, e.g., the limit minus 1 bytes for the
|
||||
# null byte plus 1 byte to reach back over the limit)
|
||||
# A property value that is too long consists of at least 1024 bytes on FreeBSD
|
||||
# and 4096 bytes on Linux.
|
||||
# The smallest too-long value is (1) the limit (2) minus 1 byte for the null
|
||||
# byte (2) plus 1 byte to reach back over the limit).
|
||||
if is_linux; then
|
||||
typeset ZFS_MAXPROPLEN=4096
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue