mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-04 02:18:37 +00:00
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.
This commit is contained in:
parent
45873298ff
commit
d74a637206
3
.gitignore
vendored
3
.gitignore
vendored
@ -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
|
||||
|
||||
1
NEWS
1
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
|
||||
|
||||
@ -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@
|
||||
|
||||
@ -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;
|
||||
}
|
||||
@ -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)
|
||||
|
||||
@ -1,2 +0,0 @@
|
||||
prog: cds
|
||||
vgopts: -q
|
||||
@ -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;
|
||||
}
|
||||
@ -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)
|
||||
|
||||
@ -1,2 +0,0 @@
|
||||
prog: cs
|
||||
vgopts: -q
|
||||
@ -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;
|
||||
}
|
||||
@ -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)
|
||||
|
||||
@ -1,2 +0,0 @@
|
||||
prog: csg
|
||||
vgopts: -q
|
||||
Loading…
x
Reference in New Issue
Block a user