bin/181130: HN_DECIMAL failures with humanize_number
Garrett Cooper
yaneurabeya at gmail.com
Thu Aug 8 03:50:01 UTC 2013
>Number: 181130
>Category: bin
>Synopsis: HN_DECIMAL failures with humanize_number
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Aug 08 03:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Garrett Cooper
>Release: 10-CURRENT
>Organization:
EMC Isilon
>Environment:
FreeBSD fuji-current.local 10.0-CURRENT FreeBSD 10.0-CURRENT #10 c9d2bd6-dirty: Wed Aug 7 18:55:03 PDT 2013 root at fuji-current.local:/usr/obj/usr/src/sys/FUJI-NOCOMPAT i386
>Description:
These are several failures reported by the ATF test regarding humanize number. The breakdown is as follows:
tc-se:humanize_number("1 K", 5, 1000, "", HN_AUTOSCALE, HN_B) = 3, but got 3/[1 k]
tc-se:*** Check failed: Failed for table entry 11
^^ This should display with the appropriate prefix (K, not k). ^^
tc-se:humanize_number("", 6, 1000, "A", HN_AUTOSCALE, HN_DECIMAL) = -1, but got
tc-se: 4/[1 kA]
tc-se:*** Check failed: Failed for table entry 12
^^ This should fail because it would truncate the value ^^
tc-se:humanize_number("1.0G", 5, 1048258238, "", HN_AUTOSCALE,
tc-se: HN_DECIMAL|HN_NOSPACE|HN_B) = 4, but got 4/[999M]
tc-se:*** Check failed: Failed for table entry 13
tc-se:humanize_number("1.0M", 5, 1023488, "", HN_AUTOSCALE,
tc-se: HN_DECIMAL|HN_NOSPACE|HN_B) = 4, but got 4/[999k]
tc-se:*** Check failed: Failed for table entry 14
tc-se:humanize_number("1.0M", 5, 1023999, "", HN_AUTOSCALE,
tc-se: HN_DECIMAL|HN_NOSPACE|HN_B) = 4, but got 2/[1M]
^^ These should be properly rounded up and have appropriate decimal places ^^
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list