[OpenMP][OMPT] Expect failure from tool_available_search.c on macOS
authorShilei Tian <i@tianshilei.me>
Thu, 19 Jan 2023 01:08:59 +0000 (20:08 -0500)
committerShilei Tian <i@tianshilei.me>
Thu, 19 Jan 2023 01:09:06 +0000 (20:09 -0500)
D91464 introduced verbose tool loading, but the test check only considers Linux.
On macOS, the outputs are totally different, causing the regression afterwards.
This patch simply sets the test to XFAIL on macOS.

Fix #56833.

Reviewed By: jdoerfert

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

openmp/runtime/test/lit.cfg
openmp/runtime/test/ompt/loadtool/tool_available_search/tool_available_search.c

index f49f39a..5e429d5 100644 (file)
@@ -105,6 +105,9 @@ if 'Linux' in config.operating_system:
 if config.operating_system == 'NetBSD':
     config.available_features.add("netbsd")
 
+if config.operating_system == 'Darwin':
+    config.available_features.add("darwin")
+
 if config.operating_system in ['Linux', 'Windows']:
     config.available_features.add('affinity')
 
index e8823df..48c9a8a 100644 (file)
@@ -6,11 +6,12 @@
 // RUN: OMP_TOOL_VERBOSE_INIT=stdout %libomp-run | FileCheck %s -DPARENTPATH=%T
 
 // REQUIRES: ompt
+// XFAIL: darwin
 
 /*
- *  This file contains code for three OMPT shared library tool to be 
- *  loaded and the code for the OpenMP executable. 
- *  No option enables code for the first shared library 
+ *  This file contains code for three OMPT shared library tool to be
+ *  loaded and the code for the OpenMP executable.
+ *  No option enables code for the first shared library
  *  (without an implementation of ompt_start_tool) during compilation
  *  -DTOOL -DSECOND_TOOL enables the code for the second tool during compilation
  *  -DTOOL -DTHIRD_TOOL enables the code for the third tool during compilation
@@ -45,7 +46,7 @@
 
 // Check if libomp supports the callbacks for this test.
 
-// CHECK-NOT: {{^}}0: Could not register callback 
+// CHECK-NOT: {{^}}0: Could not register callback
 // CHECK: {{^}}0: Tool initialized
 // CHECK: {{^}}0: ompt_event_thread_begin
 // CHECK-DAG: {{^}}0: ompt_event_thread_begin
@@ -90,7 +91,7 @@ ompt_start_tool_result_t* ompt_start_tool(
   return NULL;
 }
 #elif defined(THIRD_TOOL)
-// The third tool has an implementation of ompt_start_tool that returns a 
+// The third tool has an implementation of ompt_start_tool that returns a
 // pointer to a valid instance of ompt_start_tool_result_t
 
 static void