NetBSD Problem Report #59284

From www@netbsd.org  Sat Apr 12 17:42:50 2025
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)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits)
	 client-signature RSA-PSS (2048 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 79E2A1A9241
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 12 Apr 2025 17:42:50 +0000 (UTC)
Message-Id: <20250412174249.225E11A9242@mollari.NetBSD.org>
Date: Sat, 12 Apr 2025 17:42:49 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: pmax testbed rounding modes are broken 
X-Send-Pr-Version: www-1.0

>Number:         59284
>Category:       port-mips
>Synopsis:       pmax testbed rounding modes are broken
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-mips-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 12 17:45:00 +0000 2025
>Originator:     Taylor R Campbell
>Release:        current
>Organization:
The PmaxBSD Roundation
>Environment:
>Description:
*** Check failed: /tmp/build/2025.04.11.04.54.02-pmax/src/tests/lib/libm/t_fenv.c:163: y1 != z1: FE_TOWARDZERO[-1 + ulp(1)/4] expected=-0x1p+0 actual=-0x1.fffffffffffffp-1
*** Check failed: /tmp/build/2025.04.11.04.54.02-pmax/src/tests/lib/libm/t_fenv.c:165: y2 != z2: FE_TOWARDZERO[1 + 3*(ulp(1)/2)] expected=0x1.0000000000002p+0 actual=0x1.0000000000001p+0
*** Check failed: /tmp/build/2025.04.11.04.54.02-pmax/src/tests/lib/libm/t_fenv.c:165: y2 != z2: FE_DOWNWARD[1 + 3*(ulp(1)/2)] expected=0x1.0000000000002p+0 actual=0x1.0000000000001p+0
*** Check failed: /tmp/build/2025.04.11.04.54.02-pmax/src/tests/lib/libm/t_fenv.c:163: y1 != z1: FE_UPWARD[-1 + ulp(1)/4] expected=-0x1p+0 actual=-0x1.fffffffffffffp-1

https://releng.netbsd.org/b5reports/pmax/2025/2025.04.11.04.54.02/test.html#lib_libm_t_fenv_fegetround

*** Check failed: /tmp/build/2025.04.11.04.54.02-pmax/src/tests/lib/libm/t_fenv.c:163: y1 != z1: FE_TOWARDZERO[-1 + ulp(1)/4] expected=-0x1p+0 actual=-0x1.fffffffffffffp-1
*** Check failed: /tmp/build/2025.04.11.04.54.02-pmax/src/tests/lib/libm/t_fenv.c:165: y2 != z2: FE_TOWARDZERO[1 + 3*(ulp(1)/2)] expected=0x1.0000000000002p+0 actual=0x1.0000000000001p+0
*** Check failed: /tmp/build/2025.04.11.04.54.02-pmax/src/tests/lib/libm/t_fenv.c:165: y2 != z2: FE_DOWNWARD[1 + 3*(ulp(1)/2)] expected=0x1.0000000000002p+0 actual=0x1.0000000000001p+0
*** Check failed: /tmp/build/2025.04.11.04.54.02-pmax/src/tests/lib/libm/t_fenv.c:163: y1 != z1: FE_UPWARD[-1 + ulp(1)/4] expected=-0x1p+0 actual=-0x1.fffffffffffffp-1

https://releng.netbsd.org/b5reports/pmax/2025/2025.04.11.04.54.02/test.html#lib_libm_t_fenv_fesetround
>How-To-Repeat:
cd /usr/tests/lib/libm
atf-run t_fenv t_fe_round | atf-report
>Fix:
Yes, please!

Not sure if this is a qemu bug or a hardware bug or a NetBSD kernel bug in configuring the FPU.  Guessing it's probably a qemu bug and might be helped by adding if (isQEMU()) { atf_tc_expect_fail("PR ...") }.

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-2025 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.