Skip to content

Commit c050931

Browse files
authored
[test] Update tags (compiler-research#103)
1 parent 8a448c7 commit c050931

18 files changed

+163
-79
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ jobs:
299299
# Install libraries used by the cppyy test suite
300300
sudo apt install libeigen3-dev
301301
sudo apt install libboost-all-dev
302+
pip install psutil
302303
303304
- name: Install deps on MacOS
304305
if: runner.os == 'macOS'
@@ -706,21 +707,21 @@ jobs:
706707
echo ::endgroup::
707708
echo ::group::Run complete test suite
708709
set -o pipefail
709-
python -m pytest -sv | tee complete_testrun.log 2>&1
710+
python -m pytest -ra -sv | tee complete_testrun.log 2>&1
710711
set +o pipefail
711712
echo ::group::Crashing Test Logs
712713
# See if we don't have a crash that went away
713714
# Comment out all xfails but the ones that have a run=False condition.
714715
find . -name "*.py" -exec sed -i '/run=False/!s/^ *@mark.xfail\(.*\)/#&/' {} \;
715-
python -m pytest -n 1 -m "xfail" --runxfail -sv --max-worker-restart 512 | tee test_crashed.log 2>&1 || true
716+
python -m pytest -n 1 -m "xfail" --runxfail -sv -ra --max-worker-restart 512 | tee test_crashed.log 2>&1 || true
716717
git checkout .
717718
echo ::endgroup::
718719
echo ::group::XFAIL Test Logs
719720
# Rewrite all xfails that have a run clause to skipif. This way we will
720721
# avoid conditionally crashing xfails
721722
find . -name "*.py" -exec sed -i -E 's/(^ *)@mark.xfail\(run=(.*)/\[email protected](condition=not \2/g' {} \;
722723
# See if we don't have an xfail that went away
723-
python -m pytest --runxfail -sv | tee test_xfailed.log 2>&1 || true
724+
python -m pytest --runxfail -sv -ra | tee test_xfailed.log 2>&1 || true
724725
git checkout .
725726
echo ::endgroup::
726727
echo ::group::Passing Test Logs
@@ -734,7 +735,7 @@ jobs:
734735
echo "Running valgrind on passing tests"
735736
CLANG_VERSION="${{ matrix.clang-runtime }}"
736737
SUPPRESSION_FILE="../etc/clang${CLANG_VERSION}-valgrind.supp"
737-
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
738+
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
738739
fi
739740
export RETCODE=+$?
740741
echo ::endgroup::

etc/clang13-valgrind.supp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
Cppyy Suppression
3+
Memcheck:Free
4+
fun:free
5+
obj:*
6+
fun:_ZNK3Cpp7JitCall6InvokeEPvNS0_7ArgListES1_
7+
fun:_ZL11WrapperCallPvmS_S_S_
8+
fun:_ZN5Cppyy5CallVEPvS0_mS0_
9+
fun:_ZL8GILCallVPvS_PN8CPyCppyy11CallContextE
10+
fun:_ZN8CPyCppyy12_GLOBAL__N_112VoidExecutor7ExecuteEPvS2_PNS_11CallContextE
11+
fun:_ZN8CPyCppyy9CPPMethod11ExecuteFastEPvlPNS_11CallContextE
12+
fun:_ZN8CPyCppyy9CPPMethod7ExecuteEPvlPNS_11CallContextE
13+
fun:_ZN8CPyCppyy11CPPFunction4CallERPNS_11CPPInstanceEPKP7_objectmS5_PNS_11CallContextE
14+
fun:_ZN8CPyCppyy12_GLOBAL__N_1L13mp_vectorcallEPNS_11CPPOverloadEPKP7_objectmS4_
15+
fun:_PyObject_VectorcallTstate
16+
fun:PyObject_Vectorcall
17+
}

etc/clang16-valgrind.supp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,24 @@
3232
fun:_ZN5clang7CodeGen15CodeGenFunction19EmitConstructorBodyERNS0_15FunctionArgListE
3333
}
3434

35+
{
36+
Cppyy Suppression
37+
Memcheck:Free
38+
fun:free
39+
obj:*
40+
fun:_ZNK3Cpp7JitCall6InvokeEPvNS0_7ArgListES1_
41+
fun:_ZL11WrapperCallPvmS_S_S_
42+
fun:_ZN5Cppyy5CallVEPvS0_mS0_
43+
fun:_ZL8GILCallVPvS_PN8CPyCppyy11CallContextE
44+
fun:_ZN8CPyCppyy12_GLOBAL__N_112VoidExecutor7ExecuteEPvS2_PNS_11CallContextE
45+
fun:_ZN8CPyCppyy9CPPMethod11ExecuteFastEPvlPNS_11CallContextE
46+
fun:_ZN8CPyCppyy9CPPMethod7ExecuteEPvlPNS_11CallContextE
47+
fun:_ZN8CPyCppyy11CPPFunction4CallERPNS_11CPPInstanceEPKP7_objectmS5_PNS_11CallContextE
48+
fun:_ZN8CPyCppyy12_GLOBAL__N_1L13mp_vectorcallEPNS_11CPPOverloadEPKP7_objectmS4_
49+
fun:_PyObject_VectorcallTstate
50+
fun:PyObject_Vectorcall
51+
}
52+
3553
{
3654
Ubuntu strncmp suppression
3755
Memcheck:Addr8

etc/clang17-valgrind.supp

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,41 @@
201201
fun:_ZN4llvm16SelectionDAGISel20SelectAllBasicBlocksERKNS_8FunctionE
202202
fun:_ZN4llvm16SelectionDAGISel20runOnMachineFunctionERNS_15MachineFunctionE.part.0
203203
}
204+
205+
{
206+
LLVM 17 suppressions : CodeGen
207+
Memcheck:Cond
208+
fun:_ZN5clang7CodeGen13CodeGenModule38SetLLVMFunctionAttributesForDefinitionEPKNS_4DeclEPN4llvm8FunctionE
209+
fun:_ZN5clang7CodeGen13CodeGenModule28EmitGlobalFunctionDefinitionENS_10GlobalDeclEPN4llvm11GlobalValueE
210+
fun:_ZN5clang7CodeGen13CodeGenModule20EmitGlobalDefinitionENS_10GlobalDeclEPN4llvm11GlobalValueE
211+
fun:_ZN5clang7CodeGen13CodeGenModule10EmitGlobalENS_10GlobalDeclE
212+
fun:_ZN5clang7CodeGen13CodeGenModule16EmitTopLevelDeclEPNS_4DeclE.part.0
213+
fun:_ZN12_GLOBAL__N_117CodeGeneratorImpl18HandleTopLevelDeclEN5clang12DeclGroupRefE
214+
fun:_ZN5clang15BackendConsumer18HandleTopLevelDeclENS_12DeclGroupRefE
215+
fun:_ZN5clang22IncrementalASTConsumer18HandleTopLevelDeclENS_12DeclGroupRefE
216+
fun:_ZN5clang17IncrementalParser23ParseOrWrapTopLevelDeclEv
217+
fun:_ZN5clang17IncrementalParser5ParseEN4llvm9StringRefE
218+
fun:_ZN5clang11Interpreter5ParseEN4llvm9StringRefE
219+
fun:_ZN3Cpp11Interpreter7processERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN5clang5ValueEPPNS9_22PartialTranslationUnitEb.isra.0
220+
}
221+
222+
{
223+
Cppyy Suppression
224+
Memcheck:Free
225+
fun:free
226+
obj:*
227+
fun:_ZNK3Cpp7JitCall6InvokeEPvNS0_7ArgListES1_
228+
fun:_ZL11WrapperCallPvmS_S_S_
229+
fun:_ZN5Cppyy5CallVEPvS0_mS0_
230+
fun:_ZL8GILCallVPvS_PN8CPyCppyy11CallContextE
231+
fun:_ZN8CPyCppyy12_GLOBAL__N_112VoidExecutor7ExecuteEPvS2_PNS_11CallContextE
232+
fun:_ZN8CPyCppyy9CPPMethod11ExecuteFastEPvlPNS_11CallContextE
233+
fun:_ZN8CPyCppyy9CPPMethod7ExecuteEPvlPNS_11CallContextE
234+
fun:_ZN8CPyCppyy11CPPFunction4CallERPNS_11CPPInstanceEPKP7_objectmS5_PNS_11CallContextE
235+
fun:_ZN8CPyCppyy12_GLOBAL__N_1L13mp_vectorcallEPNS_11CPPOverloadEPKP7_objectmS4_
236+
fun:_PyObject_VectorcallTstate
237+
fun:PyObject_Vectorcall
238+
}
204239

205240
{
206241
Ubuntu strncmp suppression
@@ -239,21 +274,4 @@
239274
fun:dl_open_worker_begin
240275
fun:_dl_catch_exception
241276
fun:dl_open_worker
242-
}
243-
244-
{
245-
LLVM 18 suppressions : CodeGen
246-
Memcheck:Cond
247-
fun:_ZN5clang7CodeGen13CodeGenModule38SetLLVMFunctionAttributesForDefinitionEPKNS_4DeclEPN4llvm8FunctionE
248-
fun:_ZN5clang7CodeGen13CodeGenModule28EmitGlobalFunctionDefinitionENS_10GlobalDeclEPN4llvm11GlobalValueE
249-
fun:_ZN5clang7CodeGen13CodeGenModule20EmitGlobalDefinitionENS_10GlobalDeclEPN4llvm11GlobalValueE
250-
fun:_ZN5clang7CodeGen13CodeGenModule10EmitGlobalENS_10GlobalDeclE
251-
fun:_ZN5clang7CodeGen13CodeGenModule16EmitTopLevelDeclEPNS_4DeclE.part.0
252-
fun:_ZN12_GLOBAL__N_117CodeGeneratorImpl18HandleTopLevelDeclEN5clang12DeclGroupRefE
253-
fun:_ZN5clang15BackendConsumer18HandleTopLevelDeclENS_12DeclGroupRefE
254-
fun:_ZN5clang22IncrementalASTConsumer18HandleTopLevelDeclENS_12DeclGroupRefE
255-
fun:_ZN5clang17IncrementalParser23ParseOrWrapTopLevelDeclEv
256-
fun:_ZN5clang17IncrementalParser5ParseEN4llvm9StringRefE
257-
fun:_ZN5clang11Interpreter5ParseEN4llvm9StringRefE
258-
fun:_ZN3Cpp11Interpreter7processERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN5clang5ValueEPPNS9_22PartialTranslationUnitEb.isra.0
259277
}

etc/clang18-valgrind.supp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,24 @@
219219
fun:_ZN3Cpp11Interpreter7processERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPN5clang5ValueEPPNS9_22PartialTranslationUnitEb.isra.0
220220
}
221221

222+
{
223+
Cppyy Suppression
224+
Memcheck:Free
225+
fun:free
226+
obj:*
227+
fun:_ZNK3Cpp7JitCall6InvokeEPvNS0_7ArgListES1_
228+
fun:_ZL11WrapperCallPvmS_S_S_
229+
fun:_ZN5Cppyy5CallVEPvS0_mS0_
230+
fun:_ZL8GILCallVPvS_PN8CPyCppyy11CallContextE
231+
fun:_ZN8CPyCppyy12_GLOBAL__N_112VoidExecutor7ExecuteEPvS2_PNS_11CallContextE
232+
fun:_ZN8CPyCppyy9CPPMethod11ExecuteFastEPvlPNS_11CallContextE
233+
fun:_ZN8CPyCppyy9CPPMethod7ExecuteEPvlPNS_11CallContextE
234+
fun:_ZN8CPyCppyy11CPPFunction4CallERPNS_11CPPInstanceEPKP7_objectmS5_PNS_11CallContextE
235+
fun:_ZN8CPyCppyy12_GLOBAL__N_1L13mp_vectorcallEPNS_11CPPOverloadEPKP7_objectmS4_
236+
fun:_PyObject_VectorcallTstate
237+
fun:PyObject_Vectorcall
238+
}
239+
222240
{
223241
Ubuntu strncmp suppression
224242
Memcheck:Addr8

etc/clang19-valgrind.supp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,3 +151,20 @@ fun:_ZN5clang17IncrementalParser5ParseEN4llvm9StringRefE
151151
fun:_ZN5clang11Interpreter5ParseEN4llvm9StringRefE
152152
}
153153

154+
{
155+
Cppyy Suppression
156+
Memcheck:Free
157+
fun:free
158+
obj:*
159+
fun:_ZNK3Cpp7JitCall6InvokeEPvNS0_7ArgListES1_
160+
fun:_ZL11WrapperCallPvmS_S_S_
161+
fun:_ZN5Cppyy5CallVEPvS0_mS0_
162+
fun:_ZL8GILCallVPvS_PN8CPyCppyy11CallContextE
163+
fun:_ZN8CPyCppyy12_GLOBAL__N_112VoidExecutor7ExecuteEPvS2_PNS_11CallContextE
164+
fun:_ZN8CPyCppyy9CPPMethod11ExecuteFastEPvlPNS_11CallContextE
165+
fun:_ZN8CPyCppyy9CPPMethod7ExecuteEPvlPNS_11CallContextE
166+
fun:_ZN8CPyCppyy11CPPFunction4CallERPNS_11CPPInstanceEPKP7_objectmS5_PNS_11CallContextE
167+
fun:_ZN8CPyCppyy12_GLOBAL__N_1L13mp_vectorcallEPNS_11CPPOverloadEPKP7_objectmS4_
168+
fun:_PyObject_VectorcallTstate
169+
fun:PyObject_Vectorcall
170+
}

test/test_advancedcpp.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import py, os, sys
22
from pytest import raises, skip, mark
3-
from .support import setup_make, pylong, IS_WINDOWS, ispypy, IS_CLANG_REPL, IS_MAC_ARM, IS_MAC_X86
3+
from .support import setup_make, pylong, IS_WINDOWS, IS_MAC, IS_LINUX, ispypy, IS_CLANG_REPL, IS_MAC_ARM, IS_MAC_X86
44

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

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

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

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

@@ -664,7 +663,6 @@ def test18_math_converters(self):
664663
assert float(a) == 4321.
665664
assert float(a) == a.m_d
666665

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

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

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

test/test_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import py, os, sys
22
from pytest import raises, skip, mark
3-
from .support import ispypy, IS_MAC_X86, IS_MAC_ARM
3+
from .support import ispypy, IS_MAC
44

55

66
class TestAPI:
@@ -35,7 +35,7 @@ class APICheck {
3535
assert API.Overload_Check(m)
3636
assert API.Overload_CheckExact(m)
3737

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

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

4545
assert API.Exec('import sys')
4646

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

test/test_crossinheritance.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import py, os, sys
22
from pytest import raises, skip, mark
3-
from .support import setup_make, pylong, IS_MAC_ARM, IS_MAC_X86, IS_CLANG_REPL, IS_CLANG_DEBUG
3+
from .support import setup_make, pylong, IS_MAC_ARM, IS_MAC, IS_CLANG_REPL, IS_CLANG_DEBUG
44

55

66
currpath = py.path.local(__file__).dirpath()
@@ -230,7 +230,7 @@ def get_value(self):
230230
p1 = TPyDerived1()
231231
assert p1.get_value() == 13
232232

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

@@ -507,7 +507,7 @@ def __init__(self):
507507
assert m.get_data() == 42
508508
assert m.get_data_v() == 42
509509

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

@@ -575,7 +575,7 @@ def whoami(self):
575575
assert not not new_obj
576576
assert new_obj.whoami() == "PyDerived4"
577577

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

@@ -617,7 +617,7 @@ def whoami(self):
617617
obj = PyDerived()
618618
assert ns.callit(obj) == "PyDerived"
619619

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

@@ -664,7 +664,7 @@ def whoami(self):
664664
assert obj.whoami() == "PyDerived4"
665665
assert ns.callit(obj) == "PyDerived4"
666666

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

@@ -997,7 +997,7 @@ def verify(a, n1, n2, n3):
997997
a = MyPyDerived(27, 55, nArgs=2)
998998
verify(a, 27, 55, 67)
999999

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

@@ -1241,7 +1241,7 @@ class MyPyDerived(ns.Derived):
12411241
assert obj.calc2() == 2
12421242
assert ns.callback2(obj) == 2
12431243

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

test/test_datatypes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import py, os, sys
22
from pytest import raises, skip, mark
3-
from .support import setup_make, pylong, pyunicode, IS_CLANG_REPL, IS_MAC_X86, IS_MAC_ARM, IS_MAC
3+
from .support import setup_make, pylong, pyunicode, IS_CLANG_REPL, IS_MAC_X86, IS_MAC_ARM, IS_MAC, IS_LINUX
44

55
IS_MAC = IS_MAC_X86 or IS_MAC_ARM
66

@@ -2055,7 +2055,7 @@ def test40_more_aggregates(self):
20552055
r2 = ns.make_R2()
20562056
assert r2.s.x == 1
20572057

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

0 commit comments

Comments
 (0)