Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Aug 2013 03:42:52 GMT
From:      Garrett Cooper <yaneurabeya@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/181130: HN_DECIMAL failures with humanize_number
Message-ID:  <201308080342.r783gqnr021410@oldred.freebsd.org>
Resent-Message-ID: <201308080350.r783o0lS056699@freefall.freebsd.org>

index | next in thread | raw e-mail


>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@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:


help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308080342.r783gqnr021410>