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

Conversation

danmoseley
Copy link
Member

Testing on macOS per #97519 (comment)

Ignore the first diff.

@ghost
Copy link

ghost commented Jan 29, 2024

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.

Issue Details

Testing on macOS per #97519 (comment)

Ignore the first diff.

Author: danmoseley
Assignees: danmoseley
Labels:

area-Infrastructure-libraries

Milestone: -

@@ -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')"

@danmoseley
Copy link
Member Author

@am11 thanks for the suggestion - would you consider offering a PR, if you have a Mac? I can't test as I don't have one.

@am11
Copy link
Member

am11 commented Jan 29, 2024

@danmoseley, I'm on macOS and can try to switch to log utility. Would it be sufficient if we only fetch the 'past five minutes kernel logs' for this case? We can retrieve PID of the exited process (also possible to fetch both), but AFAICT, we don't know the PID in this context.

@danmoseley
Copy link
Member Author

@am11 yes, I think that's just fine. thanks!

@danmoseley danmoseley closed this Feb 7, 2024
@danmoseley danmoseley deleted the sudo branch February 7, 2024 22:42
@github-actions github-actions bot locked and limited conversation to collaborators Mar 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants