-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
tests: net: lib: lwm2m: fix the missing float support #62431
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, if picolib would be used by default, then we should not need the CONFIG_PICOLIBC=y
or did I misunderstood something?
I am not convinced that we should select config options like this, what if user running the test does not want to use picolib.
The tests `content_json` and `content_plain_test` depend on the float support of libc. After PR#zephyrproject-rtos#57340, Picolibc would be selected in these two tests and the `PICOLIBC_IO_FLOAT` won't be selected if the platform doesn't select `FPU`. This commit select `CONFIG_PICOLIBC` and `CONFIG_PICOLIBC_IO_FLOAT` for these two tests. Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
Sure, I'll delete it. |
Well, if tests are broken because of default configs, should we fix the default config instead of modifying the test configuration? I noticed also another problem with Picolib #62444 |
IMHO, for tests the most important thing is that it (the test) verifies that some functionality works ok. So with this in mind, the textual output of the test might not matter that much. Unless we should be verifying that the output of some print is correct, but I think that is not the case here. For some other components than tests, I think it depends how important is it that the output is valid. I have encountered this few years go with gPTP and the net-shell where some 64-bit values were not printed correctly with minimal libc. I decided to ignore the issue as the printing was fixed eventually and the output was not that important for the user. |
In these tests, we are in fact verifying the output of string formatting functions: zephyr/tests/net/lib/lwm2m/content_plain_text/src/main.c Lines 224 to 227 in efeb2d1
So there is a known floating point value, and known text output that it should produce. |
081d899
to
5a1a1fe
Compare
The tests
content_json
andcontent_plain_test
depend on the float support of libc. After PR##57340, Picolibc would be selected in these two tests and thePICOLIBC_IO_FLOAT
won't be selected if the platform doesn't selectFPU
.This commit select
CONFIG_PICOLIBC
andCONFIG_PICOLIBC_IO_FLOAT
for these two tests.