tests/pkg_micro-ecc: Cleanup and AVR fixes#12797
Conversation
There was a problem hiding this comment.
Again, nice work!
I have a couple of comments on the Python test script, see below. I'm also wondering if/why 16 test rounds are really needed. Decreasing to 4 would divide by 4 the whole test duration (2.5min instead of 10 on an AVR clocked at 8MHz).
|
I have not re-tested the code with the fixed applied, as I have the hardware setup at home. I can retest tonight. |
|
Please squash. I'll retest now but I think the code changes in this PR are good and can be merged. |
4071942 to
0ee389a
Compare
|
Tested the automatic script on arduino-zero, atmega256rfr2 and native and all working (with #12797 (comment) applied). |
0ee389a to
28ce994
Compare
|
I remembered that the ATmega2560 I have in my office has enough RAM/ROM and retested. It worked for me with the fix you suggested applied. I squashed the fix right in :-) |
- Moved huge allocations from stack to data / bss - Increased verbosity of messages (one line per round) - Adapted test script to new output format
28ce994 to
0bb3159
Compare
aabadie
left a comment
There was a problem hiding this comment.
Re-tested on arduino-mega2560 and works like a charm now.
ACK
Contribution description
The test in
tests/pkg_micro-eccperformed some huge allocation on the stack, including variable length arrays. Both should be avoided in general. But more specifically this causes a stack overflow on ATmega boards. This PRs moves the allocations from the stack to the data / bss segment to solve the stack overflow. In addition, the verbosity of the output is increased. (E.g. when runningmake termthe terminal will only print the line once the\nis received, which is at the end of the test. The test takes about 10 minutes on an ATmega clocked at 8MHz, or about 5 minutes on an ATmega-Arduino clocked at 16 MHz. No user will wait for that time for output to appear on the terminal.)Testing procedure
Run:
It should still work with a non ATmega board and should now succeed with ATmega boards.
Issues/PRs references
Tick one item in #12651