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

[xen master] x86emul/test: improve failure location identification for FMA sub-test



commit 21b4d45bbfd0e901bb77dd8a732bb14702ccec5e
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Jun 23 09:38:58 2022 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Jun 23 09:38:58 2022 +0200

    x86emul/test: improve failure location identification for FMA sub-test
    
    When some FMA set of insns is included in the base instruction set (XOP,
    AVX512F, and AVX512-FP16 at present), simd_test() simply invokes
    fma_test(), negating its return value. In case of a failure this would
    yield a value close to 4G, which doesn't lend itself to easy
    identification of the failing test case. Recognize the case in
    simd_check_regs() and emit alternative output identifying FMA.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 tools/tests/x86_emulator/test_x86_emulator.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/tests/x86_emulator/test_x86_emulator.c 
b/tools/tests/x86_emulator/test_x86_emulator.c
index ac250c11c4..31586f8057 100644
--- a/tools/tests/x86_emulator/test_x86_emulator.c
+++ b/tools/tests/x86_emulator/test_x86_emulator.c
@@ -259,7 +259,10 @@ static bool simd_check_regs(const struct cpu_user_regs 
*regs)
 {
     if ( !regs->eax )
         return true;
-    printf("[line %u] ", (unsigned int)regs->eax);
+    if ( (int)regs->eax > 0 )
+        printf("[line %u] ", (unsigned int)regs->eax);
+    else
+        printf("[FMA line %u] ", (unsigned int)-regs->eax);
     return false;
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.