-
Notifications
You must be signed in to change notification settings - Fork 2k
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
unittests: remove blacklisting for non-32 platforms #12447
Conversation
This makes most unittests compilable for non-32-bit platforms again: - for `tests-pkt`: it just compares the sizes, so the value is arbitrary and can be cast to `size_t` without worries - for `tests-rtc`: 360 and 120 are the same under `mod 60` (which seconds usually are), but 120 fits into `int8_t`'s value space used by `avr-libc`'s `struct tm`.
`msp430-libc` does not provide the `mktime()` function used by those tests.
Range errors were fixed and MSP-430 blacklisted using `FEATURES_BLACKLIST` for the `tests-rtc` test suite.
blacklist looks okay and works as expected, however now (in theory) Arduino-uno is supported for some tests, e.g. tests-rtc but that fails with:
which might not be an issue exactly with the changes here, but for starters you might want to add Maybe this should be split in 2 PRs, first replace boards with feature blacklist and afterwards the numerical stuff?! |
Mh, it's about perspective. My approach was: fix the compile errors first, then remove the blacklisting. This you can only do in one PR. But can split. |
I agree. But you actually do 3 things:
I suggest to change the blacklist from boards for feature based in a separate PR, as we do for examples now. And fix compile errors and remove blacklist here (based on the other PR). |
I don't think we can fix the failing test btw, as this loop is causing an integer overflow... I'll make an alternative PR and remove the "fixes" to |
Same on Arduino Mega2560 |
Since they use the same |
RIOT/tests/unittests/tests-rtc/tests-rtc.c Line 153 in 946c887
This loop? |
Yeah, The int there is not the problem, but all the increments and decrements to |
See #12455 |
Contribution description
Inspired by #9081 I looked into the unittests what could be cleaned up there to remove
BOARD_BLACKLIST
. For this I had to:and can be cast to
size_t
without worriestests-rtc
: 360 and 120 are the same undermod 60
(which seconds usually are), but 120 fits intoint8_t
's value space used byavr-libc
'sstruct tm
.arch_msp430
for thetests-rtc
test suite, as it usesmktime()
which is not provided bymsp430-libc
Testing procedure
tests/unittests
should still work. Specifically, they should now also work (test-suite-wise) on AVR-based platforms and for the most part on MSP430-based (excluding thetests-rtc
test suite).Issues/PRs references
Follow-up to #9081, reverting parts of #12040.