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

use config_set only for boolean config values #89

Merged
merged 2 commits into from
Jun 17, 2024
Merged

Conversation

lsf37
Copy link
Member

@lsf37 lsf37 commented Mar 9, 2023

config_set is true for 1 and false for all other values, so it does not make sense to use with CONFIG_MAX_NUM_NODES.

The two instances where this happened look like they are trying to guard CONFIG_MAX_NUM_NODES > 1 by checking whether CONFIG_MAX_NUM_NODES has any value at all, but doing so incorrectly. CONFIG_MAX_NUM_NODES has a default value of 1 and should always be set to a number, so we can just drop the guard. If this assumption about always having a numbers value is wrong, the code will not compile, which is acceptable.

Thanks to @jearc for spotting these.

This wrong setting has masked two SMP tests, which may now be failing.

@axel-h
Copy link
Member

axel-h commented Mar 9, 2023

Could this be something from lone time ago when SMP support was added. So checking `CONFIG_MAX_NUM_NODES' implied checking SMP support?

@lsf37
Copy link
Member Author

lsf37 commented Mar 9, 2023

Could this be something from lone time ago when SMP support was added. So checking `CONFIG_MAX_NUM_NODES' implied checking SMP support?

It's possible that this is very old and made sense in a previous build system. There was a previous commit (1612acc) that fixed a lot of these, but seems to have missed these two.

@lsf37
Copy link
Member Author

lsf37 commented Mar 9, 2023

I should note that I have checked all other instances of config_set now and they all refer to boolean values only, so these should really be the last ones unless somebody introduces new instances.

@lsf37 lsf37 added the hw-test set to run sel4test hardware test for this PR label Mar 10, 2023
Copy link
Member

@axel-h axel-h left a comment

Choose a reason for hiding this comment

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

Looks ok to me.

@lsf37
Copy link
Member Author

lsf37 commented Mar 10, 2023

The FPU0002 test seems to be passing, but as expected IPC0028 is failing.

@lsf37 lsf37 removed the hw-test set to run sel4test hardware test for this PR label Mar 10, 2023
@lsf37
Copy link
Member Author

lsf37 commented Mar 20, 2023

We should only merge this one after a fix for IPC0028 is merged (e.g. something like seL4/seL4#986).

config_set is true for 1 and false for all other values, so it does
not make sense to use with CONFIG_MAX_NUM_NODES.

The two instances where this happened look like they are trying to
guard CONFIG_MAX_NUM_NODES > 1 by checking whether CONFIG_MAX_NUM_NODES
has any value at all, but doing so incorrectly. CONFIG_MAX_NUM_NODES
has a default value of 1 and should always be set to a number, so we
can just drop the guard. If this assumption about always having a
numbers value is wrong, the code will not compile, which is acceptable.

Signed-off-by: Gerwin Klein <[email protected]>
This test has not been enabled since d07b238 in 2017 and likely has
been broken for quite some time.

Signed-off-by: Gerwin Klein <[email protected]>
@lsf37
Copy link
Member Author

lsf37 commented Jun 17, 2024

The offending commit that introduced these was d07b238 from 2017. I've now added a commit on top that disables IPC0028 so we can at least re-enable the other test.

I'll make a new PR that re-enables IPC0028 which we can use for testing possible solutions for the issue with IPC0028.

@lsf37 lsf37 merged commit 17cac54 into master Jun 17, 2024
20 checks passed
@lsf37 lsf37 deleted the lsf37/config_set branch June 17, 2024 10:20
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.

4 participants