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

Improve has_realtime_kernel method #260

Conversation

saikishor
Copy link
Member

These changes allow the detection of realtime kernel even from the uname output. It should be more robust.

Fixes: #257

@codecov-commenter
Copy link

codecov-commenter commented Jan 19, 2025

Codecov Report

Attention: Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.

Project coverage is 70.72%. Comparing base (1d66fed) to head (c0c3c60).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/realtime_helpers.cpp 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #260      +/-   ##
==========================================
- Coverage   71.67%   70.72%   -0.96%     
==========================================
  Files           9        9              
  Lines         519      526       +7     
  Branches       85       87       +2     
==========================================
  Hits          372      372              
- Misses         92       99       +7     
  Partials       55       55              
Flag Coverage Δ
unittests 70.72% <0.00%> (-0.96%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/realtime_helpers.cpp 37.14% <0.00%> (-2.66%) ⬇️

@alexswerner
Copy link

I think the approach is OK, but one thought:

  • using #if !defined(_WIN32) on a feature which is Linux specific might be the wrong test

Hopefully the kernel uname output will always include this.

@saikishor
Copy link
Member Author

@alexswerner yes! I had to do that to make the Windows CI work. If not, it doesn't compile at all. Maybe, I can fix it differently

@saikishor
Copy link
Member Author

@alexswerner done!

Copy link
Member

@destogl destogl left a comment

Choose a reason for hiding this comment

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

Very good!

@saikishor saikishor added backport-humble This label should be used by maintainers only! Label triggers PR backport to ROS 2 humble. backport-jazzy This label should be used by maintainers only! Label triggers PR backport to ROS 2 humble. labels Jan 29, 2025
@christophfroehlich christophfroehlich merged commit 0534f53 into ros-controls:master Jan 29, 2025
18 checks passed
mergify bot pushed a commit that referenced this pull request Jan 29, 2025
mergify bot pushed a commit that referenced this pull request Jan 29, 2025
@saikishor saikishor deleted the improve/has_realtime_kernel branch January 29, 2025 21:03
christophfroehlich pushed a commit that referenced this pull request Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-humble This label should be used by maintainers only! Label triggers PR backport to ROS 2 humble. backport-jazzy This label should be used by maintainers only! Label triggers PR backport to ROS 2 humble.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PREEMPT_RT detection on kernel 6.12
7 participants