Skip to content

tests/pkg_jsmn: replace use of "%.*s" string formatter#12795

Merged
maribu merged 2 commits intoRIOT-OS:masterfrom
aabadie:pr/tests/pkg_jsmn_cleanup
Nov 23, 2019
Merged

tests/pkg_jsmn: replace use of "%.*s" string formatter#12795
maribu merged 2 commits intoRIOT-OS:masterfrom
aabadie:pr/tests/pkg_jsmn_cleanup

Conversation

@aabadie
Copy link
Copy Markdown
Contributor

@aabadie aabadie commented Nov 23, 2019

Contribution description

This PR fixes the tests/pkg_jsmn on AVR by replacing the use of %.*s string formatter in printf calls by a plain %s string formatter.

This is basically the same approach that is proposed in #12792 for tests/pipe.

There's also a commit that is removing the duplicate definition of ARRAY_SIZE and replace it with an include to kernel_defines.h.

Testing procedure

The following commands should work:

make -C tests/pkg_jsmn all test
make BOARD=samr21-xpro -C tests/pkg_jsmn flash test
make BOARD=atmega256rfr2-xpro -C tests/pkg_jsmn flash test

Issues/PRs references

Tick another item in #12651

@aabadie aabadie added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: tests Area: tests and testing framework Platform: AVR Platform: This PR/issue effects AVR-based platforms CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Nov 23, 2019
@aabadie aabadie requested a review from maribu November 23, 2019 14:14
@aabadie aabadie changed the title tests/pkg_jsmn: replace use of "%*.s" string formatter tests/pkg_jsmn: replace use of "%.*s" string formatter Nov 23, 2019
Copy link
Copy Markdown
Member

@maribu maribu left a comment

Choose a reason for hiding this comment

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

ACK. However, I have one suggestion for paranoid safety measures. Should not be needed currently, though. Feel free to ignore or to squash right away.

This is not compatible with avr-libc
@aabadie aabadie force-pushed the pr/tests/pkg_jsmn_cleanup branch from c327bd4 to d756507 Compare November 23, 2019 19:57
@maribu maribu merged commit ab94b7c into RIOT-OS:master Nov 23, 2019
@aabadie aabadie deleted the pr/tests/pkg_jsmn_cleanup branch December 6, 2019 20:30
@fjmolinas fjmolinas added this to the Release 2020.01 milestone Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: AVR Platform: This PR/issue effects AVR-based platforms Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants