[Openmp-commits] [openmp] r321270 - Add missing test case from D41171 commit
Joachim Protze via Openmp-commits
openmp-commits at lists.llvm.org
Thu Dec 21 06:36:36 PST 2017
Author: jprotze
Date: Thu Dec 21 06:36:36 2017
New Revision: 321270
URL: http://llvm.org/viewvc/llvm-project?rev=321270&view=rev
Log:
Add missing test case from D41171 commit
Added:
openmp/trunk/runtime/test/ompt/misc/unset_callback.c
Added: openmp/trunk/runtime/test/ompt/misc/unset_callback.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/ompt/misc/unset_callback.c?rev=321270&view=auto
==============================================================================
--- openmp/trunk/runtime/test/ompt/misc/unset_callback.c (added)
+++ openmp/trunk/runtime/test/ompt/misc/unset_callback.c Thu Dec 21 06:36:36 2017
@@ -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;
+}
More information about the Openmp-commits
mailing list