Skip to content

POSIX serial.flush blocks the test cases #654

@Clivern

Description

@Clivern

Hey there,

Somehow this line block the test run forever on mac at least https://github.com/pyserial/pyserial/blob/master/test/test_pty.py#L47, to be specific termios.tcdrain call. Any idea why! or shall we just remove it.

(venv) ➜  pyserial git:(master) ✗ python --version
Python 3.9.13
(venv) ➜  pyserial git:(master) ✗ sw_vers
ProductName:	macOS
ProductVersion:	12.4

Without flush call

(venv) ➜  pyserial git:(master) ✗ python test/run_all_tests.py loop://
Patching sys.path to test local version. Testing Version: 3.5
found 2 tests in 'test_threaded'
found 10 tests in 'test_advanced'
found 5 tests in 'test_readline'
found 2 tests in 'test_rs485'
found 1 tests in 'test_iolib'
found 0 tests in 'test_asyncio'
found 15 tests in 'test'
found 2 tests in 'test_util'
found 2 tests in 'test_high_load'
found 4 tests in 'test_timeout_class'
found 1 tests in 'test_rfc2217'
found 4 tests in 'test_exclusive'
found 2 tests in 'test_cancel'
found 1 tests in 'test_context'
found 3 tests in 'test_url'
found 4 tests in 'test_settings_dict'
found 3 tests in 'test_pty'
.................s..........................ssss.............
----------------------------------------------------------------------
Ran 61 tests in 31.894s

OK (skipped=5)

With flush call

(venv) ➜  pyserial git:(master) ✗ python test/run_all_tests.py loop://
Patching sys.path to test local version. Testing Version: 3.5
found 2 tests in 'test_threaded'
found 10 tests in 'test_advanced'
found 5 tests in 'test_readline'
found 2 tests in 'test_rs485'
found 1 tests in 'test_iolib'
found 0 tests in 'test_asyncio'
found 15 tests in 'test'
found 2 tests in 'test_util'
found 2 tests in 'test_high_load'
found 4 tests in 'test_timeout_class'
found 1 tests in 'test_rfc2217'
found 4 tests in 'test_exclusive'
found 2 tests in 'test_cancel'
found 1 tests in 'test_context'
found 3 tests in 'test_url'
found 4 tests in 'test_settings_dict'
found 3 tests in 'test_pty'
.................s..........................ssss...........

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions