8000 fix(tests): possible out of range in integration by geyslan · Pull Request #4305 · aquasecurity/tracee · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(tests): possible out of range in integration #4305

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

Merged
merged 2 commits into from
Dec 3, 2024

Conversation

geyslan
Copy link
Member
@geyslan geyslan commented Sep 17, 2024

Close: #4255

1. Explain what the PR does

5cf2d9d fix(tests): use ExpectAtLeastOneForEach

Two test cases were using ExpectAllInOrderSequentially helper function
and passing by luck, since they emit more events than expected only
beyond the expected events boundary.

For that cases we should use ExpectAtLeastOneForEach helper function
instead.

34be7e0 fix(tests): possible out of range in integration

ExpectAllInOrderSequentially might try to access an index out of range
depending on the number of events that are being checked.

More about in issue #4255.
``` in issue #4255.

2. Explain how to test it

3. Other comments

@geyslan geyslan force-pushed the 4255-fix-expect-all-in-order branch 2 times, most recently from cd4862a to 0c1d041 Compare September 25, 2024 15:12
@geyslan geyslan force-pushed the 4255-fix-expect-all-in-order branch from 0c1d041 to ac47cab Compare November 14, 2024 17:19
ExpectAllInOrderSequentially might try to access an index ou
8000
t of range
depending on the number of events that are being checked.

More about in issue aquasecurity#4255.
Two test cases were using ExpectAllInOrderSequentially helper function
and passing by luck, since they emit more events than expected only
beyond the expected events boundary.

For that cases we should use ExpectAtLeastOneForEach helper function
instead.
@geyslan geyslan force-pushed the 4255-fix-expect-all-in-order branch from ac47cab to 5cf2d9d Compare December 3, 2024 19:19
@geyslan
Copy link
Member Author
geyslan commented Dec 3, 2024

/fast-forward

Copy link
github-actions bot commented Dec 3, 2024

Triggered from #4305 (comment) by @​geyslan.

Trying to fast forward main (bae1532) to 4255-fix-expect-all-in-order (5cf2d9d).

Target branch (main):

commit bae153278e76f10082bd40533fbd2c3e4140fb17 (HEAD -> main, origin/main, origin/HEAD)
Author: Geyslan Gregório <geyslan@gmail.com>
Date:   Tue Oct 15 11:33:18 2024 -0300

    chore(performance): update tracee dashboard

Pull request (4255-fix-expect-all-in-order):

commit 5cf2d9d1b5a9b3ffde3f4d279e018eef5c6de8cd (pull_request/4255-fix-expect-all-in-order)
Author: Geyslan Gregório <geyslan@gmail.com>
Date:   Wed Sep 25 12:02:29 2024 -0300

    fix(tests): use ExpectAtLeastOneForEach
    
    Two test cases were using ExpectAllInOrderSequentially helper function
    and passing by luck, since they emit more events than expected only
    beyond the expected events boundary.
    
    For that cases we should use ExpectAtLeastOneForEach helper function
    instead.

Fast forwarding main (bae1532) to 4255-fix-expect-all-in-order (5cf2d9d).

$ git push origin 5cf2d9d1b5a9b3ffde3f4d279e018eef5c6de8cd:main
remote: error: GH006: Protected branch update failed for refs/heads/main.        
remote: 
remote: - At least 1 approving review is required by reviewers with write access.        
To https://github.com/aquasecurity/tracee.git
 ! [remote rejected]   5cf2d9d1b5a9b3ffde3f4d279e018eef5c6de8cd -> main (protected branch hook declined)
error: failed to push some refs to 'https://github.com/aquasecurity/tracee.git'

@geyslan geyslan merged commit 8f63209 into aquasecurity:main Dec 3, 2024
31 checks passed
@geyslan geyslan deleted the 4255-fix-expect-all-in-order branch February 19, 2025 20:14
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.

Possible bug in Test_EventFilters when a case has many cmdEvent and each cmdEvent has different number of expectEvent.
2 participants
0