NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-i386/56528: x86_fpregs_fpu_write, x86_xstate_fpu_write test cases fail
>Number: 56528
>Category: port-i386
>Synopsis: x86_fpregs_fpu_write, x86_xstate_fpu_write test cases fail
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: port-i386-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 29 11:40:00 +0000 2021
>Originator: Andreas Gustafsson
>Release: NetBSD-current
>Organization:
>Environment:
System: NetBSD
Architecture: i386
Machine: i386
>Description:
When I run the ATF tests on NetBSD/i386 under "qemu -accel nvmm" on my
own testbed, the x86_fpregs_fpu_write and x86_xstate_fpu_write test
cases of multiple lib/libc/sys/t_ptrace_wait* tests fail, and have
done so ever since the tests in case were created. Logs from a recent
failure are here:
https://www.gson.org/netbsd/bugs/build/i386/2021/2021.11.28.10.01.36/test.html#failed-tcs-summary
The error messages is:
t_ptrace_wait: /tmp/build/2021.11.28.10.01.36-i386/src/tests/lib/libc/sys/t_ptrace_x86_wait.h:3327 x86_register_test(): Assertion failed for: vals_fpu.ip.fa_64 == expected_fpu.ip.fa_64: Undefined error: 0
Strangely, they do not fail on the TNF testbed even though it's a fairly
similar setup. Some of the differences are:
My testbed: NetBSD/amd64 9.2, qemu-6.1.0nb4, Intel Xeon E5-2678 v3
TNF testbed: NetBSD/amd64 9.0_STABLE, qemu-6.0.0nb2, AMD EPYC 7402P
To see the unexpectedly-unequal values, I applied this patch:
Index: t_ptrace_x86_wait.h
===================================================================
RCS file: /cvsroot/src/tests/lib/libc/sys/t_ptrace_x86_wait.h,v
retrieving revision 1.31
diff -u -r1.31 t_ptrace_x86_wait.h
--- t_ptrace_x86_wait.h 27 Oct 2020 08:32:36 -0000 1.31
+++ t_ptrace_x86_wait.h 29 Nov 2021 11:25:49 -0000
@@ -3324,8 +3324,8 @@
FORKEE_ASSERT(vals_fpu.tw == expected_fpu.tw);
FORKEE_ASSERT(vals_fpu.tw_abridged
== expected_fpu.tw_abridged);
- FORKEE_ASSERT(vals_fpu.ip.fa_64
- == expected_fpu.ip.fa_64);
+ FORKEE_ASSERT_EQ(vals_fpu.ip.fa_64,
+ expected_fpu.ip.fa_64);
FORKEE_ASSERT(vals_fpu.dp.fa_64
== expected_fpu.dp.fa_64);
This gives a slightly more informative error message:
t_ptrace_wait: /tmp/build/2021.11.28.10.01.36-i386-run-000033/src/tests/lib/libc/sys/t_ptrace_x86_wait.h:3327 x86_register_test(): Assertion failed for: vals_fpu.ip.fa_64(1985229328) == expected_fpu.ip.fa_64(11649936536080)
Converting the values to hex:
(gdb) print /x 1985229328
$1 = 0x76543210
(gdb) print /x 11649936536080
$2 = 0xa9876543210
it looks like the top half of the 64-bit value is being unexpectedly cleared.
>How-To-Repeat:
>Fix:
Home |
Main Index |
Thread Index |
Old Index