Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests compilation on OpenBSD #1246

Merged

Conversation

pavelkumbrasev
Copy link
Contributor

Description

This test won't work on OpenBSD because it doesn't have RLIMIT_AS. So this patch disables this test.

#1015

  • - git commit message contains an appropriate signed-off-by string (see CONTRIBUTING.md for details)

Type of change

Choose one or multiple, leave empty if none of the other choices apply

Add a respective label(s) to PR if you have permissions

  • bug fix - change that fixes an issue
  • new feature - change that adds functionality
  • tests - change in tests
  • infrastructure - change in infrastructure and CI
  • documentation - documentation update

Tests

  • added - required for new features and some bug fixes
  • not needed

Documentation

  • updated in # - add PR number
  • needs to be updated
  • not needed

Breaks backward compatibility

  • Yes
  • No
  • Unknown

Notify the following users

List users with @ to send notifications

Other information

sarathnandu
sarathnandu previously approved these changes Nov 3, 2023
Copy link
Contributor

@sarathnandu sarathnandu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copyright check flagged otherwise LGTM!

@brad0
Copy link
Contributor

brad0 commented Nov 3, 2023

It is test_malloc_compliance.cpp that has the issue with RLIMIT_AS.

This one seemed to be an issue with comparison of integers of different signs.

[1/155] /home/brad/tmp/ffmpeg-ports/ports/pobj/tbb-2021.10.0-rc1/bin/c++  -I/home/brad/tmp/ffmpeg-ports/ports/pobj/tbb-2021.10.0-rc1/oneTBB-2021.10.0-rc1/test/.. -I/home/brad/tmp/ffmpeg-ports/ports/pobj/tbb-2021.10.0-rc1/oneTBB-2021.10.0-rc1/test -I/home/brad/tmp/ffmpeg-ports/ports/pobj/tbb-2021.10.0-rc1/oneTBB-2021.10.0-rc1/src/tbb/../../include -O2 -pipe -DNDEBUG -std=c++11 -Wall -Wextra -Werror -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor -ffp-model=precise -mrtm -mwaitpkg -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -fPIC -D_FORTIFY_SOURCE=2 -MD -MT test/CMakeFiles/test_eh_thread.dir/tbb/test_eh_thread.cpp.o -MF test/CMakeFiles/test_eh_thread.dir/tbb/test_eh_thread.cpp.o.d -o test/CMakeFiles/test_eh_thread.dir/tbb/test_eh_thread.cpp.o -c /home/brad/tmp/ffmpeg-ports/ports/pobj/tbb-2021.10.0-rc1/oneTBB-2021.10.0-rc1/test/tbb/test_eh_thread.cpp
FAILED: test/CMakeFiles/test_eh_thread.dir/tbb/test_eh_thread.cpp.o
/home/brad/tmp/ffmpeg-ports/ports/pobj/tbb-2021.10.0-rc1/bin/c++  -I/home/brad/tmp/ffmpeg-ports/ports/pobj/tbb-2021.10.0-rc1/oneTBB-2021.10.0-rc1/test/.. -I/home/brad/tmp/ffmpeg-ports/ports/pobj/tbb-2021.10.0-rc1/oneTBB-2021.10.0-rc1/test -I/home/brad/tmp/ffmpeg-ports/ports/pobj/tbb-2021.10.0-rc1/oneTBB-2021.10.0-rc1/src/tbb/../../include -O2 -pipe -DNDEBUG -std=c++11 -Wall -Wextra -Werror -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor -ffp-model=precise -mrtm -mwaitpkg -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -fPIC -D_FORTIFY_SOURCE=2 -MD -MT test/CMakeFiles/test_eh_thread.dir/tbb/test_eh_thread.cpp.o -MF test/CMakeFiles/test_eh_thread.dir/tbb/test_eh_thread.cpp.o.d -o test/CMakeFiles/test_eh_thread.dir/tbb/test_eh_thread.cpp.o -c /home/brad/tmp/ffmpeg-ports/ports/pobj/tbb-2021.10.0-rc1/oneTBB-2021.10.0-rc1/test/tbb/test_eh_thread.cpp
In file included from /home/brad/tmp/ffmpeg-ports/ports/pobj/tbb-2021.10.0-rc1/oneTBB-2021.10.0-rc1/test/tbb/test_eh_thread.cpp:23:
/home/brad/tmp/ffmpeg-ports/ports/pobj/tbb-2021.10.0-rc1/oneTBB-2021.10.0-rc1/test/common/utils.h:361:17: error: comparison of integers of different signs: 'const int' and 'const unsigned int' [-Werror,-Wsign-compare]
    return left > right ? left : right;
           ~~~~ ^ ~~~~~
/home/brad/tmp/ffmpeg-ports/ports/pobj/tbb-2021.10.0-rc1/oneTBB-2021.10.0-rc1/test/tbb/test_eh_thread.cpp:78:40: note: in instantiation of function template specialization 'utils::max<int, unsigned int>' requested here
        std::size_t stacksize = utils::max(128*1024, PTHREAD_STACK_MIN);
                                       ^
1 error generated.

@pavelkumbrasev pavelkumbrasev changed the title Disable test_eh_threads on OpenBSD Fix tests compilation on OpenBSD Nov 6, 2023
@pavelkumbrasev
Copy link
Contributor Author

@ldorau and @lplewa Are you ok to disable test_malloc_compliance on OpenBSD since it doesn't have RLIMIT_AS?

@github-actions github-actions bot removed the allocator label Nov 6, 2023
Signed-off-by: pavelkumbrasev <[email protected]>
@ldorau
Copy link
Contributor

ldorau commented Nov 6, 2023

@ldorau and @lplewa Are you ok to disable test_malloc_compliance on OpenBSD since it doesn't have RLIMIT_AS?

Yes, it is OK for me.

@pavelkumbrasev
Copy link
Contributor Author

@brad0 Could you please validate the last revision?

@brad0
Copy link
Contributor

brad0 commented Nov 6, 2023

test_eh_thread.cpp builds.

[1/20] : && /home/brad/tmp/ffmpeg-ports/ports/pobj/tbb-2021.9.0/bin/c++ -O2 -pipe -DNDEBUG  test/CMakeFiles/test_malloc_compliance.dir/tbbmalloc/test_malloc_compliance.cpp.o -o clang_13.0_cxx11_64_release/test_malloc_compliance  -Wl,-z,origin,-rpath,/home/brad/tmp/ffmpeg-ports/ports/pobj/tbb-2021.9.0/build-amd64/clang_13.0_cxx11_64_release  clang_13.0_cxx11_64_release/libtbbmalloc.so.2.0  -Wl,-rpath-link,/usr/X11R6/lib:/usr/local/lib && :
FAILED: clang_13.0_cxx11_64_release/test_malloc_compliance
: && /home/brad/tmp/ffmpeg-ports/ports/pobj/tbb-2021.9.0/bin/c++ -O2 -pipe -DNDEBUG  test/CMakeFiles/test_malloc_compliance.dir/tbbmalloc/test_malloc_compliance.cpp.o -o clang_13.0_cxx11_64_release/test_malloc_compliance  -Wl,-z,origin,-rpath,/home/brad/tmp/ffmpeg-ports/ports/pobj/tbb-2021.9.0/build-amd64/clang_13.0_cxx11_64_release  clang_13.0_cxx11_64_release/libtbbmalloc.so.2.0  -Wl,-rpath-link,/usr/X11R6/lib:/usr/local/lib && :
ld: error: undefined symbol: main
>>> referenced by /usr/lib/crt0.o:(.text+0x14E)
c++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

@pavelkumbrasev
Copy link
Contributor Author

ld: error: undefined symbol: main

Oh, sorry, that was not obvious. Could you please test it one more time?

@brad0
Copy link
Contributor

brad0 commented Nov 7, 2023

Yes, that builds. Thanks.

Copy link
Contributor

@dnmokhov dnmokhov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pavelkumbrasev pavelkumbrasev merged commit ab7f370 into master Nov 8, 2023
19 checks passed
@pavelkumbrasev pavelkumbrasev deleted the dev/pavelkumbrasev/fix_test_compilation_on_bsd branch November 8, 2023 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants