]> sourceware.org Git - valgrind.git/commitdiff
Bug 433863 - s390x: Remove memcheck test cases for cs, cds, and csg
authorAndreas Arnez <arnez@linux.ibm.com>
Wed, 28 Apr 2021 16:52:30 +0000 (18:52 +0200)
committerAndreas Arnez <arnez@linux.ibm.com>
Wed, 28 Apr 2021 17:26:03 +0000 (19:26 +0200)
The fix for bug 429864 - "s390x: C++ atomic test_and_set yields
false-positive memcheck diagnostics" changes the memcheck behavior at
various compare-and-swap instructions.  The comparison between the old and
expected value now always yields a defined result, even if the input
values are (partially) undefined.  However, some existing test cases
explicitly verify that memcheck complains about the use of uninitialised
values here.  These test cases are no longer valid.  Remove them.

15 files changed:
.gitignore
NEWS
memcheck/tests/s390x/Makefile.am
memcheck/tests/s390x/cds.c [deleted file]
memcheck/tests/s390x/cds.stderr.exp [deleted file]
memcheck/tests/s390x/cds.stdout.exp [deleted file]
memcheck/tests/s390x/cds.vgtest [deleted file]
memcheck/tests/s390x/cs.c [deleted file]
memcheck/tests/s390x/cs.stderr.exp [deleted file]
memcheck/tests/s390x/cs.stdout.exp [deleted file]
memcheck/tests/s390x/cs.vgtest [deleted file]
memcheck/tests/s390x/csg.c [deleted file]
memcheck/tests/s390x/csg.stderr.exp [deleted file]
memcheck/tests/s390x/csg.stdout.exp [deleted file]
memcheck/tests/s390x/csg.vgtest [deleted file]

index b9fca3de32ef1e7aa6f3a41d4766331a303365bc..7e1b17ab6f8140b73a25663f503d30eec1be7b6b 100644 (file)
 /memcheck/tests/s390x/*.stdout.out
 /memcheck/tests/s390x/Makefile
 /memcheck/tests/s390x/Makefile.in
-/memcheck/tests/s390x/cs
-/memcheck/tests/s390x/csg
-/memcheck/tests/s390x/cds
 /memcheck/tests/s390x/cdsg
 /memcheck/tests/s390x/cu21
 /memcheck/tests/s390x/cu42
diff --git a/NEWS b/NEWS
index cd76b7ee55557a6019d8f238d043cad9dcc4b263..d41d529aab82a3342026a5550342eaafc8355e9e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -33,6 +33,7 @@ are not entered into bugzilla tend to get forgotten about or ignored.
 423963  Error in child thread when CLONE_PIDFD is used
 429375  PPC ISA 3.1 support is missing, part 9
 433801  PPC ISA 3.1 support is missing, part 10 (ISA 3.1 support complete)
+433863  s390x: memcheck/tests/s390x/{cds,cs,csg} failures
 
 To see details of a given bug, visit
   https://bugs.kde.org/show_bug.cgi?id=XXXXXX
index 67ae8c293498a9b3ff163aca4bba9bc290a8bb64..e4e69eb38a4c7380633a2adf8b43af3855812f62 100644 (file)
@@ -2,7 +2,7 @@ include $(top_srcdir)/Makefile.tool-tests.am
 
 dist_noinst_SCRIPTS = filter_stderr
 
-INSN_TESTS = cs csg cds cdsg cu21 cu42 ltgjhe
+INSN_TESTS = cdsg cu21 cu42 ltgjhe
 
 check_PROGRAMS = $(INSN_TESTS) 
 
@@ -14,7 +14,3 @@ EXTRA_DIST = \
 AM_CFLAGS    += @FLAG_M64@
 AM_CXXFLAGS  += @FLAG_M64@
 AM_CCASFLAGS += @FLAG_M64@
-
-cs_CFLAGS     = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@
-csg_CFLAGS    = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@
-cds_CFLAGS    = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@
diff --git a/memcheck/tests/s390x/cds.c b/memcheck/tests/s390x/cds.c
deleted file mode 100644 (file)
index ec5c533..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-#include <stdint.h>
-#include <stdio.h>
-
-typedef struct {
-   uint64_t high;
-   uint64_t low;
-} quad_word;
-
-void 
-test(quad_word op1_init, uint64_t op2_init, quad_word op3_init)
-{
-   int cc; // unused
-   quad_word op1 = op1_init;
-   uint64_t  op2 = op2_init;
-   quad_word op3 = op3_init;
-
-   __asm__ volatile (
-                     "lmg     %%r0,%%r1,%1\n\t"
-                     "lmg     %%r2,%%r3,%3\n\t"
-                     "cds     %%r0,%%r2,%2\n\t"  //  cds 1st,3rd,2nd
-                     "stmg    %%r0,%%r1,%1\n"    // store r0,r1 to op1
-                     "stmg    %%r2,%%r3,%3\n"    // store r2,r3 to op3
-                     : "=d" (cc), "+QS" (op1), "+QS" (op2), "+QS" (op3)
-                     :
-                     : "r0", "r1", "r2", "r3", "cc");
-
-}
-
-// Return a quad-word that only bits low[32:63] are undefined
-quad_word
-make_undefined(void)
-{
-   quad_word val;
-
-   val.high = 0;
-   val.low |= 0xFFFFFFFF00000000ull;
-
-   return val;
-}
-
-void op1_undefined(void)
-{
-   quad_word op1, op3;
-   uint64_t op2;
-
-   // op1 undefined
-   op1 = make_undefined();
-   op2 = 42;
-   op3.high = op3.low = 0xdeadbeefdeadbabeull;
-   test(op1, op2, op3);  // complaint
-}
-
-void op2_undefined(void)
-{
-   quad_word op1, op3;
-   uint64_t op2;
-
-   op1.high = op1.low = 42;
-   // op2 undefined
-   op3.high = op3.low = 0xdeadbeefdeadbabeull;
-   test(op1, op2, op3);  // complaint
-}
-
-void op3_undefined(void)
-{
-   quad_word op1, op3;
-   uint64_t op2;
-
-   op1.high = op1.low = 42;
-   op2 = 100;
-   op3 = make_undefined();
-   test(op1, op2, op3);  // no complaint; op3 is just copied around
-}
-
-int main ()
-{
-   op1_undefined();
-   op2_undefined();
-   op3_undefined();
-
-   return 0;
-}
diff --git a/memcheck/tests/s390x/cds.stderr.exp b/memcheck/tests/s390x/cds.stderr.exp
deleted file mode 100644 (file)
index e72de94..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-Conditional jump or move depends on uninitialised value(s)
-   at 0x........: test (cds.c:17)
-   by 0x........: op1_undefined (cds.c:50)
-   by 0x........: main (cds.c:77)
-
-Conditional jump or move depends on uninitialised value(s)
-   at 0x........: test (cds.c:17)
-   by 0x........: op2_undefined (cds.c:61)
-   by 0x........: main (cds.c:78)
-
diff --git a/memcheck/tests/s390x/cds.stdout.exp b/memcheck/tests/s390x/cds.stdout.exp
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/memcheck/tests/s390x/cds.vgtest b/memcheck/tests/s390x/cds.vgtest
deleted file mode 100644 (file)
index 5195887..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-prog: cds
-vgopts: -q
diff --git a/memcheck/tests/s390x/cs.c b/memcheck/tests/s390x/cs.c
deleted file mode 100644 (file)
index 9a298ce..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <stdint.h>
-#include <stdio.h>
-#include <string.h>
-
-void 
-test(int32_t op1_init, int32_t op2_init, int32_t op3_init)
-{
-   register int32_t op1 asm("8") = op1_init;
-   register int32_t op3 asm("9") = op3_init;
-   
-   int32_t op2 = op2_init;
-   int cc = 1; 
-
-   __asm__ volatile (
-           "cs      8,9,%1\n\t"
-           "ipm     %0\n\t"
-           "srl     %0,28\n\t"
-           : "=d" (cc), "+Q" (op2), "+d"(op1), "+d"(op3)
-           : 
-           : "cc");
-}
-
-int main ()
-{
-   int op1, op2, op3;
-
-   test(op1, 0x10000000, 0x12345678);   // complaint
-   test(0x10000000, op2, 0x12345678);   // complaint
-   test(0x10000000, 0x01000000, op3);   // no complaint
-
-   return 0;
-}
diff --git a/memcheck/tests/s390x/cs.stderr.exp b/memcheck/tests/s390x/cs.stderr.exp
deleted file mode 100644 (file)
index e45dc99..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Conditional jump or move depends on uninitialised value(s)
-   at 0x........: test (cs.c:14)
-   by 0x........: main (cs.c:27)
-
-Conditional jump or move depends on uninitialised value(s)
-   at 0x........: test (cs.c:14)
-   by 0x........: main (cs.c:28)
-
diff --git a/memcheck/tests/s390x/cs.stdout.exp b/memcheck/tests/s390x/cs.stdout.exp
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/memcheck/tests/s390x/cs.vgtest b/memcheck/tests/s390x/cs.vgtest
deleted file mode 100644 (file)
index 323cce8..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-prog: cs
-vgopts: -q
diff --git a/memcheck/tests/s390x/csg.c b/memcheck/tests/s390x/csg.c
deleted file mode 100644 (file)
index 7f9d8c8..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <stdint.h>
-#include <stdio.h>
-#include <string.h>
-
-void 
-test(int64_t op1_init, int64_t op2_init, int64_t op3_init)
-{
-   register int64_t op1 asm("8") = op1_init;
-   register int64_t op3 asm("9") = op3_init;
-   
-   int64_t op2 = op2_init;
-   int cc = 1; 
-
-   __asm__ volatile (
-           "csg     8,9,%1\n\t"
-           "ipm     %0\n\t"
-           "srl     %0,28\n\t"
-           : "=d" (cc), "+Q" (op2), "+d"(op1), "+d"(op3)
-           : 
-           : "cc");
-}
-
-int main ()
-{
-   int64_t op1, op2, op3;
-
-   test(op1, 0x1000000000000000ull, 0x1234567887654321ull);  // complaint
-   test(0x1000000000000000ull, op2, 0x1234567887654321ull);  // complaint
-   test(0x1000000000000000ull, 0x1000000000000000ull, op3);  // no complaint
-
-   return 0;
-}
diff --git a/memcheck/tests/s390x/csg.stderr.exp b/memcheck/tests/s390x/csg.stderr.exp
deleted file mode 100644 (file)
index fda2021..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Conditional jump or move depends on uninitialised value(s)
-   at 0x........: test (csg.c:14)
-   by 0x........: main (csg.c:27)
-
-Conditional jump or move depends on uninitialised value(s)
-   at 0x........: test (csg.c:14)
-   by 0x........: main (csg.c:28)
-
diff --git a/memcheck/tests/s390x/csg.stdout.exp b/memcheck/tests/s390x/csg.stdout.exp
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/memcheck/tests/s390x/csg.vgtest b/memcheck/tests/s390x/csg.vgtest
deleted file mode 100644 (file)
index 6de75c1..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-prog: csg
-vgopts: -q
This page took 0.054779 seconds and 5 git commands to generate.