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

test: Don't collapse dmesg in CI when there's a kernel call trace #14150

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

MggMuggins
Copy link
Contributor

It would have saved me some time if the dmesg hadn't been collapsed while I was chasing this kernel bug.

Not thinking of any situation where we wouldn't want to know about a call trace in the dmesg during CI.

simondeziel
simondeziel previously approved these changes Sep 23, 2024
Copy link
Member

@simondeziel simondeziel left a comment

Choose a reason for hiding this comment

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

LGTM with a tiny optional nit

test/main.sh Outdated Show resolved Hide resolved
simondeziel
simondeziel previously approved these changes Sep 23, 2024
test/main.sh Outdated Show resolved Hide resolved
@MggMuggins
Copy link
Contributor Author

MggMuggins commented Sep 23, 2024

Wasn't having any luck with journalctl --grep, went back to grep -q; should be good to go now.

simondeziel
simondeziel previously approved these changes Sep 23, 2024
@simondeziel
Copy link
Member

Wasn't having any luck with journalctl --grep, went back to grep -q; should be good to go now.

Oh, sorry about that. Works here:

$ journalctl --quiet --no-hostname --no-pager --boot=0 --lines=100 --dmesg --grep 'apparmor="DENIED" operation="open"'
Sep 23 17:12:24 kernel: audit: type=1400 audit(1727125944.612:1494): apparmor="DENIED" operation="open" class="file" profile="snap.canonical-secscan-client.secscan-client" name="/home/sdeziel/git/pylxd/" pid=84017 comm="python3" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Sep 23 17:12:35 kernel: audit: type=1400 audit(1727125955.505:1495): apparmor="DENIED" operation="open" class="file" profile="snap.canonical-secscan-client.secscan-client" name="/home/sdeziel/git/pylxd/" pid=84090 comm="python3" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000

$ journalctl --quiet --no-hostname --no-pager --boot=0 --lines=100 --dmesg  | grep 'apparmor="DENIED" operation="open"'
Sep 23 17:12:24 kernel: audit: type=1400 audit(1727125944.612:1494): apparmor="DENIED" operation="open" class="file" profile="snap.canonical-secscan-client.secscan-client" name="/home/sdeziel/git/pylxd/" pid=84017 comm="python3" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Sep 23 17:12:35 kernel: audit: type=1400 audit(1727125955.505:1495): apparmor="DENIED" operation="open" class="file" profile="snap.canonical-secscan-client.secscan-client" name="/home/sdeziel/git/pylxd/" pid=84090 comm="python3" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000

Oh well, whatever works :)

@MggMuggins
Copy link
Contributor Author

Bet it would work with just --grep 'Call Trace:', I was including the kernel: prefix which I guess isn't part of what's being grepped.

@simondeziel
Copy link
Member

Bet it would work with just --grep 'Call Trace:', I was including the kernel: prefix which I guess isn't part of what's being grepped.

Right you are, thanks!

@MggMuggins
Copy link
Contributor Author

Updated with that change.

Signed-off-by: Wesley Hershberger <wesley.hershberger@canonical.com>
@tomponline tomponline merged commit ede7666 into canonical:main Sep 25, 2024
28 of 30 checks passed
@MggMuggins MggMuggins deleted the show-kernel-calltrace branch September 25, 2024 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants