[compiler-rt] 79aed89 - tsan: fix unused var warnings in a test
Dmitry Vyukov via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 16 04:13:29 PDT 2021
Author: Dmitry Vyukov
Date: 2021-08-16T13:13:23+02:00
New Revision: 79aed89ea3af606901ff716c38796bee43a765c0
URL: https://github.com/llvm/llvm-project/commit/79aed89ea3af606901ff716c38796bee43a765c0
DIFF: https://github.com/llvm/llvm-project/commit/79aed89ea3af606901ff716c38796bee43a765c0.diff
LOG: tsan: fix unused var warnings in a test
Reviewed By: melver
Differential Revision: https://reviews.llvm.org/D108118
Added:
Modified:
compiler-rt/lib/tsan/tests/unit/tsan_trace_test.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/tsan/tests/unit/tsan_trace_test.cpp b/compiler-rt/lib/tsan/tests/unit/tsan_trace_test.cpp
index 6e598323345ea..571fc0ab04b87 100644
--- a/compiler-rt/lib/tsan/tests/unit/tsan_trace_test.cpp
+++ b/compiler-rt/lib/tsan/tests/unit/tsan_trace_test.cpp
@@ -152,6 +152,7 @@ TEST(Trace, RestoreMutexLock) {
uptr tag = kExternalTagNone;
bool res = RestoreStack(thr->tid, v3::EventType::kLock, thr->sid,
thr->epoch, 0x5001, 0, 0, &stk, &mset, &tag);
+ CHECK(res);
CHECK_EQ(stk.size, 2);
CHECK_EQ(stk.trace[0], 0x1000);
CHECK_EQ(stk.trace[1], 0x4002);
@@ -194,6 +195,7 @@ TEST(Trace, MultiPart) {
bool res =
RestoreStack(thr->tid, v3::EventType::kAccessExt, thr->sid,
thr->epoch, 0x3000, 8, kAccessRead, &stk, &mset, &tag);
+ CHECK(res);
CHECK_EQ(stk.size, 4);
CHECK_EQ(stk.trace[0], 0x1000);
CHECK_EQ(stk.trace[1], 0x2000);
More information about the llvm-commits
mailing list