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

twister: Remove unrecognised sections test #86257

Merged

Conversation

LukaszMrugala
Copy link
Collaborator

The section lists that govern whether the ELF section is recognised or not are out of date.

A programming bug has rendered the unrecognised section check unrunnable for years.

Fix was attempted in #71051, but lack of updated section lists made the revival of the unrecognised section check counter-productive and undesired.

Thus, the practically dead code of the unrecognised section check is removed in this PR.

nashif
nashif previously approved these changes Feb 25, 2025
hakehuang
hakehuang previously approved these changes Feb 25, 2025
@@ -483,12 +483,6 @@ def add_parse_arguments(parser = None) -> argparse.ArgumentParser:
action="store_true",
help="Collect and report ROM/RAM section sizes for each test image built.")

parser.add_argument(
"--disable-unrecognized-section-test",
Copy link
Member

@golowanow golowanow Feb 25, 2025

Choose a reason for hiding this comment

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

Should we label this option as deprecated first in case it is actually in use somewhere downstream, and keep logging errors as warnings for the same ?
With removing just at the surface as it is currently proposed, why size_calc still tracks 'recognized' sections ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

While normally deprecation would be in order, notice that we are removing the unrecognised section test altogether, so the --disable-[...] option is not being deprecated, but becoming the default. Anyone using this option will have the program operation proceed as expected.

Good catch, will remove the recognized key.

Copy link
Member

Choose a reason for hiding this comment

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

so the --disable-[...] option is not being deprecated, but becoming the default.
Anyone using this option will have the program operation proceed as expected.

with this change:

  1. twister will fail if this option is used somewhere, right ?
  2. no error logs on unrecognized sections anymore by default

https://github.com/zephyrproject-rtos/zephyr/pull/86257/files#diff-6034a9b2a21a304d491695555d9a7196e6638c8a9598686149c92f49a2c5f1b4L642-L647

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

  1. is the default action now - the check hasn't worked for years.
  2. I'll add that information to the release notes.

@LukaszMrugala LukaszMrugala dismissed stale reviews from hakehuang and nashif via 0d79e1e February 25, 2025 08:08
@LukaszMrugala LukaszMrugala force-pushed the remove_unrecognised_section_test branch from 1fadc1b to 0d79e1e Compare February 25, 2025 08:08
@zephyrbot zephyrbot added the Release Notes To be mentioned in the release notes label Feb 27, 2025
@LukaszMrugala LukaszMrugala force-pushed the remove_unrecognised_section_test branch from 3845a2c to 66ec18f Compare March 3, 2025 13:17
@fabiobaltieri fabiobaltieri added this to the v4.2.0 milestone Mar 3, 2025
The section lists that govern whether the ELF
section is recognised or not are out of date.

A programming bug has rendered the unrecognised
section check unrunnable for years.

Thus, the practically dead code of the
unrecognised section check is removed
in this commit.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
We remove the --disable-unrecognized...,
so we should inform the users of that fact.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
@LukaszMrugala LukaszMrugala force-pushed the remove_unrecognised_section_test branch from 66ec18f to 3fa8cfc Compare March 18, 2025 14:47
@kartben kartben merged commit 52964cf into zephyrproject-rtos:main Mar 24, 2025
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Twister Twister Release Notes To be mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants