[1m[32m==>[m[1m Building on centiskorch[m
[1m[32m==>[m[1m Checking for remote environment...[m
[1m[32m==>[m[1m Syncing package to remote host...[m
sending incremental file list
created directory packages/python-pytest-xprocess
./
.SRCINFO
            839 100%    0.00kB/s    0:00:00              839 100%    0.00kB/s    0:00:00 (xfr#1, to-chk=2/4)
PKGBUILD
          1,682 100%    1.60MB/s    0:00:00            1,682 100%    1.60MB/s    0:00:00 (xfr#2, to-chk=1/4)
python-pytest-xprocess-1.0.1-1.log
            260 100%  253.91kB/s    0:00:00              260 100%  253.91kB/s    0:00:00 (xfr#3, to-chk=0/4)

sent 1,807 bytes  received 130 bytes  3,874.00 bytes/sec
total size is 2,719  speedup is 1.40
[1m[32m==>[m[1m Running  extra-riscv64-build -- -d /home/felix/packages/riscv64-pkg-cache:/var/cache/pacman/pkg -l root25 on remote host...[m
[?25l:: Synchronizing package databases...
 core downloading...
 extra downloading...
:: Starting full system upgrade...
 there is nothing to do
[?25h[1m[32m==>[m[1m Building in chroot for [extra] (riscv64)...[m
[1m[32m==>[m[1m Synchronizing chroot copy [/var/lib/archbuild/extra-riscv64/root] -> [root25]...[m[1mdone[m
[1m[32m==>[m[1m Making package: python-pytest-xprocess 1.0.1-1 (Tue Apr 30 14:43:16 2024)[m
[1m[32m==>[m[1m Retrieving sources...[m
[1m[34m  ->[m[1m Downloading pytest-xprocess-1.0.1.tar.gz...[m
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 27799  100 27799    0     0  22975      0  0:00:01  0:00:01 --:--:-- 22975
[1m[32m==>[m[1m Validating source files with sha512sums...[m
    pytest-xprocess-1.0.1.tar.gz ... Passed
[1m[32m==>[m[1m Validating source files with b2sums...[m
    pytest-xprocess-1.0.1.tar.gz ... Passed
[1m[32m==>[m[1m Making package: python-pytest-xprocess 1.0.1-1 (Tue Apr 30 14:43:35 2024)[m
[1m[32m==>[m[1m Checking runtime dependencies...[m
[1m[32m==>[m[1m Installing missing dependencies...[m
[?25lresolving dependencies...
looking for conflicting packages...

Package (7)             New Version  Net Change  Download Size

extra/mpdecimal         4.0.0-2        0.29 MiB               
extra/python-iniconfig  2.0.0-5        0.04 MiB               
extra/python-packaging  23.2-3         0.50 MiB               
extra/python-pluggy     1.4.0-4        0.20 MiB               
core/python             3.12.3-1     105.93 MiB               
extra/python-psutil     5.9.8-4        3.06 MiB       0.48 MiB
extra/python-pytest     1:8.1.2-1      3.89 MiB               

Total Download Size:     0.48 MiB
Total Installed Size:  113.90 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 python-psutil-5.9.8-4-riscv64 downloading...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
installing mpdecimal...
installing python...
Optional dependencies for python
    python-setuptools: for building Python packages using tooling that is usually bundled with Python
    python-pip: for installing Python packages using tooling that is usually bundled with Python
    python-pipx: for installing Python software not packaged on Arch Linux
    sqlite: for a default database integration [installed]
    xz: for lzma [installed]
    tk: for tkinter
installing python-psutil...
installing python-iniconfig...
installing python-packaging...
installing python-pluggy...
installing python-pytest...
[?25h[1m[32m==>[m[1m Checking buildtime dependencies...[m
[1m[32m==>[m[1m Installing missing dependencies...[m
[?25lresolving dependencies...
looking for conflicting packages...

Package (20)                     New Version  Net Change  Download Size

extra/python-autocommand         2.2.2-6        0.08 MiB               
extra/python-fastjsonschema      2.19.1-3       0.26 MiB               
extra/python-inflect             7.2.1-2        0.36 MiB               
extra/python-jaraco.context      4.3.0-4        0.03 MiB               
extra/python-jaraco.functools    4.0.0-3        0.07 MiB               
extra/python-jaraco.text         3.12.0-3       0.08 MiB               
extra/python-more-itertools      10.2.0-2       0.61 MiB               
extra/python-ordered-set         4.1.0-5        0.06 MiB               
extra/python-platformdirs        4.2.0-3        0.23 MiB               
extra/python-pyproject-hooks     1.1.0-1        0.10 MiB       0.02 MiB
extra/python-setuptools          1:69.0.3-6     4.39 MiB               
extra/python-tomli               2.0.1-4        0.10 MiB               
extra/python-trove-classifiers   2024.4.10-1    0.12 MiB               
extra/python-typeguard           4.2.1-2        0.40 MiB               
extra/python-typing_extensions   4.11.0-1       0.38 MiB               
extra/python-validate-pyproject  0.13-3         0.27 MiB               
extra/python-build               1.2.1-3        0.19 MiB               
extra/python-installer           0.7.0-8        0.18 MiB               
extra/python-setuptools-scm      8.0.4-3        0.35 MiB       0.08 MiB
extra/python-wheel               0.43.0-4       0.25 MiB               

Total Download Size:   0.10 MiB
Total Installed Size:  8.52 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 python-setuptools-scm-8.0.4-3-any downloading...
 python-pyproject-hooks-1.1.0-1-any downloading...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
installing python-pyproject-hooks...
installing python-build...
Optional dependencies for python-build
    python-pip: to use as the Python package installer (default)
    python-uv: to use as the Python package installer
    python-virtualenv: to use virtualenv for build isolation
installing python-installer...
installing python-more-itertools...
installing python-jaraco.functools...
installing python-jaraco.context...
installing python-autocommand...
installing python-typing_extensions...
installing python-typeguard...
installing python-inflect...
installing python-jaraco.text...
installing python-ordered-set...
installing python-platformdirs...
installing python-tomli...
installing python-fastjsonschema...
installing python-trove-classifiers...
installing python-validate-pyproject...
installing python-setuptools...
installing python-setuptools-scm...
installing python-wheel...
Optional dependencies for python-wheel
    python-keyring: for wheel.signatures
    python-xdg: for wheel.signatures
[?25h[1m[32m==>[m[1m Retrieving sources...[m
[1m[34m  ->[m[1m Found pytest-xprocess-1.0.1.tar.gz[m
[1m[33m==> WARNING:[m[1m Skipping all source file integrity checks.[m
[1m[32m==>[m[1m Extracting sources...[m
[1m[34m  ->[m[1m Extracting pytest-xprocess-1.0.1.tar.gz with bsdtar[m
[1m[32m==>[m[1m Starting build()...[m
* Getting build dependencies for wheel...
running egg_info
creating pytest_xprocess.egg-info
writing pytest_xprocess.egg-info/PKG-INFO
writing dependency_links to pytest_xprocess.egg-info/dependency_links.txt
writing entry points to pytest_xprocess.egg-info/entry_points.txt
writing requirements to pytest_xprocess.egg-info/requires.txt
writing top-level names to pytest_xprocess.egg-info/top_level.txt
writing manifest file 'pytest_xprocess.egg-info/SOURCES.txt'
reading manifest file 'pytest_xprocess.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'CHANGELOG'
adding license file 'LICENSE'
writing manifest file 'pytest_xprocess.egg-info/SOURCES.txt'
* Building wheel...
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/xprocess
copying xprocess/xprocess.py -> build/lib/xprocess
copying xprocess/__init__.py -> build/lib/xprocess
copying xprocess/pytest_xprocess.py -> build/lib/xprocess
installing to build/bdist.linux-riscv64/wheel
running install
running install_lib
creating build/bdist.linux-riscv64
creating build/bdist.linux-riscv64/wheel
creating build/bdist.linux-riscv64/wheel/xprocess
copying build/lib/xprocess/xprocess.py -> build/bdist.linux-riscv64/wheel/xprocess
copying build/lib/xprocess/__init__.py -> build/bdist.linux-riscv64/wheel/xprocess
copying build/lib/xprocess/pytest_xprocess.py -> build/bdist.linux-riscv64/wheel/xprocess
running install_egg_info
running egg_info
writing pytest_xprocess.egg-info/PKG-INFO
writing dependency_links to pytest_xprocess.egg-info/dependency_links.txt
writing entry points to pytest_xprocess.egg-info/entry_points.txt
writing requirements to pytest_xprocess.egg-info/requires.txt
writing top-level names to pytest_xprocess.egg-info/top_level.txt
reading manifest file 'pytest_xprocess.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'CHANGELOG'
adding license file 'LICENSE'
writing manifest file 'pytest_xprocess.egg-info/SOURCES.txt'
Copying pytest_xprocess.egg-info to build/bdist.linux-riscv64/wheel/pytest_xprocess-1.0.1-py3.12.egg-info
running install_scripts
creating build/bdist.linux-riscv64/wheel/pytest_xprocess-1.0.1.dist-info/WHEEL
creating '/build/python-pytest-xprocess/src/pytest-xprocess-1.0.1/dist/.tmp-rf8od5xt/pytest_xprocess-1.0.1-py3-none-any.whl' and adding 'build/bdist.linux-riscv64/wheel' to it
adding 'xprocess/__init__.py'
adding 'xprocess/pytest_xprocess.py'
adding 'xprocess/xprocess.py'
adding 'pytest_xprocess-1.0.1.dist-info/LICENSE'
adding 'pytest_xprocess-1.0.1.dist-info/METADATA'
adding 'pytest_xprocess-1.0.1.dist-info/WHEEL'
adding 'pytest_xprocess-1.0.1.dist-info/entry_points.txt'
adding 'pytest_xprocess-1.0.1.dist-info/top_level.txt'
adding 'pytest_xprocess-1.0.1.dist-info/RECORD'
removing build/bdist.linux-riscv64/wheel
Successfully built pytest_xprocess-1.0.1-py3-none-any.whl
[1m[32m==>[m[1m Starting check()...[m
============================= test session starts ==============================
platform linux -- Python 3.12.3, pytest-8.1.2, pluggy-1.4.0 -- /usr/bin/python
cachedir: .pytest_cache
rootdir: /build/python-pytest-xprocess/src/pytest-xprocess-1.0.1
configfile: tox.ini
plugins: xprocess-1.0.1, typeguard-4.2.1
collecting ... collected 51 items / 2 deselected / 49 selected

tests/test_callback.py::test_callback_success[s1] PASSED                 [  2%]
tests/test_callback.py::test_callback_success[s2] PASSED                 [  4%]
tests/test_callback.py::test_callback_success[s3] PASSED                 [  6%]
tests/test_callback.py::test_callback_fail[s1] PASSED                    [  8%]
tests/test_callback.py::test_callback_fail[s2] PASSED                    [ 10%]
tests/test_callback.py::test_callback_fail[s3] PASSED                    [ 12%]
tests/test_functional_workflow.py::test_functional_work_flow PASSED      [ 14%]
tests/test_process_initialization.py::test_servers_start[s1] PASSED      [ 16%]
tests/test_process_initialization.py::test_servers_start[s2] PASSED      [ 18%]
tests/test_process_initialization.py::test_servers_start[s3] PASSED      [ 20%]
tests/test_process_initialization.py::test_ensure_not_restart[s1] PASSED [ 22%]
tests/test_process_initialization.py::test_ensure_not_restart[s2] PASSED [ 24%]
tests/test_process_initialization.py::test_ensure_not_restart[s3] PASSED [ 26%]
tests/test_process_initialization.py::test_startup_detection_max_read_lines[s1-started-21] PASSED [ 28%]
tests/test_process_initialization.py::test_startup_detection_max_read_lines[s2-spam, bacon, eggs-30] PASSED [ 30%]
tests/test_process_initialization.py::test_startup_detection_max_read_lines[s3-finally started-130] PASSED [ 32%]
tests/test_process_initialization.py::test_runtime_error_on_start_fail[s1] PASSED [ 34%]
tests/test_process_initialization.py::test_runtime_error_on_start_fail[s2] PASSED [ 36%]
tests/test_process_initialization.py::test_runtime_error_on_start_fail[s3] PASSED [ 38%]
tests/test_process_initialization.py::test_popen_kwargs[s1] PASSED       [ 40%]
tests/test_process_initialization.py::test_popen_kwargs[s2] PASSED       [ 42%]
tests/test_process_initialization.py::test_popen_kwargs[s3] PASSED       [ 44%]
tests/test_process_initialization.py::test_startup_without_pattern[s1] FAILED [ 46%]
tests/test_process_initialization.py::test_startup_without_pattern[s2] FAILED [ 48%]
tests/test_process_initialization.py::test_startup_without_pattern[s3] FAILED [ 51%]
tests/test_process_initialization.py::test_startup_with_pattern_and_callback[s1-will not match-21] FAILED [ 53%]
tests/test_process_initialization.py::test_startup_with_pattern_and_callback[s2-spam, bacon, eggs-30] FAILED [ 55%]
tests/test_process_initialization.py::test_startup_with_pattern_and_callback[s3-finally started-130] FAILED [ 57%]
tests/test_process_termination.py::test_clean_shutdown[s1] PASSED        [ 59%]
tests/test_process_termination.py::test_clean_shutdown[s2] PASSED        [ 61%]
tests/test_process_termination.py::test_clean_shutdown[s3] PASSED        [ 63%]
tests/test_process_termination.py::test_terminate_no_pid[s1] PASSED      [ 65%]
tests/test_process_termination.py::test_terminate_no_pid[s2] PASSED      [ 67%]
tests/test_process_termination.py::test_terminate_no_pid[s3] PASSED      [ 69%]
tests/test_process_termination.py::test_terminate_only_parent[s1] PASSED [ 71%]
tests/test_process_termination.py::test_terminate_only_parent[s2] PASSED [ 73%]
tests/test_process_termination.py::test_terminate_only_parent[s3] PASSED [ 75%]
tests/test_process_termination.py::test_sigkill_after_failed_sigterm[s1] PASSED [ 77%]
tests/test_process_termination.py::test_sigkill_after_failed_sigterm[s2] PASSED [ 79%]
tests/test_process_termination.py::test_sigkill_after_failed_sigterm[s3] PASSED [ 81%]
tests/test_process_termination.py::test_return_value_on_failure[s1] PASSED [ 83%]
tests/test_process_termination.py::test_return_value_on_failure[s2] PASSED [ 85%]
tests/test_process_termination.py::test_return_value_on_failure[s3] PASSED [ 87%]
tests/test_resource_cleanup.py::test_0 PASSED                            [ 89%]
tests/test_resource_cleanup.py::test_1 PASSED                            [ 91%]
tests/test_resource_cleanup.py::test_2 PASSED                            [ 93%]
tests/test_startup_timeout.py::test_timeout_raise_exception[s1] PASSED   [ 95%]
tests/test_startup_timeout.py::test_timeout_raise_exception[s2] PASSED   [ 97%]
tests/test_startup_timeout.py::test_timeout_raise_exception[s3] PASSED   [100%]

=================================== FAILURES ===================================
_______________________ test_startup_without_pattern[s1] _______________________

tcp_port = 50365, proc_name = 's1'
xprocess = <xprocess.xprocess.XProcess object at 0x3f9135a390>

    @pytest.mark.parametrize("proc_name", ["s1", "s2", "s3"])
    def test_startup_without_pattern(tcp_port, proc_name, xprocess):
        data = "bacon\n"
    
        class Starter(ProcessStarter):
            args = [sys.executable, server_path, tcp_port, "--no-children"]
    
            def startup_check(self):
                return request_response_cycle(tcp_port, data)
    
>       xprocess.ensure(proc_name, Starter)

tests/test_process_initialization.py:131: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
test_dir/usr/lib/python3.12/site-packages/xprocess/xprocess.py:284: in ensure
    if not starter.wait(log_file_handle):
test_dir/usr/lib/python3.12/site-packages/xprocess/xprocess.py:413: in wait
    callback_ok = self.wait_callback()
test_dir/usr/lib/python3.12/site-packages/xprocess/xprocess.py:388: in wait_callback
    if self.startup_check():
tests/test_process_initialization.py:129: in startup_check
    return request_response_cycle(tcp_port, data)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

tcp_port = 50365, data = 'bacon\n'

    def request_response_cycle(tcp_port, data):
        """test started server instance by sending
        request and checking response"""
        with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
>           sock.connect(("localhost", tcp_port))
E           ConnectionRefusedError: [Errno 111] Connection refused

tests/test_process_initialization.py:16: ConnectionRefusedError
----------------------------- Captured stdout call -----------------------------
/build/python-pytest-xprocess/src/pytest-xprocess-1.0.1/.pytest_cache/d/.xprocess/s1$ /usr/bin/python /build/python-pytest-xprocess/src/pytest-xprocess-1.0.1/tests/server.py 50365 --no-children
process 's1' started pid=1120
_______________________ test_startup_without_pattern[s2] _______________________

tcp_port = 50437, proc_name = 's2'
xprocess = <xprocess.xprocess.XProcess object at 0x3f9135a390>

    @pytest.mark.parametrize("proc_name", ["s1", "s2", "s3"])
    def test_startup_without_pattern(tcp_port, proc_name, xprocess):
        data = "bacon\n"
    
        class Starter(ProcessStarter):
            args = [sys.executable, server_path, tcp_port, "--no-children"]
    
            def startup_check(self):
                return request_response_cycle(tcp_port, data)
    
>       xprocess.ensure(proc_name, Starter)

tests/test_process_initialization.py:131: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
test_dir/usr/lib/python3.12/site-packages/xprocess/xprocess.py:284: in ensure
    if not starter.wait(log_file_handle):
test_dir/usr/lib/python3.12/site-packages/xprocess/xprocess.py:413: in wait
    callback_ok = self.wait_callback()
test_dir/usr/lib/python3.12/site-packages/xprocess/xprocess.py:388: in wait_callback
    if self.startup_check():
tests/test_process_initialization.py:129: in startup_check
    return request_response_cycle(tcp_port, data)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

tcp_port = 50437, data = 'bacon\n'

    def request_response_cycle(tcp_port, data):
        """test started server instance by sending
        request and checking response"""
        with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
>           sock.connect(("localhost", tcp_port))
E           ConnectionRefusedError: [Errno 111] Connection refused

tests/test_process_initialization.py:16: ConnectionRefusedError
----------------------------- Captured stdout call -----------------------------
/build/python-pytest-xprocess/src/pytest-xprocess-1.0.1/.pytest_cache/d/.xprocess/s2$ /usr/bin/python /build/python-pytest-xprocess/src/pytest-xprocess-1.0.1/tests/server.py 50437 --no-children
process 's2' started pid=1121
_______________________ test_startup_without_pattern[s3] _______________________

tcp_port = 33585, proc_name = 's3'
xprocess = <xprocess.xprocess.XProcess object at 0x3f9135a390>

    @pytest.mark.parametrize("proc_name", ["s1", "s2", "s3"])
    def test_startup_without_pattern(tcp_port, proc_name, xprocess):
        data = "bacon\n"
    
        class Starter(ProcessStarter):
            args = [sys.executable, server_path, tcp_port, "--no-children"]
    
            def startup_check(self):
                return request_response_cycle(tcp_port, data)
    
>       xprocess.ensure(proc_name, Starter)

tests/test_process_initialization.py:131: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
test_dir/usr/lib/python3.12/site-packages/xprocess/xprocess.py:284: in ensure
    if not starter.wait(log_file_handle):
test_dir/usr/lib/python3.12/site-packages/xprocess/xprocess.py:413: in wait
    callback_ok = self.wait_callback()
test_dir/usr/lib/python3.12/site-packages/xprocess/xprocess.py:388: in wait_callback
    if self.startup_check():
tests/test_process_initialization.py:129: in startup_check
    return request_response_cycle(tcp_port, data)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

tcp_port = 33585, data = 'bacon\n'

    def request_response_cycle(tcp_port, data):
        """test started server instance by sending
        request and checking response"""
        with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
>           sock.connect(("localhost", tcp_port))
E           ConnectionRefusedError: [Errno 111] Connection refused

tests/test_process_initialization.py:16: ConnectionRefusedError
----------------------------- Captured stdout call -----------------------------
/build/python-pytest-xprocess/src/pytest-xprocess-1.0.1/.pytest_cache/d/.xprocess/s3$ /usr/bin/python /build/python-pytest-xprocess/src/pytest-xprocess-1.0.1/tests/server.py 33585 --no-children
process 's3' started pid=1122
_________ test_startup_with_pattern_and_callback[s1-will not match-21] _________

tcp_port = 36619, proc_name = 's1', proc_pttrn = 'will not match', lines = 21
xprocess = <xprocess.xprocess.XProcess object at 0x3f9135a390>

    @pytest.mark.parametrize(
        "proc_name,proc_pttrn,lines",
        [
            ("s1", "will not match", 21),
            ("s2", "spam, bacon, eggs", 30),
            ("s3", "finally started", 130),
        ],
    )
    def test_startup_with_pattern_and_callback(
        tcp_port, proc_name, proc_pttrn, lines, xprocess
    ):
        data = "bacon\n"
    
        class Starter(ProcessStarter):
            pattern = proc_pttrn
            max_read_lines = lines
            args = [sys.executable, server_path, tcp_port, "--no-children"]
    
            def startup_check(self):
                return request_response_cycle(tcp_port, data)
    
        if proc_name == "s1":
>           with pytest.raises(RuntimeError):
E           Failed: DID NOT RAISE <class 'RuntimeError'>

tests/test_process_initialization.py:159: Failed
_______ test_startup_with_pattern_and_callback[s2-spam, bacon, eggs-30] ________

tcp_port = 44053, proc_name = 's2', proc_pttrn = 'spam, bacon, eggs', lines = 30
xprocess = <xprocess.xprocess.XProcess object at 0x3f9135a390>

    @pytest.mark.parametrize(
        "proc_name,proc_pttrn,lines",
        [
            ("s1", "will not match", 21),
            ("s2", "spam, bacon, eggs", 30),
            ("s3", "finally started", 130),
        ],
    )
    def test_startup_with_pattern_and_callback(
        tcp_port, proc_name, proc_pttrn, lines, xprocess
    ):
        data = "bacon\n"
    
        class Starter(ProcessStarter):
            pattern = proc_pttrn
            max_read_lines = lines
            args = [sys.executable, server_path, tcp_port, "--no-children"]
    
            def startup_check(self):
                return request_response_cycle(tcp_port, data)
    
        if proc_name == "s1":
            with pytest.raises(RuntimeError):
                xprocess.ensure(proc_name, Starter)
            # since we made xprocess fail to start the server on purpose, we cannot
            # terminate it using XProcessInfo.terminate method once it does not
            # know the PID, process name or even that it is running, so we tell the
            # server to terminate itself.
            with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
                sock.connect(("localhost", tcp_port))
                sock.sendall(bytes("exit\n", "utf-8"))
        else:
            xprocess.ensure(proc_name, Starter)
            info = xprocess.getinfo(proc_name)
            assert info.isrunning()
>           assert request_response_cycle(tcp_port, data)

tests/test_process_initialization.py:172: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

tcp_port = 44053, data = 'bacon\n'

    def request_response_cycle(tcp_port, data):
        """test started server instance by sending
        request and checking response"""
        with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
>           sock.connect(("localhost", tcp_port))
E           ConnectionRefusedError: [Errno 111] Connection refused

tests/test_process_initialization.py:16: ConnectionRefusedError
________ test_startup_with_pattern_and_callback[s3-finally started-130] ________

tcp_port = 49253, proc_name = 's3', proc_pttrn = 'finally started', lines = 130
xprocess = <xprocess.xprocess.XProcess object at 0x3f9135a390>

    @pytest.mark.parametrize(
        "proc_name,proc_pttrn,lines",
        [
            ("s1", "will not match", 21),
            ("s2", "spam, bacon, eggs", 30),
            ("s3", "finally started", 130),
        ],
    )
    def test_startup_with_pattern_and_callback(
        tcp_port, proc_name, proc_pttrn, lines, xprocess
    ):
        data = "bacon\n"
    
        class Starter(ProcessStarter):
            pattern = proc_pttrn
            max_read_lines = lines
            args = [sys.executable, server_path, tcp_port, "--no-children"]
    
            def startup_check(self):
                return request_response_cycle(tcp_port, data)
    
        if proc_name == "s1":
            with pytest.raises(RuntimeError):
                xprocess.ensure(proc_name, Starter)
            # since we made xprocess fail to start the server on purpose, we cannot
            # terminate it using XProcessInfo.terminate method once it does not
            # know the PID, process name or even that it is running, so we tell the
            # server to terminate itself.
            with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
                sock.connect(("localhost", tcp_port))
                sock.sendall(bytes("exit\n", "utf-8"))
        else:
            xprocess.ensure(proc_name, Starter)
            info = xprocess.getinfo(proc_name)
            assert info.isrunning()
>           assert request_response_cycle(tcp_port, data)

tests/test_process_initialization.py:172: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

tcp_port = 49253, data = 'bacon\n'

    def request_response_cycle(tcp_port, data):
        """test started server instance by sending
        request and checking response"""
        with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
>           sock.connect(("localhost", tcp_port))
E           ConnectionRefusedError: [Errno 111] Connection refused

tests/test_process_initialization.py:16: ConnectionRefusedError
=========================== short test summary info ============================
FAILED tests/test_process_initialization.py::test_startup_without_pattern[s1]
FAILED tests/test_process_initialization.py::test_startup_without_pattern[s2]
FAILED tests/test_process_initialization.py::test_startup_without_pattern[s3]
FAILED tests/test_process_initialization.py::test_startup_with_pattern_and_callback[s1-will not match-21]
FAILED tests/test_process_initialization.py::test_startup_with_pattern_and_callback[s2-spam, bacon, eggs-30]
FAILED tests/test_process_initialization.py::test_startup_with_pattern_and_callback[s3-finally started-130]
================= 6 failed, 43 passed, 2 deselected in 37.74s ==================
pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo(<process_name>).terminate()'.
[1m[31m==> ERROR:[m[1m A failure occurred in check().[m
[1m    Aborting...[m
[1m[31m==> ERROR:[m[1m Build failed, check /var/lib/archbuild/extra-riscv64/root25/build[m
[34h[?25h[34h[?25hreceiving incremental file list
python-pytest-xprocess-1.0.1-1-riscv64-build.log
python-pytest-xprocess-1.0.1-1-riscv64-check.log

sent 62 bytes  received 3,166 bytes  6,456.00 bytes/sec
total size is 20,177  speedup is 6.25
