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

Fixes #2518 -- weird behaviour of lookup_or_init #2520

Merged
merged 2 commits into from
Sep 20, 2019

Conversation

pjsg
Copy link
Contributor

@pjsg pjsg commented Sep 20, 2019

This changes the behaviour of map.lookup_or_init so that it returns 0 if the entry is not found and it cannot be inserted (e.g. the map is full). #2518

Documentation updated. Also, all tests and sample code updated.

During testing, found two errors in test setup -- one was a mismatch between a function prototype and the libbcc python definition, and the other was an incorrect python path in the test wrapper.

I can't actually get all the tests to pass on my platform -- but the same set of tests fail on master, so I'm not unduly worried. I didn't understand the test failures -- but they look like a failure to setup the test environment.

…g in the

test runner. Also fixed a bug in libbcc where the python signature did not match
the actual implementation.
@yonghong-song
Copy link
Collaborator

[buildbot, test this please]

@yonghong-song
Copy link
Collaborator

[buildbot, ok to test]

@yonghong-song
Copy link
Collaborator

Thanks! The change looks good to me.

@yonghong-song yonghong-song merged commit ba64f03 into iovisor:master Sep 20, 2019
CrackerCat pushed a commit to CrackerCat/bcc that referenced this pull request Jul 31, 2024
* Allow lookup_or_init to return NULL (rather than just returning from the current function)
* Fixed a couple of bad edits found when running tests. Also fixed a bug in the
test runner. Also fixed a bug in libbcc where the python signature did not match
the actual implementation.
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.

2 participants