-
Notifications
You must be signed in to change notification settings - Fork 7.4k
tests/c_lib: Skip double sqrt test when double is not 64 bits #89790
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/c_lib: Skip double sqrt test when double is not 64 bits #89790
Conversation
@@ -147,6 +149,9 @@ int32_t *p_root_squared = (int32_t *)&root_squared; | |||
|
|||
ZTEST(libc_common, test_sqrt) | |||
{ | |||
#if __SIZEOF_DOUBLE__ != 8 | |||
TC_PRINT("test_sqrt skipped, double not 64 bits\n"); |
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.
Should this call ztest_test_skip?
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.
Yup, thanks.
a9df1ab
to
92b2cd0
Compare
92b2cd0
to
19df634
Compare
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.
The evolution of this change was great. Good feedback from reviewers. LGTM
@keith-packard note the compliance check failure |
19df634
to
f9c8679
Compare
@keith-packard an older version of this commit got in thru #90398. |
oops. yeah, this one is probably nicer. |
This test only works for 64-bit values. On targets which use 32 bits for double, skip this version. The float test will check the 32-bit math for that. This is the 'nicer' version of this fix which uses sizeof rather than relying on __SIZEOF_DOUBLE__. Signed-off-by: Keith Packard <keithp@keithp.com>
e03fcc8
f9c8679
to
e03fcc8
Compare
|
This test only works for 64-bit values. On targets which use 32 bits for double, skip this version. The float test will check the 32-bit math for that.