mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-05 20:33:24 +03:00
Xfail timouts in Valgrind tests
* ensure that the env variable is set in the makefile
This commit is contained in:
parent
2d506f6f5a
commit
f1957b49b2
4
Makefile
4
Makefile
|
@ -95,14 +95,14 @@ test:
|
|||
.PHONY: valgrind
|
||||
valgrind:
|
||||
python3 -c "import pytest_valgrind" > /dev/null 2>&1 || python3 -m pip install pytest-valgrind
|
||||
PYTHONMALLOC=malloc valgrind --suppressions=Tests/oss-fuzz/python.supp --leak-check=no \
|
||||
PILLOW_VALGRIND_TEST=true PYTHONMALLOC=malloc valgrind --suppressions=Tests/oss-fuzz/python.supp --leak-check=no \
|
||||
--log-file=/tmp/valgrind-output \
|
||||
python3 -m pytest --no-memcheck -vv --valgrind --valgrind-log=/tmp/valgrind-output
|
||||
|
||||
.PHONY: valgrind-leak
|
||||
valgrind-leak:
|
||||
python3 -c "import pytest_valgrind" > /dev/null 2>&1 || python3 -m pip install pytest-valgrind
|
||||
PYTHONMALLOC=malloc valgrind --suppressions=Tests/oss-fuzz/python.supp \
|
||||
PILLOW_VALGRIND_TEST=true PYTHONMALLOC=malloc valgrind --suppressions=Tests/oss-fuzz/python.supp \
|
||||
--leak-check=full --show-leak-kinds=definite --errors-for-leak-kinds=definite \
|
||||
--log-file=/tmp/valgrind-output \
|
||||
python3 -m pytest -vv --valgrind --valgrind-log=/tmp/valgrind-output Tests/
|
||||
|
|
|
@ -1034,6 +1034,11 @@ class TestFileJpeg:
|
|||
im.save(f, xmp=b"1" * 65505)
|
||||
|
||||
@pytest.mark.timeout(timeout=1)
|
||||
@pytest.mark.xfail(
|
||||
"PILLOW_VALGRIND_TEST" in os.environ,
|
||||
reason="Valgrind is slower",
|
||||
raises=TimeoutError
|
||||
)
|
||||
def test_eof(self, monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
# Even though this decoder never says that it is finished
|
||||
# the image should still end when there is no new data
|
||||
|
|
|
@ -2,6 +2,7 @@ from __future__ import annotations
|
|||
|
||||
import struct
|
||||
from io import BytesIO
|
||||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
|
@ -73,6 +74,11 @@ def test_decompression_bomb() -> None:
|
|||
|
||||
|
||||
@pytest.mark.timeout(4)
|
||||
@pytest.mark.xfail(
|
||||
"PILLOW_VALGRIND_TEST" in os.environ,
|
||||
reason="Valgrind is slower",
|
||||
raises=TimeoutError
|
||||
)
|
||||
def test_oom() -> None:
|
||||
glyph = struct.pack(
|
||||
">hhhhhhhhhh", 1, 0, -32767, -32767, 32767, 32767, -32767, -32767, 32767, 32767
|
||||
|
|
Loading…
Reference in New Issue
Block a user