[compiler-rt] f2a9753 - [MSAN] adjust Posix/timer.cpp

Kevin Athey via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 9 13:02:14 PST 2022


Author: Kevin Athey
Date: 2022-03-09T13:02:08-08:00
New Revision: f2a97536809588f1748d32d2e79c9a2a6b4ec335

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

LOG: [MSAN] adjust Posix/timer.cpp

follow up to 0a4dec6cc2bf.
add unsupported for s390 (SEGV)
restore line that s390 complains, so following asserts work.

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

Added: 
    

Modified: 
    compiler-rt/test/sanitizer_common/TestCases/Posix/timer.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/sanitizer_common/TestCases/Posix/timer.cpp b/compiler-rt/test/sanitizer_common/TestCases/Posix/timer.cpp
index 1c5f17cf09239..8a9652c4534fc 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/Posix/timer.cpp
+++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/timer.cpp
@@ -1,5 +1,7 @@
 // RUN: %clangxx -O0 -g %s -o %t && %run %t
 // UNSUPPORTED: darwin
+// FIXME: SEGV - API mismatch?
+// UNSUPPORTED: s390
 #include <assert.h>
 #include <signal.h>
 #include <stdio.h>
@@ -18,6 +20,8 @@ int main(int argc, char **argv) {
   new_value.it_interval.tv_sec = new_value.it_value.tv_sec;
   new_value.it_interval.tv_nsec = new_value.it_value.tv_nsec;
 
+  assert(timer_settime(timerid, 0, &new_value, nullptr) == 0);
+
   struct itimerspec old_value;
   assert(timer_settime(timerid, 0, &new_value, &old_value) == 0);
   assert(old_value.it_interval.tv_sec == new_value.it_interval.tv_sec);


        


More information about the llvm-commits mailing list