Home - Summaries: (main) : (py3.11) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

rlib/test/test_streamio.py::TestDiskFile::()::test_write_interrupted

self = <rpython.rlib.test.test_streamio.TestDiskFile instance at 0xfffd2a4b8690>

    def test_write_interrupted(self):
        try:
            from signal import alarm, signal, SIG_DFL, SIGALRM
        except ImportError:
            pytest.skip('no alarm on this platform')
        try:
            read_fd, write_fd = os.pipe()
            file = streamio.DiskFile(write_fd)
            def handler(*a):
                os.read(read_fd, 2000)
                alarm(1)
            signal(SIGALRM, handler)
            alarm(1)
            # Write to the pipe until it is full
            buf = "FILL THE PIPE" * 1000
            while True:
>               if os.write(write_fd, buf) < len(buf):
E               OSError: [Errno 4] Interrupted system call

rlib/test/test_streamio.py:1116: OSError
builder: rpython-linux-aarch64 build #536
test: rlib/test/test_streamio/py/TestDiskFile/()/test_write_interrupted