Skip to content
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/shell: fix failure on samr21-xpro #18891

Merged
merged 1 commit into from
Nov 14, 2022
Merged

Conversation

maribu
Copy link
Member

@maribu maribu commented Nov 11, 2022

Contribution description

The test (at least locally) fails on the long shell line detection in master, as the EDBG UART adapter drops chars when more than 64 bytes are send at a time. This works around the issue:

  • The line buffer in the test is reduced to 60 bytes, so that overflowing it becomes possible with sending less than 64 bytes.
  • The test script is adapted to exceed the shell buffer size by one byte only (due to linefeed char), rather than significantly. - Sending more than 64 bytes would result in the linefeed being dropped by the EDBG adapter and the test failing

Finally, the shell buffer is no longer allocated on the stack and, hence, the main stack size could be reduced a bit. The test still passes on the Nucleo-F767ZI which is notorious in failing on tight stacks due to the MPU stack guard - so the stack size reduction is expected to work for all boards.

Testing procedure

make BOARD=samr21-xpro -C tests/shell

Should now pass, while it fails on master on the test for graceful buffer overflow handling.

Issues/PRs references

None

The test (at least locally) fails on the long shell line detection in
`master`, as the EDBG UART adapter drops chars when more than 64 bytes
are send at a time. This works around the issue:

- The line buffer in the test is reduced to 60 bytes, so that
  overflowing it becomes possible with sending less than 64 bytes.
- The test script is adapted to exceed the shell buffer size by one
  byte only (due to linefeed char), rather than significantly.
    - Sending more than 64 bytes would result in the linefeed being
      dropped by the EDBG adapter and the test failing

Finally, the shell buffer is no longer allocated on the stack and,
hence, the main stack size could be reduced a bit. The test still
passes on the Nucleo-F767ZI which is notorious in failing on tight
stacks due to the MPU stack guard - so the stack size reduction is
expected to work for all boards.
@github-actions github-actions bot added the Area: tests Area: tests and testing framework label Nov 11, 2022
@maribu maribu added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch labels Nov 11, 2022
@riot-ci
Copy link

riot-ci commented Nov 11, 2022

Murdock results

✔️ PASSED

e95f755 tests/shell: fix failure on samr21-xpro

Success Failures Total Runtime
2002 0 2002 06m:00s

Artifacts

This only reflects a subset of all builds from https://ci-prod.riot-os.org. Please refer to https://ci.riot-os.org for a complete build for now.

@maribu
Copy link
Member Author

maribu commented Nov 15, 2022

Backport provided in #18908

@maribu maribu deleted the tests/shell branch November 15, 2022 07:52
@maribu
Copy link
Member Author

maribu commented Nov 15, 2022

Thx :)

@kaspar030 kaspar030 added this to the Release 2023.01 milestone Jan 19, 2023
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 Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch 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.

4 participants