From: Andreas Arnez Date: Wed, 28 Apr 2021 16:52:30 +0000 (+0200) Subject: Bug 433863 - s390x: Remove memcheck test cases for cs, cds, and csg X-Git-Tag: VALGRIND_3_18_0~134 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d74a637206ef5532ccd2ccb2e31ee2762f184e60;p=thirdparty%2Fvalgrind.git Bug 433863 - s390x: Remove memcheck test cases for cs, cds, and csg 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. --- diff --git a/.gitignore b/.gitignore index b9fca3de32..7e1b17ab6f 100644 --- a/.gitignore +++ b/.gitignore @@ -1114,9 +1114,6 @@ /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 cd76b7ee55..d41d529aab 100644 --- 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 diff --git a/memcheck/tests/s390x/Makefile.am b/memcheck/tests/s390x/Makefile.am index 67ae8c2934..e4e69eb38a 100644 --- a/memcheck/tests/s390x/Makefile.am +++ b/memcheck/tests/s390x/Makefile.am @@ -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 index ec5c533e07..0000000000 --- a/memcheck/tests/s390x/cds.c +++ /dev/null @@ -1,82 +0,0 @@ -#include -#include - -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 index e72de94c82..0000000000 --- a/memcheck/tests/s390x/cds.stderr.exp +++ /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 index e69de29bb2..0000000000 diff --git a/memcheck/tests/s390x/cds.vgtest b/memcheck/tests/s390x/cds.vgtest deleted file mode 100644 index 5195887e26..0000000000 --- a/memcheck/tests/s390x/cds.vgtest +++ /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 index 9a298cef9b..0000000000 --- a/memcheck/tests/s390x/cs.c +++ /dev/null @@ -1,32 +0,0 @@ -#include -#include -#include - -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 index e45dc99cd0..0000000000 --- a/memcheck/tests/s390x/cs.stderr.exp +++ /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 index e69de29bb2..0000000000 diff --git a/memcheck/tests/s390x/cs.vgtest b/memcheck/tests/s390x/cs.vgtest deleted file mode 100644 index 323cce80c1..0000000000 --- a/memcheck/tests/s390x/cs.vgtest +++ /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 index 7f9d8c88e1..0000000000 --- a/memcheck/tests/s390x/csg.c +++ /dev/null @@ -1,32 +0,0 @@ -#include -#include -#include - -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 index fda2021cef..0000000000 --- a/memcheck/tests/s390x/csg.stderr.exp +++ /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 index e69de29bb2..0000000000 diff --git a/memcheck/tests/s390x/csg.vgtest b/memcheck/tests/s390x/csg.vgtest deleted file mode 100644 index 6de75c1d65..0000000000 --- a/memcheck/tests/s390x/csg.vgtest +++ /dev/null @@ -1,2 +0,0 @@ -prog: csg -vgopts: -q