[Lldb-commits] [lldb] 37d4d3b - [lldb] [test/Register] Use initial state for write tests

Michał Górny via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 26 03:56:17 PDT 2020


Author: Michał Górny
Date: 2020-10-26T11:54:00+01:00
New Revision: 37d4d3bb4daf409102237132ae8e1db250da83be

URL: https://github.com/llvm/llvm-project/commit/37d4d3bb4daf409102237132ae8e1db250da83be
DIFF: https://github.com/llvm/llvm-project/commit/37d4d3bb4daf409102237132ae8e1db250da83be.diff

LOG: [lldb] [test/Register] Use initial state for write tests

Reset registers to their 'initial' state instead of a semi-random
pattern in write tests.  While the latter might have been helpful
while debugging failures (i.e. to distinguish unmodified registers
from mistakenly written zeroes), the former makes it possible to test
whether xstate_bv field is written correctly when using XSAVE.

With this change, the four relevant tests start failing on NetBSD
without D90105.

Differential Revision: https://reviews.llvm.org/D90114

Added: 
    

Modified: 
    lldb/test/Shell/Register/Inputs/x86-64-write.cpp
    lldb/test/Shell/Register/Inputs/x86-mm-xmm-write.cpp
    lldb/test/Shell/Register/Inputs/x86-ymm-write.cpp
    lldb/test/Shell/Register/Inputs/x86-zmm-write.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/test/Shell/Register/Inputs/x86-64-write.cpp b/lldb/test/Shell/Register/Inputs/x86-64-write.cpp
index 056f2ebe2138..143805c5c0f9 100644
--- a/lldb/test/Shell/Register/Inputs/x86-64-write.cpp
+++ b/lldb/test/Shell/Register/Inputs/x86-64-write.cpp
@@ -9,7 +9,7 @@ union alignas(16) xmm_t {
 
 int main() {
   constexpr xmm_t xmm_fill = {
-    .as_uint64 = { 0x0F0F0F0F0F0F0F0F, 0x0F0F0F0F0F0F0F0F }
+    .as_uint64 = { 0, 0 }
   };
 
   uint64_t r64[8];

diff  --git a/lldb/test/Shell/Register/Inputs/x86-mm-xmm-write.cpp b/lldb/test/Shell/Register/Inputs/x86-mm-xmm-write.cpp
index 631d6f3a513a..c6b84d9232bd 100644
--- a/lldb/test/Shell/Register/Inputs/x86-mm-xmm-write.cpp
+++ b/lldb/test/Shell/Register/Inputs/x86-mm-xmm-write.cpp
@@ -9,7 +9,7 @@ union alignas(16) xmm_t {
 
 int main() {
   constexpr xmm_t xmm_fill = {
-    .as_uint64 = { 0x0F0F0F0F0F0F0F0F, 0x0F0F0F0F0F0F0F0F }
+    .as_uint64 = { 0, 0 }
   };
 
   uint64_t mm[8];

diff  --git a/lldb/test/Shell/Register/Inputs/x86-ymm-write.cpp b/lldb/test/Shell/Register/Inputs/x86-ymm-write.cpp
index 3375853291ed..0798e52467aa 100644
--- a/lldb/test/Shell/Register/Inputs/x86-ymm-write.cpp
+++ b/lldb/test/Shell/Register/Inputs/x86-ymm-write.cpp
@@ -9,8 +9,7 @@ union alignas(32) ymm_t {
 
 int main() {
   constexpr ymm_t ymm_fill = {
-    .as_uint64 = { 0x0F0F0F0F0F0F0F0F, 0x0F0F0F0F0F0F0F0F,
-                   0x0F0F0F0F0F0F0F0F, 0x0F0F0F0F0F0F0F0F }
+    .as_uint64 = { 0, 0, 0, 0 }
   };
 
   ymm_t ymm[16];

diff  --git a/lldb/test/Shell/Register/Inputs/x86-zmm-write.cpp b/lldb/test/Shell/Register/Inputs/x86-zmm-write.cpp
index 4830fb2a7424..c7b3e3f1bcb2 100644
--- a/lldb/test/Shell/Register/Inputs/x86-zmm-write.cpp
+++ b/lldb/test/Shell/Register/Inputs/x86-zmm-write.cpp
@@ -9,10 +9,7 @@ union alignas(64) zmm_t {
 
 int main() {
   constexpr zmm_t zmm_fill = {
-    .as_uint64 = { 0x0F0F0F0F0F0F0F0F, 0x0F0F0F0F0F0F0F0F,
-                   0x0F0F0F0F0F0F0F0F, 0x0F0F0F0F0F0F0F0F,
-                   0x0F0F0F0F0F0F0F0F, 0x0F0F0F0F0F0F0F0F,
-                   0x0F0F0F0F0F0F0F0F, 0x0F0F0F0F0F0F0F0F }
+    .as_uint64 = { 0, 0, 0, 0, 0, 0, 0, 0 }
   };
 
   zmm_t zmm[32];


        


More information about the lldb-commits mailing list