pytest_pthread.py 712 B

12345678910111213141516171819202122
  1. # SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
  2. # SPDX-License-Identifier: CC0-1.0
  3. import pytest
  4. from pytest_embedded import Dut
  5. # IDF-5054
  6. @pytest.mark.esp32
  7. @pytest.mark.esp32s2
  8. @pytest.mark.esp32s3
  9. @pytest.mark.esp32c3
  10. @pytest.mark.generic
  11. def test_pthread(dut: Dut) -> None:
  12. # Note: this test doesn't really confirm anything, except that threads are created
  13. # and stdout is not being corrupted by multiple threads printing ot it.
  14. dut.expect(r'Created thread 0x[\da-f]+')
  15. dut.expect(r'Created larger stack thread 0x[\da-f]+')
  16. dut.expect(r'Threads have exited')
  17. dut.expect(r'Created thread 0x[\da-f]+ with new default config')
  18. dut.expect('Thread has exited')