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

uorb: _POSIX_NAME_MAX -> NAME_MAX #489

Merged
merged 1 commit into from
Sep 13, 2023
Merged

Conversation

jnippula
Copy link

@jnippula jnippula commented Sep 13, 2023

In SITL case the _POSIX_NAME_MAX is only 14, so it fails for every topic. Use NAME_MAX instead to get correct maximum filename value for both posix and nuttx cases.

log snippet from sitl-test run:

[   3.129|px4       ] ERROR [uORB] Device node name too long! 'sensor_baro'
[   3.137|px4       ] ERROR [uORB] Device node name too long! 'tune_control'
[   3.143|px4       ] ERROR [uORB] Device node name too long! 'manual_control_setpoint'
[   3.147|px4       ] ERROR [uORB] Device node name too long! 'sensors_status_mag'
[   3.147|px4       ] ERROR [uORB] Device node name too long! 'sensors_status_baro'
[   3.148|px4       ] ERROR [uORB] Device node name too long! 'sensor_selection'
[   3.148|px4       ] ERROR [uORB] Device node name too long! 'sensors_status_imu'
[   3.148|px4       ] ERROR [uORB] Device node name too long! 'vehicle_acceleration'

@jnippula jnippula requested a review from jlaitine September 13, 2023 06:39
@jnippula
Copy link
Author

That check is only printing error message, so it didn't really affect the functionality. That is why the SITL test were successful, but the error prints were just printed in to the console log.
I noticed this issue when running the SITL locally and saw lot of red error prints in the console.

In SITL case the _POSIX_NAME_MAX is only 14, so it fails for every topic.
Use NAME_MAX instead to get correct maximum filename value for both
posix and nuttx cases.
@jnippula jnippula force-pushed the DP-6818-fix_sitl_name_max branch from a4fd588 to cc5098c Compare September 13, 2023 08:25
@jnippula
Copy link
Author

jnippula commented Sep 13, 2023

Now the error messages are gone from SITL-test:
https://github.com/tiiuae/px4-firmware/pull/489/checks

@jnippula jnippula merged commit 4cc9069 into main Sep 13, 2023
@jnippula jnippula deleted the DP-6818-fix_sitl_name_max branch June 6, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant