mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-04 14:54:26 +01:00
pytest: Use valgrind target suppressions instead of skipping tests
Having a list of very targeted suppressions allows us to still run the majority of tests with valgrind checking, and not fail when Rust does some trickery. This is for example the case with `std::sync::Once` which uses `num_procs` calling out to the cgroups subsystem, sometimes with a null path. Suggested-by: Rusty Russell <@rustyrussell>
This commit is contained in:
committed by
Rusty Russell
parent
a1555623bc
commit
4aba119733
@@ -5,19 +5,11 @@ import subprocess
|
||||
import pytest
|
||||
|
||||
|
||||
# Skip the entire module if we don't have Rust. The same is true for
|
||||
# VALGRIND, since it sometimes causes false positives in
|
||||
# `std::sync::Once`
|
||||
pytestmark = [
|
||||
pytest.mark.skipif(
|
||||
env('RUST') != '1',
|
||||
reason='RUST is not enabled skipping rust-dependent tests'
|
||||
),
|
||||
pytest.mark.skipif(
|
||||
env('VALGRIND') == '1',
|
||||
reason='VALGRIND is enabled skipping rust-dependent tests, as they may report false positives.'
|
||||
),
|
||||
]
|
||||
# Skip the entire module if we don't have Rust.
|
||||
pytestmark = pytest.mark.skipif(
|
||||
env('RUST') != '1',
|
||||
reason='RUST is not enabled skipping rust-dependent tests'
|
||||
)
|
||||
|
||||
|
||||
def test_rpc_client(node_factory):
|
||||
|
||||
Reference in New Issue
Block a user