From owner-dev-commits-src-branches@freebsd.org Thu Apr 22 11:08:32 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1D3D15EBE1E; Thu, 22 Apr 2021 11:08:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FQvmb6WlWz3ky3; Thu, 22 Apr 2021 11:08:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 45DFE188CD; Thu, 22 Apr 2021 11:08:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13MB8VJ9088734; Thu, 22 Apr 2021 11:08:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13MB8Viw088733; Thu, 22 Apr 2021 11:08:31 GMT (envelope-from git) Date: Thu, 22 Apr 2021 11:08:31 GMT Message-Id: <202104221108.13MB8Viw088733@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alex Richardson Subject: git: 78fa908b1e88 - stable/13 - lib/msun/tests: Add more debug output to fenv_test.c MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 78fa908b1e88f78160664e93560b9ac78caecc53 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 11:08:32 -0000 The branch stable/13 has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=78fa908b1e88f78160664e93560b9ac78caecc53 commit 78fa908b1e88f78160664e93560b9ac78caecc53 Author: Alex Richardson AuthorDate: 2021-03-04 18:41:06 +0000 Commit: Alex Richardson CommitDate: 2021-04-22 09:44:51 +0000 lib/msun/tests: Add more debug output to fenv_test.c Output a hex dump of the current fenv and the expected value to allow comparing them without having to resort to interactive use of GDB. (cherry picked from commit 6ccdee8ab576577224fb9e4baed05bd0efe933fd) --- lib/msun/tests/Makefile | 1 + lib/msun/tests/fenv_test.c | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/msun/tests/Makefile b/lib/msun/tests/Makefile index 4ef25c0a909a..7da1944c8ed8 100644 --- a/lib/msun/tests/Makefile +++ b/lib/msun/tests/Makefile @@ -86,6 +86,7 @@ IGNORE_PRAGMA= SRCS.ilogb2_test= ilogb_test.c +LIBADD.fenv_test+= util LIBADD+= m WARNS?= 6 diff --git a/lib/msun/tests/fenv_test.c b/lib/msun/tests/fenv_test.c index f275f0725504..aafdd32b7fbd 100644 --- a/lib/msun/tests/fenv_test.c +++ b/lib/msun/tests/fenv_test.c @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -173,7 +174,10 @@ ATF_TC_BODY(dfl_env, tc) fenv_t env; fegetenv(&env); - + /* Print the default environment for debugging purposes. */ + hexdump(&env, sizeof(env), "current fenv ", HD_OMIT_CHARS); + hexdump(FE_DFL_ENV, sizeof(env), "default fenv ", HD_OMIT_CHARS); + CHECK_FP_EXCEPTIONS(0, FE_ALL_EXCEPT); #ifdef __amd64__ /* * Compare the fields that the AMD [1] and Intel [2] specs say will be @@ -202,7 +206,7 @@ ATF_TC_BODY(dfl_env, tc) #endif #endif - ATF_CHECK_EQ(0, fetestexcept(FE_ALL_EXCEPT)); + CHECK_FP_EXCEPTIONS(0, FE_ALL_EXCEPT); } /*