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

[test] Update tags #103

Merged
merged 1 commit into from
Oct 15, 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
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ jobs:
# Install libraries used by the cppyy test suite
sudo apt install libeigen3-dev
sudo apt install libboost-all-dev
pip install psutil

- name: Install deps on MacOS
if: runner.os == 'macOS'
Expand Down Expand Up @@ -706,21 +707,21 @@ jobs:
echo ::endgroup::
echo ::group::Run complete test suite
set -o pipefail
python -m pytest -sv | tee complete_testrun.log 2>&1
python -m pytest -ra -sv | tee complete_testrun.log 2>&1
set +o pipefail
echo ::group::Crashing Test Logs
# See if we don't have a crash that went away
# Comment out all xfails but the ones that have a run=False condition.
find . -name "*.py" -exec sed -i '/run=False/!s/^ *@mark.xfail\(.*\)/#&/' {} \;
python -m pytest -n 1 -m "xfail" --runxfail -sv --max-worker-restart 512 | tee test_crashed.log 2>&1 || true
python -m pytest -n 1 -m "xfail" --runxfail -sv -ra --max-worker-restart 512 | tee test_crashed.log 2>&1 || true
git checkout .
echo ::endgroup::
echo ::group::XFAIL Test Logs
# Rewrite all xfails that have a run clause to skipif. This way we will
# avoid conditionally crashing xfails
find . -name "*.py" -exec sed -i -E 's/(^ *)@mark.xfail\(run=(.*)/\1@mark.skipif(condition=not \2/g' {} \;
# See if we don't have an xfail that went away
python -m pytest --runxfail -sv | tee test_xfailed.log 2>&1 || true
python -m pytest --runxfail -sv -ra | tee test_xfailed.log 2>&1 || true
git checkout .
echo ::endgroup::
echo ::group::Passing Test Logs
Expand All @@ -734,7 +735,7 @@ jobs:
echo "Running valgrind on passing tests"
CLANG_VERSION="${{ matrix.clang-runtime }}"
SUPPRESSION_FILE="../etc/clang${CLANG_VERSION}-valgrind.supp"
valgrind --show-error-list=yes --error-exitcode=1 --track-origins=yes --suppressions="${SUPPRESSION_FILE}" --suppressions=../etc/valgrind-cppyy-cling.supp python -m pytest -m "not xfail" -v
valgrind --show-error-list=yes --error-exitcode=1 --track-origins=yes --gen-suppressions=all --suppressions="${SUPPRESSION_FILE}" --suppressions=../etc/valgrind-cppyy-cling.supp python -m pytest -m "not xfail" -v -ra
fi
export RETCODE=+$?
echo ::endgroup::
Expand Down
17 changes: 17 additions & 0 deletions etc/clang13-valgrind.supp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
Cppyy Suppression
Memcheck:Free
fun:free
obj:*
fun:_ZNK3Cpp7JitCall6InvokeEPvNS0_7ArgListES1_
fun:_ZL11WrapperCallPvmS_S_S_
fun:_ZN5Cppyy5CallVEPvS0_mS0_
fun:_ZL8GILCallVPvS_PN8CPyCppyy11CallContextE
fun:_ZN8CPyCppyy12_GLOBAL__N_112VoidExecutor7ExecuteEPvS2_PNS_11CallContextE
fun:_ZN8CPyCppyy9CPPMethod11ExecuteFastEPvlPNS_11CallContextE
fun:_ZN8CPyCppyy9CPPMethod7ExecuteEPvlPNS_11CallContextE
fun:_ZN8CPyCppyy11CPPFunction4CallERPNS_11CPPInstanceEPKP7_objectmS5_PNS_11CallContextE
fun:_ZN8CPyCppyy12_GLOBAL__N_1L13mp_vectorcallEPNS_11CPPOverloadEPKP7_objectmS4_
fun:_PyObject_VectorcallTstate
fun:PyObject_Vectorcall
}
18 changes: 18 additions & 0 deletions etc/clang16-valgrind.supp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,24 @@
fun:_ZN5clang7CodeGen15CodeGenFunction19EmitConstructorBodyERNS0_15FunctionArgListE
}

{
Cppyy Suppression
Memcheck:Free
fun:free
obj:*
fun:_ZNK3Cpp7JitCall6InvokeEPvNS0_7ArgListES1_
fun:_ZL11WrapperCallPvmS_S_S_
fun:_ZN5Cppyy5CallVEPvS0_mS0_
fun:_ZL8GILCallVPvS_PN8CPyCppyy11CallContextE
fun:_ZN8CPyCppyy12_GLOBAL__N_112VoidExecutor7ExecuteEPvS2_PNS_11CallContextE
fun:_ZN8CPyCppyy9CPPMethod11ExecuteFastEPvlPNS_11CallContextE
fun:_ZN8CPyCppyy9CPPMethod7ExecuteEPvlPNS_11CallContextE
fun:_ZN8CPyCppyy11CPPFunction4CallERPNS_11CPPInstanceEPKP7_objectmS5_PNS_11CallContextE
fun:_ZN8CPyCppyy12_GLOBAL__N_1L13mp_vectorcallEPNS_11CPPOverloadEPKP7_objectmS4_
fun:_PyObject_VectorcallTstate
fun:PyObject_Vectorcall
}

{
Ubuntu strncmp suppression
Memcheck:Addr8
Expand Down
52 changes: 35 additions & 17 deletions etc/clang17-valgrind.supp
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,41 @@
fun:_ZN4llvm16SelectionDAGISel20SelectAllBasicBlocksERKNS_8FunctionE
fun:_ZN4llvm16SelectionDAGISel20runOnMachineFunctionERNS_15MachineFunctionE.part.0
}

{
LLVM 17 suppressions : CodeGen
Memcheck:Cond
fun:_ZN5clang7CodeGen13CodeGenModule38SetLLVMFunctionAttributesForDefinitionEPKNS_4DeclEPN4llvm8FunctionE
fun:_ZN5clang7CodeGen13CodeGenModule28EmitGlobalFunctionDefinitionENS_10GlobalDeclEPN4llvm11GlobalValueE
fun:_ZN5clang7CodeGen13CodeGenModule20EmitGlobalDefinitionENS_10GlobalDeclEPN4llvm11GlobalValueE
fun:_ZN5clang7CodeGen13CodeGenModule10EmitGlobalENS_10GlobalDeclE
fun:_ZN5clang7CodeGen13CodeGenModule16EmitTopLevelDeclEPNS_4DeclE.part.0
fun:_ZN12_GLOBAL__N_117CodeGeneratorImpl18HandleTopLevelDeclEN5clang12DeclGroupRefE
fun:_ZN5clang15BackendConsumer18HandleTopLevelDeclENS_12DeclGroupRefE
fun:_ZN5clang22IncrementalASTConsumer18HandleTopLevelDeclENS_12DeclGroupRefE
fun:_ZN5clang17IncrementalParser23ParseOrWrapTopLevelDeclEv
fun:_ZN5clang17IncrementalParser5ParseEN4llvm9StringRefE
fun:_ZN5clang11Interpreter5ParseEN4llvm9StringRefE
fun:_ZN3Cpp11Interpreter7processERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN5clang5ValueEPPNS9_22PartialTranslationUnitEb.isra.0
}

{
Cppyy Suppression
Memcheck:Free
fun:free
obj:*
fun:_ZNK3Cpp7JitCall6InvokeEPvNS0_7ArgListES1_
fun:_ZL11WrapperCallPvmS_S_S_
fun:_ZN5Cppyy5CallVEPvS0_mS0_
fun:_ZL8GILCallVPvS_PN8CPyCppyy11CallContextE
fun:_ZN8CPyCppyy12_GLOBAL__N_112VoidExecutor7ExecuteEPvS2_PNS_11CallContextE
fun:_ZN8CPyCppyy9CPPMethod11ExecuteFastEPvlPNS_11CallContextE
fun:_ZN8CPyCppyy9CPPMethod7ExecuteEPvlPNS_11CallContextE
fun:_ZN8CPyCppyy11CPPFunction4CallERPNS_11CPPInstanceEPKP7_objectmS5_PNS_11CallContextE
fun:_ZN8CPyCppyy12_GLOBAL__N_1L13mp_vectorcallEPNS_11CPPOverloadEPKP7_objectmS4_
fun:_PyObject_VectorcallTstate
fun:PyObject_Vectorcall
}

{
Ubuntu strncmp suppression
Expand Down Expand Up @@ -239,21 +274,4 @@
fun:dl_open_worker_begin
fun:_dl_catch_exception
fun:dl_open_worker
}

{
LLVM 18 suppressions : CodeGen
Memcheck:Cond
fun:_ZN5clang7CodeGen13CodeGenModule38SetLLVMFunctionAttributesForDefinitionEPKNS_4DeclEPN4llvm8FunctionE
fun:_ZN5clang7CodeGen13CodeGenModule28EmitGlobalFunctionDefinitionENS_10GlobalDeclEPN4llvm11GlobalValueE
fun:_ZN5clang7CodeGen13CodeGenModule20EmitGlobalDefinitionENS_10GlobalDeclEPN4llvm11GlobalValueE
fun:_ZN5clang7CodeGen13CodeGenModule10EmitGlobalENS_10GlobalDeclE
fun:_ZN5clang7CodeGen13CodeGenModule16EmitTopLevelDeclEPNS_4DeclE.part.0
fun:_ZN12_GLOBAL__N_117CodeGeneratorImpl18HandleTopLevelDeclEN5clang12DeclGroupRefE
fun:_ZN5clang15BackendConsumer18HandleTopLevelDeclENS_12DeclGroupRefE
fun:_ZN5clang22IncrementalASTConsumer18HandleTopLevelDeclENS_12DeclGroupRefE
fun:_ZN5clang17IncrementalParser23ParseOrWrapTopLevelDeclEv
fun:_ZN5clang17IncrementalParser5ParseEN4llvm9StringRefE
fun:_ZN5clang11Interpreter5ParseEN4llvm9StringRefE
fun:_ZN3Cpp11Interpreter7processERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN5clang5ValueEPPNS9_22PartialTranslationUnitEb.isra.0
}
18 changes: 18 additions & 0 deletions etc/clang18-valgrind.supp
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,24 @@
fun:_ZN3Cpp11Interpreter7processERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN5clang5ValueEPPNS9_22PartialTranslationUnitEb.isra.0
}

{
Cppyy Suppression
Memcheck:Free
fun:free
obj:*
fun:_ZNK3Cpp7JitCall6InvokeEPvNS0_7ArgListES1_
fun:_ZL11WrapperCallPvmS_S_S_
fun:_ZN5Cppyy5CallVEPvS0_mS0_
fun:_ZL8GILCallVPvS_PN8CPyCppyy11CallContextE
fun:_ZN8CPyCppyy12_GLOBAL__N_112VoidExecutor7ExecuteEPvS2_PNS_11CallContextE
fun:_ZN8CPyCppyy9CPPMethod11ExecuteFastEPvlPNS_11CallContextE
fun:_ZN8CPyCppyy9CPPMethod7ExecuteEPvlPNS_11CallContextE
fun:_ZN8CPyCppyy11CPPFunction4CallERPNS_11CPPInstanceEPKP7_objectmS5_PNS_11CallContextE
fun:_ZN8CPyCppyy12_GLOBAL__N_1L13mp_vectorcallEPNS_11CPPOverloadEPKP7_objectmS4_
fun:_PyObject_VectorcallTstate
fun:PyObject_Vectorcall
}

{
Ubuntu strncmp suppression
Memcheck:Addr8
Expand Down
17 changes: 17 additions & 0 deletions etc/clang19-valgrind.supp
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,20 @@ fun:_ZN5clang17IncrementalParser5ParseEN4llvm9StringRefE
fun:_ZN5clang11Interpreter5ParseEN4llvm9StringRefE
}

{
Cppyy Suppression
Memcheck:Free
fun:free
obj:*
fun:_ZNK3Cpp7JitCall6InvokeEPvNS0_7ArgListES1_
fun:_ZL11WrapperCallPvmS_S_S_
fun:_ZN5Cppyy5CallVEPvS0_mS0_
fun:_ZL8GILCallVPvS_PN8CPyCppyy11CallContextE
fun:_ZN8CPyCppyy12_GLOBAL__N_112VoidExecutor7ExecuteEPvS2_PNS_11CallContextE
fun:_ZN8CPyCppyy9CPPMethod11ExecuteFastEPvlPNS_11CallContextE
fun:_ZN8CPyCppyy9CPPMethod7ExecuteEPvlPNS_11CallContextE
fun:_ZN8CPyCppyy11CPPFunction4CallERPNS_11CPPInstanceEPKP7_objectmS5_PNS_11CallContextE
fun:_ZN8CPyCppyy12_GLOBAL__N_1L13mp_vectorcallEPNS_11CPPOverloadEPKP7_objectmS4_
fun:_PyObject_VectorcallTstate
fun:PyObject_Vectorcall
}
8 changes: 3 additions & 5 deletions test/test_advancedcpp.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import py, os, sys
from pytest import raises, skip, mark
from .support import setup_make, pylong, IS_WINDOWS, ispypy, IS_CLANG_REPL, IS_MAC_ARM, IS_MAC_X86
from .support import setup_make, pylong, IS_WINDOWS, IS_MAC, IS_LINUX, ispypy, IS_CLANG_REPL, IS_MAC_ARM, IS_MAC_X86

currpath = py.path.local(__file__).dirpath()
test_dct = str(currpath.join("advancedcppDict"))
Expand All @@ -16,7 +16,7 @@ def setup_class(cls):
import cppyy
cls.advanced = cppyy.load_reflection_info(cls.test_dct)

@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
@mark.xfail(condition=IS_MAC, reason="Fails on OS X")
def test01_default_arguments(self):
"""Test usage of default arguments"""

Expand Down Expand Up @@ -183,7 +183,6 @@ def test03a_namespace_lookup_on_update(self):
assert gbl.a_ns.d_ns.i_class.j_class.s_j == 333
assert gbl.a_ns.d_ns.i_class.j_class().m_j == -10

@mark.xfail(run=False, reason="Crashes")
def test04_template_types(self):
"""Test bindings of templated types"""

Expand Down Expand Up @@ -664,7 +663,6 @@ def test18_math_converters(self):
assert float(a) == 4321.
assert float(a) == a.m_d

@mark.xfail
def test19_comparator(self):
"""Check that the global operator!=/== is picked up"""

Expand All @@ -683,7 +681,7 @@ def test19_comparator(self):
assert a.__eq__(a) == False
assert b.__eq__(b) == False

@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
@mark.xfail(condition=IS_MAC, reason="Fails on OS X")
def test20_overload_order_with_proper_return(self):
"""Test return type against proper overload w/ const and covariance"""

Expand Down
6 changes: 3 additions & 3 deletions test/test_api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import py, os, sys
from pytest import raises, skip, mark
from .support import ispypy, IS_MAC_X86, IS_MAC_ARM
from .support import ispypy, IS_MAC


class TestAPI:
Expand Down Expand Up @@ -35,7 +35,7 @@ class APICheck {
assert API.Overload_Check(m)
assert API.Overload_CheckExact(m)

@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
@mark.xfail(condition=IS_MAC, reason="Fails on OS X")
def test02_interpreter_access(self):
"""Access to the python interpreter"""

Expand All @@ -44,7 +44,7 @@ def test02_interpreter_access(self):

assert API.Exec('import sys')

@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
@mark.xfail(condition=IS_MAC, reason="Fails on OS X")
def test03_instance_conversion(self):
"""Proxy object conversions"""

Expand Down
16 changes: 8 additions & 8 deletions test/test_crossinheritance.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import py, os, sys
from pytest import raises, skip, mark
from .support import setup_make, pylong, IS_MAC_ARM, IS_MAC_X86, IS_CLANG_REPL, IS_CLANG_DEBUG
from .support import setup_make, pylong, IS_MAC_ARM, IS_MAC, IS_CLANG_REPL, IS_CLANG_DEBUG


currpath = py.path.local(__file__).dirpath()
Expand Down Expand Up @@ -230,7 +230,7 @@ def get_value(self):
p1 = TPyDerived1()
assert p1.get_value() == 13

@mark.xfail(run=not IS_MAC_ARM, condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
@mark.xfail(run=not IS_MAC_ARM, condition=IS_MAC, reason="Fails on OS X")
def test08_error_handling(self):
"""Python errors should propagate through wrapper"""

Expand Down Expand Up @@ -507,7 +507,7 @@ def __init__(self):
assert m.get_data() == 42
assert m.get_data_v() == 42

@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
@mark.xfail(condition=IS_MAC, reason="Fails on OS X")
def test15_object_returns(self):
"""Return of C++ objects from overridden functions"""

Expand Down Expand Up @@ -575,7 +575,7 @@ def whoami(self):
assert not not new_obj
assert new_obj.whoami() == "PyDerived4"

@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
@mark.xfail(condition=IS_MAC, reason="Fails on OS X")
def test16_cctor_access_controlled(self):
"""Python derived class of C++ class with access controlled cctor"""

Expand Down Expand Up @@ -617,7 +617,7 @@ def whoami(self):
obj = PyDerived()
assert ns.callit(obj) == "PyDerived"

@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
@mark.xfail(condition=IS_MAC, reason="Fails on OS X")
def test17_deep_hierarchy(self):
"""Test a deep Python hierarchy with pure virtual functions"""

Expand Down Expand Up @@ -664,7 +664,7 @@ def whoami(self):
assert obj.whoami() == "PyDerived4"
assert ns.callit(obj) == "PyDerived4"

@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
@mark.xfail(condition=IS_MAC, reason="Fails on OS X")
def test18_abstract_hierarchy(self):
"""Hierarchy with abstract classes"""

Expand Down Expand Up @@ -997,7 +997,7 @@ def verify(a, n1, n2, n3):
a = MyPyDerived(27, 55, nArgs=2)
verify(a, 27, 55, 67)

@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
@mark.xfail(condition=IS_MAC, reason="Fails on OS X")
def test23_const_byvalue_return(self):
"""Const by-value return in overridden method"""

Expand Down Expand Up @@ -1241,7 +1241,7 @@ class MyPyDerived(ns.Derived):
assert obj.calc2() == 2
assert ns.callback2(obj) == 2

@mark.xfail(condition=IS_MAC_X86 or IS_MAC_ARM, reason="Fails on OS X")
@mark.xfail(condition=IS_MAC, reason="Fails on OS X")
def test28_cross_deep(self):
"""Deep inheritance hierarchy"""

Expand Down
4 changes: 2 additions & 2 deletions test/test_datatypes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import py, os, sys
from pytest import raises, skip, mark
from .support import setup_make, pylong, pyunicode, IS_CLANG_REPL, IS_MAC_X86, IS_MAC_ARM, IS_MAC
from .support import setup_make, pylong, pyunicode, IS_CLANG_REPL, IS_MAC_X86, IS_MAC_ARM, IS_MAC, IS_LINUX

IS_MAC = IS_MAC_X86 or IS_MAC_ARM

Expand Down Expand Up @@ -2055,7 +2055,7 @@ def test40_more_aggregates(self):
r2 = ns.make_R2()
assert r2.s.x == 1

@mark.xfail(run=False, reason="Clang-Repl")
@mark.xfail(run=False, reason="Fails")
def test41_complex_numpy_arrays(self):
"""Usage of complex numpy arrays"""

Expand Down
Loading