diff options
author | Joachim Protze <protze@itc.rwth-aachen.de> | 2017-12-21 14:36:36 +0000 |
---|---|---|
committer | Joachim Protze <protze@itc.rwth-aachen.de> | 2017-12-21 14:36:36 +0000 |
commit | e8d84a67c2c5fb0219251c5f4112a77a7260f554 (patch) | |
tree | fcf6a69b60563ec3685fa68bd606bb90c2b64b94 | |
parent | f375f4b49a72cf11e512aeaf25c2944d3d0b0a67 (diff) | |
download | bcm5719-llvm-e8d84a67c2c5fb0219251c5f4112a77a7260f554.tar.gz bcm5719-llvm-e8d84a67c2c5fb0219251c5f4112a77a7260f554.zip |
Add missing test case from D41171 commit
llvm-svn: 321270
-rw-r--r-- | openmp/runtime/test/ompt/misc/unset_callback.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/openmp/runtime/test/ompt/misc/unset_callback.c b/openmp/runtime/test/ompt/misc/unset_callback.c new file mode 100644 index 00000000000..9074ad32726 --- /dev/null +++ b/openmp/runtime/test/ompt/misc/unset_callback.c @@ -0,0 +1,29 @@ +// RUN: %libomp-compile-and-run | FileCheck %s +// REQUIRES: ompt +#include "callback.h" +#include <omp.h> + +int main() +{ + #pragma omp parallel num_threads(1) + { + + } + ompt_set_callback(ompt_callback_parallel_begin, NULL); + #pragma omp parallel num_threads(1) + { + + } + + // Check if libomp supports the callbacks for this test. + // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_idle' + + // CHECK: 0: NULL_POINTER=[[NULL:.*$]] + + // CHECK: {{^}}[[THREAD_ID:[0-9]+]]: ompt_event_parallel_begin: + // CHECK: {{^}}[[THREAD_ID]]: ompt_event_parallel_end: + // CHECK-NOT: {{^}}[[THREAD_ID]]: ompt_event_parallel_begin: + // CHECK: {{^}}[[THREAD_ID]]: ompt_event_parallel_end: + + return 0; +} |