[flang-commits] [flang] b9c876d - [flang][test] fix sporadically failing test (#134608)

via flang-commits flang-commits at lists.llvm.org
Mon Apr 7 04:10:47 PDT 2025


Author: Tom Eccles
Date: 2025-04-07T12:10:43+01:00
New Revision: b9c876dd9a3334a26f1cc975b23a91821895aa16

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

LOG: [flang][test] fix sporadically failing test (#134608)

The test is checking output from MLIR debug prints. MLIR passes can be
executed in parallel, for example a pass on func.func might schedule
different func.func operations in different threads. This led to
intermittent test failures where debug output from different threads
became mixed up.

Fix by disabling mlir multithreading for this test.

Added: 
    

Modified: 
    flang/test/Transforms/DoConcurrent/loop_nest_test.f90

Removed: 
    


################################################################################
diff  --git a/flang/test/Transforms/DoConcurrent/loop_nest_test.f90 b/flang/test/Transforms/DoConcurrent/loop_nest_test.f90
index 0d21b31519728..32bed61fe69e4 100644
--- a/flang/test/Transforms/DoConcurrent/loop_nest_test.f90
+++ b/flang/test/Transforms/DoConcurrent/loop_nest_test.f90
@@ -3,7 +3,7 @@
 ! REQUIRES: asserts
 
 ! RUN: %flang_fc1 -emit-hlfir  -fopenmp -fdo-concurrent-to-openmp=host \
-! RUN:   -mmlir -debug %s -o - 2> %t.log || true
+! RUN:   -mmlir -debug -mmlir -mlir-disable-threading %s -o - 2> %t.log || true
 
 ! RUN: FileCheck %s < %t.log
 


        


More information about the flang-commits mailing list