-
Notifications
You must be signed in to change notification settings - Fork 49
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 tracers tests (New) #735
Conversation
Codecov Report
@@ Coverage Diff @@
## main #735 +/- ##
=======================================
Coverage 34.83% 34.83%
=======================================
Files 302 302
Lines 34165 34165
Branches 5909 5909
=======================================
Hits 11903 11903
Misses 21697 21697
Partials 565 565
Flags with carried forward coverage won't be shown. Click here to find out more. |
Can't assign reviewer but @zongminl and @LaiderLai should be in it. |
What are the reasons why I'd suggest turning the two proposed jobs into a resource job that would output something like that: ptrace: supported More tracers could be added in the future to this resource.
|
Yep, https://github.com/torvalds/linux/blob/master/kernel/trace/Kconfig#L157 |
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.
Looks great. One comment about descriptions below.
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.
Unless I'm missing something, this will not work as intended, as the resource job kernel_config_file
has to be included in the test plan in the "bootstrapping_include" section, otherwise the ftrace will never run.
I've also placed some comments below.
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.
when any of those tests fail the error code is not propagated, so in the end this may happen:
=========[ Running job 2 / 3. Estimated time left (at least): 0:00:00 ]=========
--------------------[ Tests the ptrace tracer availability ]--------------------
ID: com.canonical.certification::tracers/ptrace
Category: com.canonical.plainbox::uncategorised
... 8< -------------------------------------------------------------------------
ptrace: unsupported
------------------------------------------------------------------------- >8 ---
Outcome: job passed
/canonical/self-hosted-runners/run-workflows ca01039 |
1 similar comment
/canonical/self-hosted-runners/run-workflows ca01039 |
This binary is intended to check availability of ptrace features. Signed-off-by: Alexandre Esse <[email protected]>
This tracers unit got created because there is other possible tracers to be tested such as ftrace. Signed-off-by: Alexandre Esse <[email protected]>
This test check running kernel config enabled ftrace. Signed-off-by: Alexandre Esse <[email protected]>
This test checks for tracefs file system availability. It should be used by ftrace. Signed-off-by: Alexandre Esse <[email protected]>
This file might be absent for different reasons: - disabled in kernel configuration - stored in a different location than the default one here (/boot/config-*) Signed-off-by: Alexandre Esse <[email protected]>
/canonical/self-hosted-runners/run-workflows 0ef5bdc |
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.
Fantastic work, TYVM
This is an attempt to add
ptrace
andftrace
tests in checkbox.Description
For a specific project at Canonical we are using checkbox and we need to check for the availability of user-space
ptrace
andftrace
tools in our images. Thus, we want to add a dedicated test to check this and since it could be relevant to other, this might be into base checkbox test plan.This, PR:
ptrace_test
(source code in C) that aims to test theptrace()
system call availability.ptrace_test
.ftrace
availability (based on the availability oftracefs
).A potential alternative to the usage of specific
ptrace_test
binary: parsing/proc/kallsyms
got identified but not developed.Resolved issues
Associated Jira ticket
Documentation
Tests