Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/tests/lib/libm



Module Name:    src
Committed By:   riastradh
Date:           Sun Jun  9 16:53:12 UTC 2024

Modified Files:
        src/tests/lib/libm: t_cos.c t_log.c t_scalbn.c t_sin.c t_tan.c

Log Message:
tests/lib/libm: Fix various xfails related to PR lib/45362.

Writing

        if (condition) {
                atf_tc_expect_fail(...);
                atf_tc_fail(...);
        }

in order to paper over a bug in qemu renders the test nearly useless
because it will never actually fail in the event that something
unexpected is broken.

atf_tc_expect_fail only makes senes _before_ doing the test.  If we
want to paper over a bug in qemu, we can do:

        if (isQEMU)
                atf_tc_expect_fail("qemu is broken, PR lib/...");
        ATF_CHECK(condition);

That way, we are still doing the test in non-qemu circumstances, and
if the qemu bug is fixed the test will give the feedback of an
unexpected pass.

While here: Use `volatile double x = ...' as input so the compiler
doesn't optimize calls like sin(x) away at build-time, and print the
bad values with ATF_CHECK_MSG on failure in case anything goes wrong.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tests/lib/libm/t_cos.c
cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libm/t_log.c
cvs rdiff -u -r1.17 -r1.18 src/tests/lib/libm/t_scalbn.c
cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libm/t_sin.c \
    src/tests/lib/libm/t_tan.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index