-
Notifications
You must be signed in to change notification settings - Fork 59
[RFC] use journalctl for kernel log #468
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
Closed
Closed
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
9828d66
test: verify-sof-firmware-load: use journalctl to get kernel logs
xiulipan 99e1a97
tools: sof-get-default-tplg: use journalctl as default kernel log reader
xiulipan 0d8bd70
tools: sof-kernel-log-check: fix script direct run
xiulipan e69b36b
tools: sof-kernel-log-check: use journalctl to get kernel logs
xiulipan 23fa1ee
tools: sof-kernel-log-check: add some common error logs can be ignored
xiulipan d4de517
test-case: check-pause-resume: check kernel log in each iteration
xiulipan e12e5ee
test-case: check-runtime-pm-status: check kernel log in each iteration
xiulipan 0a02227
test-case: check-ipc-flood: check kernel log in each iteration
xiulipan 2fffcb7
test-case: check-suspend-resume: check kernel log in each iteration
xiulipan d3b2714
test-case: check-suspend-resume-with-audio: check kernel log in each …
xiulipan 62a95c6
test-case: check-runtime-pm-double-active: check kernel log in each i…
xiulipan 8db6f8c
test-case: multiple-pause-resume: check kernel log in each iteration
xiulipan 40b6cb8
test-case: multiple-pipeline-playback: check kernel log in each itera…
xiulipan 62c98eb
test-case: multiple-pipeline-capture: check kernel log in each iteration
xiulipan 91e4116
test-case: simultaneous-playback-capture: check kernel log in each it…
xiulipan 43c3ca6
test: verify-sof-firmware-load: flush and sync journalctl logs
xiulipan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,27 +32,27 @@ loop_cnt=${OPT_VALUE_lst['l']} | |
|
|
||
| [[ ! "$(sof-kernel-dump.sh|grep 'sof-audio'|grep 'Firmware debug build')" ]] && dlogw "${BASH_SOURCE[0]} need debug version firmware" && exit 2 | ||
|
|
||
| func_lib_setup_kernel_last_line | ||
| func_lib_setup_kernel_last_timestamp | ||
| func_lib_check_sudo | ||
|
|
||
| dlogi "Check sof debug fs environment" | ||
| [[ "$(sudo file $ipc_flood_dfs|grep 'No such file')" ]] && dlogw "${BASH_SOURCE[0]} need $ipc_flood_dfs to run the test case" && exit 2 | ||
| dlogi "Checking ipc flood test!" | ||
|
|
||
| # cleanup dmesg buffer before test | ||
| sudo dmesg -c > /dev/null | ||
|
|
||
| for i in $(seq 1 $loop_cnt) | ||
| do | ||
| # cleanup dmesg buffer for each iteration | ||
| sudo dmesg -c > /dev/null | ||
| # set up timestamp for each iteration | ||
| func_lib_setup_kernel_last_timestamp | ||
| dlogi "===== [$i/$loop_cnt] loop Begin =====" | ||
| dlogc "sudo bash -c 'echo $lpc_loop_cnt > $ipc_flood_dfs'" | ||
| sudo bash -c "'echo $lpc_loop_cnt > $ipc_flood_dfs'" | ||
|
|
||
| sof-kernel-log-check.sh 0 || die "Catched error in dmesg" | ||
| # check kernel log for each iteration to catch issues | ||
| sof-kernel-log-check.sh $KERNEL_LAST_TIMESTAMP || die "Catch error in kernel log" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same comment here. lets fix it everywhere |
||
|
|
||
| dlogi "Dumping test logs!" | ||
| dmesg | grep "IPC Flood count" -A 2 | ||
| done | ||
|
|
||
| sof-kernel-log-check.sh $KERNEL_LAST_LINE | ||
| exit 0 | ||
| done | ||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,9 +75,10 @@ esac | |
| [[ -z $file_name ]] && file_name=$dummy_file | ||
|
|
||
| func_pipeline_export $tplg "type:$test_mode & ${OPT_VALUE_lst['S']}" | ||
| func_lib_setup_kernel_last_line | ||
| for idx in $(seq 0 $(expr $PIPELINE_COUNT - 1)) | ||
| do | ||
| # set up timestamp for each iteration | ||
| func_lib_setup_kernel_last_timestamp | ||
| channel=$(func_pipeline_parse_value $idx channel) | ||
| rate=$(func_pipeline_parse_value $idx rate) | ||
| fmt=$(func_pipeline_parse_value $idx fmt) | ||
|
|
@@ -122,9 +123,6 @@ END | |
| [[ $? -ne 0 ]] && dlogw "Kill process catch error" | ||
| exit $ret | ||
| fi | ||
| # sof-kernel-log-check script parameter number is 0/Non-Number will force check from dmesg | ||
| sof-kernel-log-check.sh 0 || die "Catch error in dmesg" | ||
| # check kernel log for each iteration to catch issues | ||
| sof-kernel-log-check.sh $KERNEL_LAST_TIMESTAMP || die "Catch error in kernel log" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Caught error instead of Catch error |
||
| done | ||
|
|
||
| sof-kernel-log-check.sh $KERNEL_LAST_LINE | ||
| exit $? | ||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still required?