-
Notifications
You must be signed in to change notification settings - Fork 174
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
driver/bareboxdriver: silence barebox in _await_prompt() and unsilence on boot() #1221
Merged
jluebbe
merged 1 commit into
labgrid-project:master
from
Bastian-Krause:bst/barebox-loglevel
Jul 3, 2023
Merged
driver/bareboxdriver: silence barebox in _await_prompt() and unsilence on boot() #1221
jluebbe
merged 1 commit into
labgrid-project:master
from
Bastian-Krause:bst/barebox-loglevel
Jul 3, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…e on boot() Log messages such as.. eth0: 1000Mbps full duplex link detected ..are logged asynchronously. This confuses the BareboxDriver. To fix that, set the log level to "emerg" right after a prompt is detected and recover the previous log level right before booting. To make the tests run sucessfully, mock the _run() method before driver activation to act as if `echo $global.loglevel` was run. Signed-off-by: Bastian Krause <bst@pengutronix.de>
Emantor
approved these changes
Jun 25, 2023
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #1221 +/- ##
======================================
Coverage 62.9% 62.9%
======================================
Files 159 159
Lines 11742 11749 +7
======================================
+ Hits 7391 7397 +6
- Misses 4351 4352 +1
☔ View full report in Codecov by Sentry. |
jluebbe
approved these changes
Jul 3, 2023
Bastian-Krause
added a commit
to Bastian-Krause/labgrid
that referenced
this pull request
Jul 20, 2023
[1] introduced lowering barebox' log level to 0 (emerg) right after the barebox prompt has been detected and recovering the log level right before booting. Tests may rely on log output, though. To enable capturing log messages a command may emit, set the log level to the initially remembered level before the command is executed and reset it to 0 (emerg) after the exit code was emitted. barebox' poller should not run between the echos, so this should be safe. No asynchronous prints are expected to happen during this time. [1] labgrid-project#1221, 6f7bf66 ("driver/bareboxdriver: silence barebox in _await_prompt() and unsilence on boot()") Signed-off-by: Bastian Krause <bst@pengutronix.de>
Bastian-Krause
added a commit
to Bastian-Krause/labgrid
that referenced
this pull request
Jul 20, 2023
[1] introduced lowering barebox' log level to 0 (emerg) right after the barebox prompt has been detected and recovering the log level right before booting. Tests may rely on log output, though. To enable capturing log messages a command may emit, set the log level to the initially remembered level before the command is executed and reset it to 0 (emerg) after the exit code was emitted. barebox' poller should not run between the echos, so this should be safe. No asynchronous prints are expected to happen during this time. [1] labgrid-project#1221, 6f7bf66 ("driver/bareboxdriver: silence barebox in _await_prompt() and unsilence on boot()") Signed-off-by: Bastian Krause <bst@pengutronix.de>
2 tasks
Bastian-Krause
added a commit
to Bastian-Krause/labgrid
that referenced
this pull request
Jul 20, 2023
[1] introduced lowering barebox' log level to 0 (emerg) right after the barebox prompt has been detected and recovering the log level right before booting. Tests may rely on log output, though. To enable capturing log messages a command may emit, set the log level to the initially remembered level before the command is executed and reset it to 0 (emerg) after the exit code was emitted. barebox' poller should not run between the echos, so this should be safe. No asynchronous prints are expected to happen during this time. [1] labgrid-project#1221, 6f7bf66 ("driver/bareboxdriver: silence barebox in _await_prompt() and unsilence on boot()") Signed-off-by: Bastian Krause <bst@pengutronix.de>
rpoisel
pushed a commit
to honeytreelabs/labgrid
that referenced
this pull request
Oct 24, 2023
[1] introduced lowering barebox' log level to 0 (emerg) right after the barebox prompt has been detected and recovering the log level right before booting. Tests may rely on log output, though. To enable capturing log messages a command may emit, set the log level to the initially remembered level before the command is executed and reset it to 0 (emerg) after the exit code was emitted. barebox' poller should not run between the echos, so this should be safe. No asynchronous prints are expected to happen during this time. [1] labgrid-project#1221, 6f7bf66 ("driver/bareboxdriver: silence barebox in _await_prompt() and unsilence on boot()") Signed-off-by: Bastian Krause <bst@pengutronix.de>
legraps
pushed a commit
to BasicServicePeople/labgrid
that referenced
this pull request
Nov 6, 2023
[1] introduced lowering barebox' log level to 0 (emerg) right after the barebox prompt has been detected and recovering the log level right before booting. Tests may rely on log output, though. To enable capturing log messages a command may emit, set the log level to the initially remembered level before the command is executed and reset it to 0 (emerg) after the exit code was emitted. barebox' poller should not run between the echos, so this should be safe. No asynchronous prints are expected to happen during this time. [1] labgrid-project#1221, 6f7bf66 ("driver/bareboxdriver: silence barebox in _await_prompt() and unsilence on boot()") Signed-off-by: Bastian Krause <bst@pengutronix.de>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Log messages such as..
..are logged asynchronously. This confuses the BareboxDriver.
To fix that, set the log level to "emerg" (0) right after a prompt is detected and recover the previous log level right before booting.
To make the tests run successfully, mock the _run() method before driver activation to act as if
echo $global.loglevel
was run.Checklist