[all-commits] [llvm/llvm-project] 837dab: [libc] Make fenv and math tests preserve fenv_t st...
Roland McGrath via All-commits
all-commits at lists.llvm.org
Tue Apr 23 13:21:47 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 837dab96d6f5bece79fd58d28ea2e6f7c0912493
https://github.com/llvm/llvm-project/commit/837dab96d6f5bece79fd58d28ea2e6f7c0912493
Author: Roland McGrath <mcgrathr at google.com>
Date: 2024-04-23 (Tue, 23 Apr 2024)
Changed paths:
M libc/test/UnitTest/CMakeLists.txt
A libc/test/UnitTest/FEnvSafeTest.cpp
A libc/test/UnitTest/FEnvSafeTest.h
M libc/test/src/fenv/CMakeLists.txt
M libc/test/src/fenv/enabled_exceptions_test.cpp
M libc/test/src/fenv/exception_flags_test.cpp
M libc/test/src/fenv/exception_status_test.cpp
A libc/test/src/fenv/excepts.h
M libc/test/src/fenv/feclearexcept_test.cpp
M libc/test/src/fenv/feenableexcept_test.cpp
M libc/test/src/fenv/feholdexcept_test.cpp
M libc/test/src/fenv/feupdateenv_test.cpp
M libc/test/src/fenv/getenv_and_setenv_test.cpp
M libc/test/src/fenv/rounding_mode_test.cpp
M libc/test/src/math/CeilTest.h
M libc/test/src/math/CopySignTest.h
M libc/test/src/math/FAbsTest.h
M libc/test/src/math/FDimTest.h
M libc/test/src/math/FMaxTest.h
M libc/test/src/math/FMinTest.h
M libc/test/src/math/FModTest.h
M libc/test/src/math/FloorTest.h
M libc/test/src/math/FmaTest.h
M libc/test/src/math/FrexpTest.h
M libc/test/src/math/HypotTest.h
M libc/test/src/math/ILogbTest.h
M libc/test/src/math/LdExpTest.h
M libc/test/src/math/LogbTest.h
M libc/test/src/math/ModfTest.h
M libc/test/src/math/NextAfterTest.h
M libc/test/src/math/RIntTest.h
M libc/test/src/math/RemQuoTest.h
M libc/test/src/math/RoundEvenTest.h
M libc/test/src/math/RoundTest.h
M libc/test/src/math/RoundToIntegerTest.h
M libc/test/src/math/SqrtTest.h
M libc/test/src/math/TruncTest.h
M libc/test/src/math/exhaustive/fmod_generic_impl_test.cpp
M libc/test/src/math/smoke/CanonicalizeTest.h
M libc/test/src/math/smoke/CeilTest.h
M libc/test/src/math/smoke/CopySignTest.h
M libc/test/src/math/smoke/FAbsTest.h
M libc/test/src/math/smoke/FDimTest.h
M libc/test/src/math/smoke/FMaxTest.h
M libc/test/src/math/smoke/FMaximumMagNumTest.h
M libc/test/src/math/smoke/FMaximumMagTest.h
M libc/test/src/math/smoke/FMaximumNumTest.h
M libc/test/src/math/smoke/FMaximumTest.h
M libc/test/src/math/smoke/FMinTest.h
M libc/test/src/math/smoke/FMinimumMagNumTest.h
M libc/test/src/math/smoke/FMinimumMagTest.h
M libc/test/src/math/smoke/FMinimumNumTest.h
M libc/test/src/math/smoke/FMinimumTest.h
M libc/test/src/math/smoke/FModTest.h
M libc/test/src/math/smoke/FloorTest.h
M libc/test/src/math/smoke/FmaTest.h
M libc/test/src/math/smoke/FrexpTest.h
M libc/test/src/math/smoke/FromfpTest.h
M libc/test/src/math/smoke/FromfpxTest.h
M libc/test/src/math/smoke/HypotTest.h
M libc/test/src/math/smoke/ILogbTest.h
M libc/test/src/math/smoke/LdExpTest.h
M libc/test/src/math/smoke/LogbTest.h
M libc/test/src/math/smoke/ModfTest.h
M libc/test/src/math/smoke/NextAfterTest.h
M libc/test/src/math/smoke/NextDownTest.h
M libc/test/src/math/smoke/NextTowardTest.h
M libc/test/src/math/smoke/NextUpTest.h
M libc/test/src/math/smoke/RIntTest.h
M libc/test/src/math/smoke/RemQuoTest.h
M libc/test/src/math/smoke/RoundEvenTest.h
M libc/test/src/math/smoke/RoundTest.h
M libc/test/src/math/smoke/RoundToIntegerTest.h
M libc/test/src/math/smoke/SqrtTest.h
M libc/test/src/math/smoke/TruncTest.h
M libc/test/src/math/smoke/UfromfpTest.h
M libc/test/src/math/smoke/UfromfpxTest.h
M libc/test/src/math/smoke/nan_test.cpp
M libc/test/src/math/smoke/nanf128_test.cpp
M libc/test/src/math/smoke/nanf_test.cpp
M libc/test/src/math/smoke/nanl_test.cpp
M utils/bazel/llvm-project-overlay/libc/test/UnitTest/BUILD.bazel
Log Message:
-----------
[libc] Make fenv and math tests preserve fenv_t state (#89658)
This adds a new test fixture class FEnvSafeTest (usable as a base
class for other fixtures) that ensures each test doesn't perturb
the `fenv_t` state that the next test will start with. It also
provides types and methods tests can use to explicitly wrap code
under test either to check that it doesn't perturb the state or
to save and restore the state around particular test code.
All the fenv and math tests are updated to use this so that none
can affect another. Expectations that code under test and/or
tests themselves don't perturb state can be added later.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list