Skip to content

Commit

Permalink
ci: fix iast_memcheck flakyness [backport 2.9] (#10154)
Browse files Browse the repository at this point in the history
Backport 8490a40 from #10153 to 2.9.

## Checklist
- [x] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

Co-authored-by: Federico Mon <[email protected]>
  • Loading branch information
github-actions[bot] and gnufede authored Aug 9, 2024
1 parent 9cdc498 commit 709f14f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/appsec/iast_memcheck/test_iast_mem_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ def test_propagation_memory_check(origin1, origin2, iast_span_defaults):
_initializer_size = initializer_size()
assert _initializer_size > 0

assert _num_objects_tainted == num_objects_tainted()
# Some tainted pyobject is freed, and Python may reuse the memory address
# hence the number of tainted objects may be the same or less
assert _num_objects_tainted in (num_objects_tainted(), num_objects_tainted() - 1)
assert _active_map_addreses_size == active_map_addreses_size()
assert _initializer_size == initializer_size()
reset_context()
Expand Down

0 comments on commit 709f14f

Please sign in to comment.