forked from OSchip/llvm-project
[MSAN] adjust Posix/timer.cpp
follow up to 0a4dec6cc2
.
add unsupported for s390 (SEGV)
restore line that s390 complains, so following asserts work.
Differential Revision: https://reviews.llvm.org/D121326
This commit is contained in:
parent
abc8ca65c3
commit
f2a9753680
|
@ -1,5 +1,7 @@
|
||||||
// RUN: %clangxx -O0 -g %s -o %t && %run %t
|
// RUN: %clangxx -O0 -g %s -o %t && %run %t
|
||||||
// UNSUPPORTED: darwin
|
// UNSUPPORTED: darwin
|
||||||
|
// FIXME: SEGV - API mismatch?
|
||||||
|
// UNSUPPORTED: s390
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdio.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_sec = new_value.it_value.tv_sec;
|
||||||
new_value.it_interval.tv_nsec = new_value.it_value.tv_nsec;
|
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;
|
struct itimerspec old_value;
|
||||||
assert(timer_settime(timerid, 0, &new_value, &old_value) == 0);
|
assert(timer_settime(timerid, 0, &new_value, &old_value) == 0);
|
||||||
assert(old_value.it_interval.tv_sec == new_value.it_interval.tv_sec);
|
assert(old_value.it_interval.tv_sec == new_value.it_interval.tv_sec);
|
||||||
|
|
Loading…
Reference in New Issue