NetBSD Problem Report #57422

From www@netbsd.org  Fri May 19 15:13:29 2023
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 5C5621A923A
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 19 May 2023 15:13:29 +0000 (UTC)
Message-Id: <20230519151327.CCD761A923B@mollari.NetBSD.org>
Date: Fri, 19 May 2023 15:13:27 +0000 (UTC)
From: jspath55@gmail.com
Reply-To: jspath55@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Test for long double omitted in t_fpclassify automated framework cases
X-Send-Pr-Version: www-1.0

>Number:         57422
>Category:       misc
>Synopsis:       Test for long double omitted in t_fpclassify automated framework cases
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 19 15:15:00 +0000 2023
>Originator:     Jim Spath
>Release:        10.0_BETA
>Organization:
>Environment:
NetBSD net.bsd 10.0_BETA NetBSD 10.0_BETA (GENERIC) #0: Sun Feb 12 12:39:37 UTC 2023  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64 x86_64 AMD 686-class NetBSD
>Description:
I read up on floating point and math operations after finding an issue with an earmv6hf system, and noticed test cases for "long double" were commented out in the t_fpclassify test case. There are tests for double and float.

lib/libc/gen/t_fpclassify:fpclassify_double,
lib/libc/gen/t_fpclassify:fpclassify_float,

In some tests, 3 "flavours" are covered:

lib/libc/gen/t_fpsetmask:fpsetmask_unmasked_double,
lib/libc/gen/t_fpsetmask:fpsetmask_unmasked_float,
lib/libc/gen/t_fpsetmask:fpsetmask_unmasked_long_double,

 tc-end: 1684374620.392177, fpsetmask_unmasked_double, skipped, FPU  does not implement traps on FP exceptions
 tc-end: 1684374620.666940, fpsetmask_unmasked_float, skipped, FPU does  not implement traps on FP exceptions
 tc-end: 1684374621.37833, fpsetmask_unmasked_long_double, skipped, FPU  does not implement traps on FP exceptions

PR 50937 relates to long double math ops, and was closed around the NetBSD 7 release time [2016].
"Unexpected and wrong result when print subnormal long double value"
(src/lib/libc/gdtoa: ldtoa.c; also noticed PR 57250, in 2023--"./test 1e309")

The t_fpclassify code says:

/*
 * XXX NetBSD doesn't have long-double flavors of frexp, ldexp, and modf,
 * XXX so this test is disabled.
 */

But now we do, from what the man says, e.g.:

     double
     frexp(double value, int *exp);

     float
     frexpf(float value, int *exp);

     long double
     frexpl(long double value, int *exp);



>How-To-Repeat:
cd /usr/tests
Run:
atf-run lib/libc/gen/t_fpclassify 

Note missing long double test case results.
>Fix:
Remove the skipper:

define TEST_LONG_DOUBLE

$ grep  "LONG_DOUBLE"  t_fpclassify.c
#ifdef TEST_LONG_DOUBLE
#endif /* TEST_LONG_DOUBLE */
#ifdef TEST_LONG_DOUBLE
#endif /* TEST_LONG_DOUBLE */

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.