Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Dec 2025 10:44:10 +0000
From:      Li-Wen Hsu <lwhsu@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Cc:        Siva Mahadevan <me@svmhdvn.name>
Subject:   git: ec640742e302 - main - lib/msun/tests: Remove newlines in ATF msgs
Message-ID:  <6942897a.c406.229d0e1c@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by lwhsu:

URL: https://cgit.FreeBSD.org/src/commit/?id=ec640742e30270098f8d982c1c0838f2dfde9ad5

commit ec640742e30270098f8d982c1c0838f2dfde9ad5
Author:     Siva Mahadevan <me@svmhdvn.name>
AuthorDate: 2025-10-01 15:13:08 +0000
Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
CommitDate: 2025-12-17 10:43:06 +0000

    lib/msun/tests: Remove newlines in ATF msgs
    
    This fixes broken test reports with the following message:
    
    lib/msun/fe_round_test:fe_round  ->  broken: Test result contains
    multiple lines: expected_failure:
    /usr/src/contrib/netbsd-tests/lib/libm/t_fe_round.c:95: Didn't get the
    same rounding mode out!<<NEWLINE>>(index 0) fed in 64 rounding mode, got
    0 out<<NEWLINE>>  [0.079s]
    
    Signed-off-by: Siva Mahadevan <me@svmhdvn.name>
    MFC after:      3 days
    Sponsored by:   The FreeBSD Foundation
    Pull Request:   https://github.com/freebsd/freebsd-src/pull/1871
---
 contrib/netbsd-tests/lib/libm/t_fe_round.c | 24 ++++++++++++------------
 lib/msun/tests/fmaxmin_test.c              |  2 +-
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/contrib/netbsd-tests/lib/libm/t_fe_round.c b/contrib/netbsd-tests/lib/libm/t_fe_round.c
index 33da289eb156..a7ee3bf77b98 100644
--- a/contrib/netbsd-tests/lib/libm/t_fe_round.c
+++ b/contrib/netbsd-tests/lib/libm/t_fe_round.c
@@ -80,15 +80,15 @@ ATF_TC_BODY(fe_round, tc)
 		received = lrint(values[i].input);
 		ATF_CHECK_MSG(
 		    (labs(received - values[i].expected) < EPSILON),
-		    "lrint rounding wrong, difference too large\n"
-		    "input: %f (index %d): got %ld, expected %ld\n",
+		    "lrint rounding wrong, difference too large. "
+		    "input: %f (index %d): got %ld, expected %ld",
 		    values[i].input, i, received, values[i].expected);
 
 		/* Do we get the same rounding mode out? */
 		ATF_CHECK_MSG(
 		    (fegetround() == values[i].round_mode),
-		    "Didn't get the same rounding mode out!\n"
-		    "(index %d) fed in %d rounding mode, got %d out\n",
+		    "Didn't get the same rounding mode out!. "
+		    "(index %d) fed in %d rounding mode, got %d out",
 		    i, values[i].round_mode, fegetround());
 	}
 }
@@ -109,15 +109,15 @@ ATF_TC_BODY(fe_nearbyint, tc)
 		received = nearbyint(values[i].input);
 		ATF_CHECK_MSG(
 		    (fabs(received - values[i].expected) < EPSILON),
-		    "nearbyint rounding wrong, difference too large\n"
-		    "input: %f (index %d): got %f, expected %ld\n",
+		    "nearbyint rounding wrong, difference too large. "
+		    "input: %f (index %d): got %f, expected %ld",
 		    values[i].input, i, received, values[i].expected);
 
 		/* Do we get the same rounding mode out? */
 		ATF_CHECK_MSG(
 		    (fegetround() == values[i].round_mode),
-		    "Didn't get the same rounding mode out!\n"
-		    "(index %d) fed in %d rounding mode, got %d out\n",
+		    "Didn't get the same rounding mode out! "
+		    "(index %d) fed in %d rounding mode, got %d out",
 		    i, values[i].round_mode, fegetround());
 	}
 }
@@ -151,8 +151,8 @@ ATF_TC_BODY(fe_nextafter, tc)
 		}
 		ATF_CHECK_MSG(
 			res && (fabs(received - values2[i].expected) < EPSILON),
-			"nextafter() rounding wrong, difference too large\n"
-			"input: %f (index %d): got %f, expected %f, res %d\n",
+			"nextafter() rounding wrong, difference too large. "
+			"input: %f (index %d): got %f, expected %f, res %d",
 			values2[i].input, i, received, values2[i].expected, res);
 	}
 }
@@ -177,8 +177,8 @@ ATF_TC_BODY(fe_nexttoward, tc)
 		}
 		ATF_CHECK_MSG(
 			res && (fabs(received - values2[i].expected) < EPSILON),
-			"nexttoward() rounding wrong, difference too large\n"
-			"input: %f (index %d): got %f, expected %f, res %d\n",
+			"nexttoward() rounding wrong, difference too large. "
+			"input: %f (index %d): got %f, expected %f, res %d",
 			values2[i].input, i, received, values2[i].expected, res);
 	}
 }
diff --git a/lib/msun/tests/fmaxmin_test.c b/lib/msun/tests/fmaxmin_test.c
index 51956b1084af..85a105a7f44f 100644
--- a/lib/msun/tests/fmaxmin_test.c
+++ b/lib/msun/tests/fmaxmin_test.c
@@ -50,7 +50,7 @@
 	CHECK_FP_EXCEPTIONS_MSG(0, ALL_STD_EXCEPT,			      \
 	    #func "(%.20Lg, %.20Lg) rmode%d", (x), (y), rmode);		      \
 	ATF_CHECK_MSG(fpequal_cs(__result, (expected), true),		      \
-	    #func "(%.20Lg, %.20Lg) rmode%d = %.20Lg, expected %.20Lg\n",     \
+	    #func "(%.20Lg, %.20Lg) rmode%d = %.20Lg, expected %.20Lg",       \
 	    (x), (y), rmode, __result, (expected));			      \
 } while (0)
 


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6942897a.c406.229d0e1c>