Date: Mon, 12 Jan 2026 11:27:55 +0000 From: Ganael LAPLANCHE <martymac@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: a1399edaf111 - main - devel/onetbb: Fix procfs-related failing tests Message-ID: <6964dabb.34041.20c06af6@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by martymac: URL: https://cgit.FreeBSD.org/ports/commit/?id=a1399edaf1110054ac66575198d5a6e2a69d206d commit a1399edaf1110054ac66575198d5a6e2a69d206d Author: Ganael LAPLANCHE <martymac@FreeBSD.org> AuthorDate: 2026-01-12 11:15:17 +0000 Commit: Ganael LAPLANCHE <martymac@FreeBSD.org> CommitDate: 2026-01-12 11:27:48 +0000 devel/onetbb: Fix procfs-related failing tests 'make test' failed with the following errors: 17 - test_parallel_invoke (Subprocess aborted) 23 - test_task_group (Subprocess aborted) 29 - test_resumable_tasks (SEGFAULT) 63 - test_hw_concurrency (ILLEGAL) 66 - test_global_control (Subprocess aborted) 67 - test_task (SEGFAULT) 71 - test_arena_constraints (Subprocess aborted) 74 - test_tbb_header (Failed) 105 - conformance_resumable_tasks (SEGFAULT) 129 - test_malloc_regression (Subprocess aborted) 131 - test_malloc_compliance (Subprocess aborted) 132 - test_malloc_used_by_lib (Subprocess aborted) 133 - test_malloc_lib_unload (Subprocess aborted) 135 - test_malloc_whitebox (Subprocess aborted) Fix tests 17,23,71,129,132,133,135 by using kinfo_getproc(3) instead of /proc/self/status, whose format differs from Linux. The following tests are still failing: 29 - test_resumable_tasks (SEGFAULT) 63 - test_hw_concurrency (ILLEGAL) 66 - test_global_control (Subprocess aborted) 67 - test_task (SEGFAULT) 74 - test_tbb_header (Failed) 105 - conformance_resumable_tasks (SEGFAULT) 131 - test_malloc_compliance (Subprocess aborted) and will be investigated. PR: 292088 Reported by: diizzy --- devel/onetbb/Makefile | 1 + devel/onetbb/files/patch-test_CMakeLists.txt | 24 +++++++++++++++ .../onetbb/files/patch-test_common_memory_usage.h | 34 ++++++++++++++++++++++ 3 files changed, 59 insertions(+) diff --git a/devel/onetbb/Makefile b/devel/onetbb/Makefile index 03bd6142e1aa..bceb1248f3e9 100644 --- a/devel/onetbb/Makefile +++ b/devel/onetbb/Makefile @@ -1,6 +1,7 @@ PORTNAME= onetbb DISTVERSIONPREFIX= v DISTVERSION= 2022.3.0 +PORTREVISION= 1 CATEGORIES= devel MAINTAINER= martymac@FreeBSD.org diff --git a/devel/onetbb/files/patch-test_CMakeLists.txt b/devel/onetbb/files/patch-test_CMakeLists.txt new file mode 100644 index 000000000000..fc236b0630c8 --- /dev/null +++ b/devel/onetbb/files/patch-test_CMakeLists.txt @@ -0,0 +1,24 @@ +--- test/CMakeLists.txt.orig 2026-01-12 07:56:34 UTC ++++ test/CMakeLists.txt +@@ -86,6 +86,10 @@ function(tbb_add_test) + + target_link_libraries(${_tbb_test_TARGET_NAME} PRIVATE ${_tbb_test_DEPENDENCIES} Threads::Threads ${TBB_COMMON_LINK_LIBS}) + ++ if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") ++ target_link_libraries(${_tbb_test_TARGET_NAME} PRIVATE util) ++ endif() ++ + if (COMMAND _tbb_run_memcheck) + _tbb_run_memcheck(${_tbb_test_NAME} ${_tbb_test_SUBDIR}) + endif() +@@ -706,6 +710,10 @@ if (TARGET TBB::tbbmalloc) + target_link_libraries(test_malloc_whitebox PRIVATE ${TBB_COMMON_LINK_FLAGS}) + endif() + target_link_libraries(test_malloc_whitebox PRIVATE Threads::Threads ${TBB_COMMON_LINK_LIBS}) ++ ++ if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") ++ target_link_libraries(test_malloc_whitebox PRIVATE util) ++ endif() + endif() + # ------------------------------------------------------------------------------------------ + diff --git a/devel/onetbb/files/patch-test_common_memory_usage.h b/devel/onetbb/files/patch-test_common_memory_usage.h new file mode 100644 index 000000000000..b3d8459524b8 --- /dev/null +++ b/devel/onetbb/files/patch-test_common_memory_usage.h @@ -0,0 +1,34 @@ +--- test/common/memory_usage.h.orig 2025-10-29 11:31:36 UTC ++++ test/common/memory_usage.h +@@ -26,6 +26,13 @@ + #include "utils.h" + #include "utils_assert.h" + ++#if __FreeBSD__ ++#include <unistd.h> ++#include <sys/types.h> ++#include <sys/user.h> ++#include <libutil.h> ++#endif ++ + #if __unix__ || __sun + #include <sys/resource.h> + #include <unistd.h> +@@ -93,6 +100,17 @@ namespace utils { + bool status = GetProcessMemoryInfo(GetCurrentProcess(), &mem, sizeof(mem)) != 0; + ASSERT(status, nullptr); + return stat == currentUsage ? mem.PagefileUsage : mem.PeakPagefileUsage; ++#elif __FreeBSD__ ++ /* Inspired from sys/compat/linprocfs/linprocfs.c */ ++ long unsigned size = 0; ++ struct kinfo_proc *kip = kinfo_getproc(getpid()); ++ ASSERT(kip != nullptr, "Failed to get process info."); ++ size = (long unsigned)kip->ki_size; ++ free (kip); ++ // VmPeak not supported ++ if (stat == peakUsage) ++ ASSERT(size, "VmPeak not supported."); ++ return size; + #elif __unix__ + long unsigned size = 0; + FILE* fst = fopen("/proc/self/status", "r");home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6964dabb.34041.20c06af6>
