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

Add sudo to dmesg call in test run template #97624

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion eng/testing/RunnerTemplate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ echo pushd $EXECUTION_DIR
echo popd
echo ===========================================================================================================
pushd $EXECUTION_DIR
# just for testing temporarily
sudo dmesg | tail -50
[[RunCommands]]
test_exitcode=$?
if [[ -s testResults.xml ]]; then
Expand Down Expand Up @@ -228,7 +230,7 @@ fi
if [ -n "$HELIX_WORKITEM_PAYLOAD" ]; then
# For abrupt failures, in Helix, dump some of the kernel log, in case there is a hint
if [[ $test_exitcode -ne 1 ]]; then
dmesg | tail -50
sudo dmesg | tail -50
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can read darwin logs without sudo with builtin log utility. e.g. to get past five minutes kernel logs:
log show --debug --predicate 'process == "kernel"' --start "$(date -v -5M '+%Y-%m-%d %H:%M:%S')"

fi

fi
Expand Down
Loading