diff --git a/fix-test-error-when-allocSize-not-equal-HUGE_PAGE_SI.patch b/fix-test-error-when-allocSize-not-equal-HUGE_PAGE_SI.patch new file mode 100644 index 0000000000000000000000000000000000000000..9b810dba122ed9d7f21cacb1bbec36c562d8b97a --- /dev/null +++ b/fix-test-error-when-allocSize-not-equal-HUGE_PAGE_SI.patch @@ -0,0 +1,32 @@ +From 117f6813115bf9f3001002c907bc887db6b8d092 Mon Sep 17 00:00:00 2001 +From: Wenlong Zhang +Date: Fri, 9 May 2025 06:05:49 +0000 +Subject: [PATCH] fix test error when allocSize not equal HUGE_PAGE_SIZE + +https://github.com/uxlfoundation/oneTBB/issues/1673 + +--- + test/tbbmalloc/test_malloc_whitebox.cpp | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/test/tbbmalloc/test_malloc_whitebox.cpp b/test/tbbmalloc/test_malloc_whitebox.cpp +index 0f37e9f..bb13656 100644 +--- a/test/tbbmalloc/test_malloc_whitebox.cpp ++++ b/test/tbbmalloc/test_malloc_whitebox.cpp +@@ -1281,8 +1281,13 @@ void TestTHP() { + allocPtrs[i] = backend->allocRawMem(allocSize); + + REQUIRE_MESSAGE(allocPtrs[i], "Allocation not succeeded."); ++ ++ if (allocSize == HUGE_PAGE_SIZE) { + REQUIRE_MESSAGE(allocSize == HUGE_PAGE_SIZE, + "Allocation size have to be aligned on Huge Page size internally."); ++ } else { ++ INFO("allocSize is"<< allocSize <<", test skipped!\n"); ++ } + + // First touch policy - no real pages allocated by OS without accessing the region + memset(allocPtrs[i], 1, allocSize); +-- +2.43.0 + diff --git a/tbb.spec b/tbb.spec index 8513169db581805399ee37f01b14e0a1cd91a2c1..65ba98e59bc8a49e0dab27bd4d7d2257fc33f061 100644 --- a/tbb.spec +++ b/tbb.spec @@ -1,6 +1,6 @@ Name: tbb Version: 2021.11.0 -Release: 2 +Release: 3 Summary: Threading Building Blocks lets you easily write parallel C++ programs License: ASL 2.0 URL: http://threadingbuildingblocks.org/ @@ -12,6 +12,7 @@ Patch0: tbb-2021-Werror.patch Patch1: tbb-2021-strict-aliasing.patch Patch9000: bugfix-tbb-fix-__TBB_machine_fetchadd4-was-not-declared-on-.patch +Patch9001: fix-test-error-when-allocSize-not-equal-HUGE_PAGE_SI.patch BuildRequires: gcc-c++ swig python3-devel hwloc hwloc-devel cmake python3-pip BuildRequires: python3-setuptools python3-sphinx python3-sphinx_rtd_theme python3-wheel @@ -147,6 +148,9 @@ ctest --output-on-failure --force-new-ctest-process %{python3_sitearch}/__pycache__/TBB* %changelog +* Mon Dec 1 2025 Wenlong Zhang - 2021.11.0-3 +- fix test error when allocSize not equal HUGE_PAGE_SIZE + * Wed Jul 17 2024 jchzhou - 2021.11.0-2 - Fix a typo that prevents building on riscv64