-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
CI: add CI for runtime tests #338
base: master
Are you sure you want to change the base?
Conversation
@yunwei37 can we also add macOS machine tests in this? |
@hp77-creator Can you help fix the build in github actions? We can test in Linux first. |
Seems there are github actions that can run on MacOS: https://github.com/actions/runner-images/tree/main/images/macos You can pick one and try to add them. |
I also create a issue in #340 |
Shall I add my changes in this PR only @yunwei37 ? |
I will check these. |
You can add change to this pr by pushing to the branch. (I think you have access to that? Thanks! |
very strange thing is happening, I tried running the commands that you have used for |
56b5db0
to
ed9212a
Compare
Maybe you have installed libbpf locally in Linux? I also get similar results before |
yea, so on my VM, there is already libbpf present, so its working fine, on MacOS, that is not required so its not using it. Hence tests are passing on my systems but are failing in CI. I will add the guards where there is use of |
|
0908018
to
9c9a7d9
Compare
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.
LGTM. @Officeyutong can you also check once on the guards that I have added.
@@ -17,7 +17,7 @@ jobs: | |||
- ubuntu-2204 | |||
- fedora-39 | |||
container: | |||
image: "manjusakalza/bpftime-base-image:${{matrix.container}}" | |||
image: "hp77creator/bpftime-base-image:${{matrix.container}}" |
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.
What about getting these images to account eunomia-bpf? Do you have permission to do that?
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.
for the ghci images, will have to configure i guess, For the time being, I focussed more on making the existing setup pass. We can create an issue to migrate these to eunomia ones. Works @Officeyutong ?
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.
#341 addresses this. You can add more requirements on the issue if I am missing something.
#if __linux__ && !BPFTIME_BUILD_WITH_LIBBPF | ||
#define offsetofend(type, member) (offsetof(type, member) + sizeof(((type *)0)->member)) | ||
static void *libc_handle = dlopen(LIBC_SO, RTLD_LAZY); | ||
static auto libc_syscall = |
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.
Original syscall from libc was already stored at
syscall_fn orig_syscall_fn = nullptr; |
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.
above definition is to support the bpf_get_obj_by_fd
function. I see that there is a place where original syscall is being stored, but it is defined inside a member function. Do you want me to replace libc_handle
with syscall_fun
?
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.
Where was bpf_get_obj_by_fd called?
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.
wrong function at my end. It was actually bpf_obj_get_info_by_fd
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.
bpf_obj_get_info_by_fd
bpf_obj_get_info_by_fd
is only called by member function of syscall_context, so it's ok to use functions stored in syscall_context
f83a86d
to
962508a
Compare
@yunwei37 @Officeyutong build is failing now becaues of this: any idea? I have run the exact cmake commands in my fedora VM, its building fine there |
It fails because of another recent PR, which changed the definition of Field You may need to update submodule, since llvmbpf is now in a submodule |
Now more things are breaking, somewhere |
No worries, I will help fix that |
@yunwei37 for that CI codecov, shall I raise one or will this be fixed before? |
1354316
to
a6a132b
Compare
d91c367
to
47f7087
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #338 +/- ##
=========================================
Coverage ? 97.34%
=========================================
Files ? 10
Lines ? 377
Branches ? 12
=========================================
Hits ? 367
Misses ? 10
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
* add xdp-counter example * add build in ci
* fix link dl and cmake vesion * add dev container * docs: include PATH in the README * bump upload to v4 * fix hidden files
* feat:add lcov support for test * update * update * update * update * update * update * update * update * update * update * update
47f7087
to
d3993e1
Compare
Description
Fixes #332
Type of change