From 503a768c39835e381edec3ca6a521201bccf6ae8 Mon Sep 17 00:00:00 2001 From: pavelkumbrasev Date: Fri, 3 Nov 2023 11:21:47 +0000 Subject: [PATCH 1/4] Disable test_eh_threads on OpenBSD Signed-off-by: pavelkumbrasev --- test/tbb/test_eh_thread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/tbb/test_eh_thread.cpp b/test/tbb/test_eh_thread.cpp index d5af9db6a0..cc0c940b63 100644 --- a/test/tbb/test_eh_thread.cpp +++ b/test/tbb/test_eh_thread.cpp @@ -34,7 +34,7 @@ // On Windows there is no real thread number limit beside available memory. // Therefore, the test for thread limit is unreasonable. // TODO: enable limitThreads with sanitizer under docker -#if TBB_USE_EXCEPTIONS && !_WIN32 && !__ANDROID__ +#if TBB_USE_EXCEPTIONS && !_WIN32 && !__ANDROID__ && !__OpenBSD__ #include #include From 692da2db75eaf294928439174e1de81d580dc5fb Mon Sep 17 00:00:00 2001 From: pavelkumbrasev Date: Mon, 6 Nov 2023 09:42:54 +0000 Subject: [PATCH 2/4] Fix test_eh_thread. Disable test_malloc_compliance Signed-off-by: pavelkumbrasev --- test/tbb/test_eh_thread.cpp | 4 ++-- test/tbbmalloc/test_malloc_compliance.cpp | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/test/tbb/test_eh_thread.cpp b/test/tbb/test_eh_thread.cpp index cc0c940b63..618e022a60 100644 --- a/test/tbb/test_eh_thread.cpp +++ b/test/tbb/test_eh_thread.cpp @@ -34,7 +34,7 @@ // On Windows there is no real thread number limit beside available memory. // Therefore, the test for thread limit is unreasonable. // TODO: enable limitThreads with sanitizer under docker -#if TBB_USE_EXCEPTIONS && !_WIN32 && !__ANDROID__ && !__OpenBSD__ +#if TBB_USE_EXCEPTIONS && !_WIN32 && !__ANDROID__ #include #include @@ -75,7 +75,7 @@ class Thread { mValid = false; pthread_attr_t attr; // Limit the stack size not to consume all virtual memory on 32 bit platforms. - std::size_t stacksize = utils::max(128*1024, PTHREAD_STACK_MIN); + std::size_t stacksize = utils::max(std::size_t(128*1024), std::size_t(PTHREAD_STACK_MIN)); if (pthread_attr_init(&attr) == 0 && pthread_attr_setstacksize(&attr, stacksize) == 0) { mValid = pthread_create(&mHandle, &attr, thread_routine, /* arg = */ nullptr) == 0; } diff --git a/test/tbbmalloc/test_malloc_compliance.cpp b/test/tbbmalloc/test_malloc_compliance.cpp index 224e2476ce..359544ff5a 100644 --- a/test/tbbmalloc/test_malloc_compliance.cpp +++ b/test/tbbmalloc/test_malloc_compliance.cpp @@ -21,6 +21,10 @@ #define __STDC_LIMIT_MACROS 1 // to get SIZE_MAX from stdint.h +// There is no RLIMIT_AS on OpenBSD. +// Therefore, the tests for memory limit is unreasonable. +#if !__OpenBSD__ + #include "common/test.h" #include "common/utils.h" @@ -1091,3 +1095,4 @@ TEST_CASE("MAIN TEST") { } #endif /* __TBB_WIN8UI_SUPPORT */ +#endif /* Enable test */ From b779dc2548a593b4e30ae85363da3d6a38fa0b11 Mon Sep 17 00:00:00 2001 From: pavelkumbrasev Date: Mon, 6 Nov 2023 10:43:06 +0000 Subject: [PATCH 3/4] Fix copyright Signed-off-by: pavelkumbrasev --- test/tbb/test_eh_thread.cpp | 2 +- test/tbbmalloc/test_malloc_compliance.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/tbb/test_eh_thread.cpp b/test/tbb/test_eh_thread.cpp index 618e022a60..a5ac1c8a21 100644 --- a/test/tbb/test_eh_thread.cpp +++ b/test/tbb/test_eh_thread.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2020-2022 Intel Corporation + Copyright (c) 2020-2023 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/tbbmalloc/test_malloc_compliance.cpp b/test/tbbmalloc/test_malloc_compliance.cpp index 359544ff5a..dfa2053c11 100644 --- a/test/tbbmalloc/test_malloc_compliance.cpp +++ b/test/tbbmalloc/test_malloc_compliance.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2022 Intel Corporation + Copyright (c) 2005-2023 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From 714eb96e86312dc4a91e590a64083a8809ab55c3 Mon Sep 17 00:00:00 2001 From: pavelkumbrasev Date: Tue, 7 Nov 2023 08:43:34 +0000 Subject: [PATCH 4/4] Define main for test_malloc_compliance Signed-off-by: pavelkumbrasev --- test/tbbmalloc/test_malloc_compliance.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/tbbmalloc/test_malloc_compliance.cpp b/test/tbbmalloc/test_malloc_compliance.cpp index dfa2053c11..1a85ed5829 100644 --- a/test/tbbmalloc/test_malloc_compliance.cpp +++ b/test/tbbmalloc/test_malloc_compliance.cpp @@ -21,10 +21,6 @@ #define __STDC_LIMIT_MACROS 1 // to get SIZE_MAX from stdint.h -// There is no RLIMIT_AS on OpenBSD. -// Therefore, the tests for memory limit is unreasonable. -#if !__OpenBSD__ - #include "common/test.h" #include "common/utils.h" @@ -34,6 +30,10 @@ #include "oneapi/tbb/detail/_config.h" +// There is no RLIMIT_AS on OpenBSD. +// Therefore, the tests for memory limit is unreasonable. +#if !__OpenBSD__ + #define __TBB_NO_IMPLICIT_LINKAGE 1 #include "tbb/scalable_allocator.h"