From owner-freebsd-bugs@FreeBSD.ORG Mon Jul 7 00:38:47 2014 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96C85F28 for ; Mon, 7 Jul 2014 00:38:47 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 782BC25E3 for ; Mon, 7 Jul 2014 00:38:47 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s670clSM074536 for ; Mon, 7 Jul 2014 01:38:47 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 191675] New: tools/regression/lib/libc/stdio/test-printfloat.t failures with i386 Date: Mon, 07 Jul 2014 00:38:47 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: yaneurabeya@gmail.com X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2014 00:38:47 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191675 Bug ID: 191675 Summary: tools/regression/lib/libc/stdio/test-printfloat.t failures with i386 Product: Base System Version: 11.0-CURRENT Hardware: i386 OS: Any Status: Needs Triage Severity: Affects Some People Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: yaneurabeya@gmail.com A check was added to test-printfloat.c to deal with i386 some years ago, most likely because of the issues noted in this mailing list thread: http://lists.freebsd.org/pipermail/freebsd-standards/2007-October/001452.html . The code is always hitting the #else case, which fails with i386, using both clang and gcc. If I remove the !defined(__i386__) (for two spots in the testcases), the tests pass on i386. Is this expected? 5a0431f63 (das 2004-01-19 05:59:07 +0000 259) #if (LDBL_MANT_DIG == 64) && !defined(__i386__) 61773c1de (das 2008-04-12 03:11:56 +0000 260) testfmt("0x1.921fb54442d18468p+1", "%La", 0x3.243f6a8885a308dp0L); 61773c1de (das 2008-04-12 03:11:56 +0000 261) testfmt("0x1p-16445", "%La", 0x1p-16445L); 61773c1de (das 2008-04-12 03:11:56 +0000 262) testfmt("0x1.30ecap-16381", "%La", 0x9.8765p-16384L); ... 5a0431f63 (das 2004-01-19 05:59:07 +0000 268) #else 1f0071c6f (das 2012-01-14 21:09:54 +0000 269) testfmt("0x1.921fb54442d18p+1", "%La", 0x3.243f6a8885a31p0L); 1f0071c6f (das 2012-01-14 21:09:54 +0000 270) testfmt("0x1p-1074", "%La", 0x1p-1074L); 1f0071c6f (das 2012-01-14 21:09:54 +0000 271) testfmt("0x1.30ecap-1021", "%La", 0x9.8765p-1024L); commit 1f0071c6f6eac4b1e00802e089059cbb55254ba9 Author: das Date: Sat Jan 14 21:09:54 2012 +0000 Update the tests for arm and other ports where long double is the same as double, similar to r178141. Notes: svn path=/head/; revision=230114 ... commit 5a0431f630ef41b4c8dfbf0aa35c96e9104ea4c3 Author: das Date: Mon Jan 19 05:59:07 2004 +0000 Add regression tests for printf's %a/%A formats. While here, disable some of the long double tests on i386, since FreeBSD/i386 is the only port that doesn't evaluate long doubles in their full precision (due to constant folding bugs in gcc). Notes: svn path=/head/; revision=124708 % make CC=gcc47 test-printfloat LDFLAGS+="-Wl,-rpath=/usr/local/lib/gcc47/ -L/usr/local/lib/gcc47/" gcc47 -O2 -pipe -lm -Wl,-rpath=/usr/local/lib/gcc47/ -L/usr/local/lib/gcc47/ test-printfloat.c -o test-printfloat % ./test-printfloat 1..11 ok 1 - printfloat ok 2 - printfloat ok 3 - printfloat ok 4 - printfloat ok 5 - printfloat ok 6 - printfloat ok 7 - printfloat ok 8 - printfloat ok 9 - printfloat 269: printf("%La", 0x3.243f6a8885a31p0L) ==> [0x1.921fb54442d1846ap+1], expected [0x1.921fb54442d18p+1] Abort trap (core dumped) % prove -v test-printfloat.t test-printfloat.t .. 1..11 ok 1 - printfloat ok 2 - printfloat ok 3 - printfloat ok 4 - printfloat ok 5 - printfloat ok 6 - printfloat ok 7 - printfloat ok 8 - printfloat ok 9 - printfloat 269: printf("%La", 0x3.243f6a8885a31p0L) ==> [0x1.921fb54442d188p+1], expected [0x1.921fb54442d18p+1] Failed 2/11 subtests Test Summary Report ------------------- test-printfloat.t (Wstat: 134 Tests: 9 Failed: 0) Non-zero wait status: 134 Parse errors: Bad plan. You planned 11 tests but ran 9. Files=1, Tests=9, 1 wallclock secs ( 0.01 usr 0.02 sys + 0.07 cusr 0.22 csys = 0.32 CPU) Result: FAIL % git checkout isilon-atf % cd - % git diff HEAD^.. diff --git a/lib/libc/tests/legacy/stdio/test-printfloat.c b/lib/libc/tests/legacy/stdio/test-printfloat.c index 806a85e..d4a189c 100644 --- a/lib/libc/tests/legacy/stdio/test-printfloat.c +++ b/lib/libc/tests/legacy/stdio/test-printfloat.c @@ -75,7 +75,7 @@ main(int argc, char *argv[]) testfmt("1234567.800000", "%Lf", 1234567.8L); testfmt("1.23457E+06", "%LG", 1234567.8L); -#if (LDBL_MANT_DIG > DBL_MANT_DIG) && !defined(__i386__) +#if (LDBL_MANT_DIG > DBL_MANT_DIG) testfmt("123456789.864210", "%Lf", 123456789.8642097531L); testfmt("-1.23457E+08", "%LG", -123456789.8642097531L); testfmt("123456789.8642097531", "%.10Lf", 123456789.8642097531L); @@ -256,7 +256,7 @@ main(int argc, char *argv[]) testfmt("0x1p-1074", "%a", 0x1p-1074); testfmt("0x1.2345p-1024", "%a", 0x1.2345p-1024); -#if (LDBL_MANT_DIG == 64) && !defined(__i386__) +#if (LDBL_MANT_DIG == 64) testfmt("0x1.921fb54442d18468p+1", "%La", 0x3.243f6a8885a308dp0L); testfmt("0x1p-16445", "%La", 0x1p-16445L); testfmt("0x1.30ecap-16381", "%La", 0x9.8765p-16384L); % make all install ... % pwd; ./test-printfloat /usr/tests/lib/libc/legacy/stdio 1..11 ok 1 - printfloat ok 2 - printfloat ok 3 - printfloat ok 4 - printfloat ok 5 - printfloat ok 6 - printfloat ok 7 - printfloat ok 8 - printfloat ok 9 - printfloat ok 10 - printfloat ok 11 - printfloat -- You are receiving this mail because: You are the assignee for the bug.