Skip to content

Commit

Permalink
Fix test failures caused by differing allocate_data_section call coun…
Browse files Browse the repository at this point in the history
…ts across LLVM versions
  • Loading branch information
ktanaka101 committed Jan 26, 2025
1 parent 4e6d86a commit ba33e2b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/all/test_execution_engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,12 @@ fn test_mcjit_execution_engine_with_memory_manager() {

let data = mmgr_for_test.data.borrow();
assert_eq!(1, data.code_alloc_calls);
assert_eq!(2, data.data_alloc_calls);
assert!(
data.data_alloc_calls >= 2,
"Expected at least 2 calls to allocate_data_section, but got {}. \
We've observed that LLVM 5 typically calls it 3 times, while LLVM 18 often calls it only 2.",
data.data_alloc_calls
);
assert_eq!(1, data.finalize_calls);
assert_eq!(1, data.destroy_calls);
}
Expand Down

0 comments on commit ba33e2b

Please sign in to comment.