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

Try xfail on ctypes array delete to fix valgrind leak #70

Merged
merged 5 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ jobs:
valgrind --error-exitcode=1 --suppressions=../etc/valgrind-cppyy-cling.supp python -m pytest -m "not xfail" -v || true
else
echo "Running valgrind on passing tests"
valgrind --error-exitcode=1 --suppressions=../etc/valgrind-cppyy-cling.supp python -m pytest -m "not xfail" -v
valgrind --show-error-list=yes --error-exitcode=1 --suppressions=../etc/valgrind-cppyy-cling.supp python -m pytest -m "not xfail" -v
fi
export RETCODE=+$?
echo ::endgroup::
Expand Down
3 changes: 1 addition & 2 deletions test/test_lowlevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ def test04_python_casts(self):
ptrptr = cppyy.ll.as_ctypes(s, byref=True)
assert pycasts.get_deref(ptrptr) == actual

@mark.xfail
def test05_array_as_ref(self):
"""Use arrays for pass-by-ref"""

Expand Down Expand Up @@ -138,7 +137,7 @@ def test05_array_as_ref(self):
f = array('f', [0]); ctd.set_float_r(f); assert f[0] == 5.
f = array('d', [0]); ctd.set_double_r(f); assert f[0] == -5.

@mark.skipif(not IS_CLANG_REPL, reason="Crashes on Cling")
@mark.xfail(reason = "Valgrind detects memory leak with invalid delete[] operator")
def test06_ctypes_as_ref_and_ptr(self):
"""Use ctypes for pass-by-ref/ptr"""

Expand Down
Loading