1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-15 01:23:49 +01:00
19329: MAINTAINING.md: add some notes on Bors r=benpicco a=benpicco



19330: native/stdio: Explicitly provide getchar r=chrysn a=chrysn

### Contribution description

This ensures that even when libc does not implement getchar through getc, any custom stdio is still in the loop when getchar is used.

Frankly, I don't know when this broke -- I'm pretty sure custom stdio worked just a few days ago -- but either way, without this patch RIOT on native currently bypasses a configured stdio for me.

### Testing procedure

* `make -C examples/saul all debug`
* `break stdio_read`
* `run`

Without this patch, observe how the shell runs w/o ever breaking. After, lots of breakpoint hits.

This is the way it behaves for me (Debian sid, libc6:i386 2.36-8). If it works for you before this patch, we might start bisecting the differences between the systems, but we may also accept that libcs may imlpement getchar in different ways, and not all of them pass by the getc which we're patching.

### Issues/PRs references

This is needed for testing #19289.

The implementation stems from the `fgetc(3)` man page, which states that "getchar() is equivalent to getc(stdin)".

Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
Co-authored-by: chrysn <chrysn@fsfe.org>
This commit is contained in:
bors[bot] 2023-02-27 21:45:59 +00:00 committed by GitHub
commit 302a809db0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 0 deletions

View File

@ -99,6 +99,30 @@ complete that no input from the original developer or maintainer is required.
3. Are critical/hard to understand parts in the code documented? 3. Are critical/hard to understand parts in the code documented?
4. Check grammar and spelling of documentation 4. Check grammar and spelling of documentation
### Bors usage
RIOT uses [Bors] to merge Pull Requests. Bors can batch up to 4 PRs into a
merge train and build and merge them all at once.
This can greatly reduce CI times, but Bors has many quirks:
- To merge a PR, comment "bors merge" under it.
The PR needs to be approved and CI must have already have run (CI: Ready for build)
If you write "bors merge" before CI has finished running for the PR, Bors will
tell you it will do the merge once CI is finished.
This is a lie. You will have to manually write "bors merge" again once everything
but Bors is green.
- If there are multiple PRs that area ready to merge (all green except for Bors) you
can combine them into a merge train.
Be careful though: If CI is not busy, Bors will already start to build the first PR
once you type "Bors merge" and only include the other PRs in the next merge train.
To prevent this, you can first schedule a [dummy PR].
While the dummy PR (a no-op PR with "CI: skip compile tests" set) is running, you
can write "bors merge" under all the PRs you want to merge.
Be quick: You have a bit less than 1 minute of time to do this.
- If Bors gets stuck you can write "bors cancel" under the PRs it last tried to build.
This can sometimes happen if you cancel a build in the Web UI.
## Non-technical guidelines ## Non-technical guidelines
@ -187,3 +211,5 @@ there.
[Comparing build sizes]: https://github.com/RIOT-OS/RIOT/wiki/Comparing-build-sizes [Comparing build sizes]: https://github.com/RIOT-OS/RIOT/wiki/Comparing-build-sizes
[Coding Conventions]: CODING_CONVENTIONS.md [Coding Conventions]: CODING_CONVENTIONS.md
[Code of Conduct]: https://github.com/RIOT-OS/RIOT/blob/master/CODE_OF_CONDUCT.md [Code of Conduct]: https://github.com/RIOT-OS/RIOT/blob/master/CODE_OF_CONDUCT.md
[Bors]: https://bors.tech/
[dummy PR]: https://github.com/RIOT-OS/RIOT/pull/19253

View File

@ -308,6 +308,10 @@ int fgetc(FILE *fp)
return getc(fp); return getc(fp);
} }
int getchar(void) {
return getc(stdin);
}
int getc(FILE *fp) int getc(FILE *fp)
{ {
char c; char c;