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

VersionString() API selftest #139

Merged
merged 1 commit into from Jun 25, 2022

Conversation

grantseltzer
Copy link
Member

@grantseltzer grantseltzer commented Mar 16, 2022

FAQ

Is this the most useful selftest? No.

Is it good to have? ok.

Signed-off-by: grantseltzer grantseltzer@gmail.com

kakkoyun
kakkoyun previously approved these changes Mar 17, 2022
@@ -0,0 +1,28 @@
package main

import "C"
Copy link
Collaborator

@rafaeldtinoco rafaeldtinoco Jun 24, 2022

Choose a reason for hiding this comment

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

we dont need import C here.


// libbpf doesn't put the patch version in exported version
// symbols, so use just prefix to exclude it
if strings.HasPrefix(libbpfgo.VersionString(), string(b)) {
Copy link
Collaborator

@rafaeldtinoco rafaeldtinoco Jun 24, 2022

Choose a reason for hiding this comment

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

When I first read libbpfgo.VersionString() I thought we were comparing libbpf version with libbpfgo version (to see if libbpf string was contained in libbpfgo string). Should we change "VersionString" name ?

Copy link
Member Author

@grantseltzer grantseltzer Jun 24, 2022

Choose a reason for hiding this comment

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

Sure!

rafaeldtinoco
rafaeldtinoco previously approved these changes Jun 24, 2022
Copy link
Collaborator

@rafaeldtinoco rafaeldtinoco left a comment

LGTM but I would remove the unneeded import and think about changing the version function name (it looks like we are giving libbpfgo version string and not libbpf one).

Signed-off-by: grantseltzer <grantseltzer@gmail.com>
@grantseltzer
Copy link
Member Author

grantseltzer commented Jun 24, 2022

Done!

@rafaeldtinoco rafaeldtinoco self-requested a review Jun 25, 2022
Copy link
Collaborator

@rafaeldtinoco rafaeldtinoco left a comment

LGTM

@rafaeldtinoco rafaeldtinoco merged commit 6e0937d into aquasecurity:main Jun 25, 2022
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants