-
Notifications
You must be signed in to change notification settings - Fork 51
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
[BUG] sof-test output is messy when run test case locally #1151
Comments
comment out this line, issue could not be reproduced Line 377 in bc3ced5
not sure why a redirect break the current shell. |
|
If sof-test test case is run manually and locally, the output of sof-test is messy, the lines are not aligned left at the beginning of each line, some lines start in the middle of a line, which makes the output log hard to follow. This patch helps to workaround the above issue. Link: thesofproject#1151 Signed-off-by: Chao Song <[email protected]>
If sof-test test case is run manually and locally, the output of sof-test is messy, the lines are not aligned left at the beginning of each line, some lines start in the middle of a line, which makes the output log hard to follow. This patch helps to workaround the above issue. Link: thesofproject#1151 Signed-off-by: Chao Song <[email protected]>
If sof-test test case is run manually and locally, the output of sof-test is messy, the lines are not aligned left at the beginning of each line, some lines start in the middle of a line, which makes the output log hard to follow. This patch helps to workaround the above issue. Link: thesofproject#1151 Signed-off-by: Chao Song <[email protected]>
If sof-test test case is run manually and locally, the output of sof-test is messy, the lines are not aligned left at the beginning of each line, some lines start in the middle of a line, which makes the output log hard to follow. This patch helps to workaround the above issue. Link: #1151 Signed-off-by: Chao Song <[email protected]>
Let's leave open as low priority because it's just a workaround and we have no idea why it works. |
I've just observed the same effect in a totally different (build) context. I think it happens when multiple processes write to the same terminal concurrently and one of them uses control codes (e.g. color). I suspect control codes are not "atomic" which means another problem can insert characters in the middle and break them. Maybe the workaround #1154 disables control codes by hiding the terminal. This would also explains why CI results are not affected: they don't use a terminal. EDIT: |
The workaround in #1154 works for Zephyr but not stable-v2.2 I got tired of this and I tested further. This is a problem only when using
--- a/case-lib/lib.sh
+++ b/case-lib/lib.sh
@@ -463,7 +463,7 @@ func_sof_logger_collect()
dlogi "Starting ${loggerCmd[*]} > $logfile &"
# Cleaned up by func_exit_handler() in hijack.sh
# shellcheck disable=SC2024
- sudo "${loggerCmd[@]}" > "$logfile" &
+ /bin/sudo sleep 1 &
} Backgrounding
|
Should finally fix terminal corruption issue thesofproject#1151. Commit 8341638 was a good workaround but it was applied only for Zephyr's mtrace. - Apply the same workaround for stable-v2.2 sof-logger - Explain better in the source what causes the corruption - Change owner of mtrace.txt logs to "ubuntu" instead of root. Signed-off-by: Marc Herbert <[email protected]>
Should finally fix terminal corruption issue #1151. Commit 8341638 was a good workaround but it was applied only for Zephyr's mtrace. - Apply the same workaround for stable-v2.2 sof-logger - Explain better in the source what causes the corruption - Change owner of mtrace.txt logs to "ubuntu" instead of root. Signed-off-by: Marc Herbert <[email protected]>
Describe the bug
![Screenshot from 2024-01-16 16-31-02](https://private-user-images.githubusercontent.com/52959957/296981238-0716df4b-6818-4cb6-94e6-9bb948a2f356.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2NjM4NDAsIm5iZiI6MTczOTY2MzU0MCwicGF0aCI6Ii81Mjk1OTk1Ny8yOTY5ODEyMzgtMDcxNmRmNGItNjgxOC00Y2I2LTk0ZTYtOWJiOTQ4YTJmMzU2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDIzNTIyMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNkM2UyMmZlOTA5MDI2NmE2OTg2NDJhYWQ2ZWM3MDgzNzgzODVkODE0MzNjOGUzZjlhZjVkOGFmZjljNWFjMmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.vfGZVwIZJdKwNukKTTxbMjnkPku-o9f-9eSMMdaFR6E)
When run test case locally, the output of the test case is messy. Log doesn't start from the beginning of a line. This makes the log hard to follow.
To Reproduce
Just run a test case, say check-playback.sh on any device, and check the output.
EDIT, duplicate of:
The text was updated successfully, but these errors were encountered: