Skip to content

test_pdb broken under WASI #114275

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    testsTests in the Lib/test dir
    3.12only security fixes
    3.13only security fixes
    on Jan 19, 2024
  2. brettcannon commented on Jan 19, 2024

    @brettcannon
    MemberAuthor
  3. sobolevn commented on Jan 19, 2024

    @sobolevn
    Member

    Hm, I am investigating this 🤔

    First of all, it passes locally on macos platform.

    Second, here's the failure:

    Doctest: test.test_pdb.test_pdb_next_command_for_coroutine ... FAIL
    test_pdb_next_command_for_generator (test.test_pdb)
    Doctest: test.test_pdb.test_pdb_next_command_for_generator ... ok
    test_pdb_next_command_in_generator_for_loop (test.test_pdb)
    Doctest: test.test_pdb.test_pdb_next_command_in_generator_for_loop ... ok
    test_pdb_next_command_subiterator (test.test_pdb)
    Doctest: test.test_pdb.test_pdb_next_command_subiterator ... ok
    test_pdb_pp_repr_exc (test.test_pdb)
    Doctest: test.test_pdb.test_pdb_pp_repr_exc ... Warning -- Unraisable exception
    Exception ignored in: <function BaseEventLoop.__del__ at 0xb453f8>
    Traceback (most recent call last):
      File "/Lib/asyncio/base_events.py", line 750, in __del__
        self.close()
      File "/Lib/asyncio/unix_events.py", line 70, in close
        super().close()
      File "/Lib/asyncio/selector_events.py", line 104, in close
        self._close_self_pipe()
      File "/Lib/asyncio/selector_events.py", line 111, in _close_self_pipe
        self._remove_reader(self._ssock.fileno())
    AttributeError: '_UnixSelectorEventLoop' object has no attribute '_ssock'
    Warning -- Unraisable exception
    Exception ignored in: <function BaseEventLoop.__del__ at 0xb453f8>
    Traceback (most recent call last):
      File "/Lib/asyncio/base_events.py", line 750, in __del__
        self.close()
      File "/Lib/asyncio/unix_events.py", line 70, in close
        super().close()
      File "/Lib/asyncio/selector_events.py", line 104, in close
        self._close_self_pipe()
      File "/Lib/asyncio/selector_events.py", line 111, in _close_self_pipe
        self._remove_reader(self._ssock.fileno())
    AttributeError: '_UnixSelectorEventLoop' object has no attribute '_ssock'
    ok
    test_pdb_return_command_for_coroutine (test.test_pdb)
    Doctest: test.test_pdb.test_pdb_return_command_for_coroutine ... FAIL
    

    Third, no direct import / usage of test_doctest is there.
    Looking further.

  4. added 2 commits that reference this issue on Jan 19, 2024
  5. sobolevn commented on Jan 19, 2024

    @sobolevn
    Member

    Ok, I found out what is going on:

    1. test_pdb used to import code from test_doctest
    2. test_doctest has if not support.has_subprocess_support: skip
    3. So, all test_pdb was skipped on wasi, proof: https://buildbot.python.org/all/#/builders/1061/builds/694/steps/11/logs/stdio
    4. Now, I removed import from test_doctest, which is a good thing
    5. It unskipped test_pdb on WASI

    There are several things we can do:

    1. Skip these failing tests on WASI with a TODO comment
    2. Skip the whole test file
    3. Try to fix it (but it is asyncio related and I am not an expert in this module)

    I propose to use the same skip that test_asyncio uses for these specific tests.

    @brettcannon @vstinner what are your thoughts on this?

  6. added a commit that references this issue on Jan 19, 2024
  7. vstinner commented on Jan 19, 2024

    @vstinner
    Member

    I suggest to skip again the test which was skipped previously.

  8. added a commit that references this issue on Jan 19, 2024
  9. 1 remaining item

  10. vstinner commented on Jan 19, 2024

    @vstinner
    Member

    Issue fixed by efb81a6

  11. brettcannon commented on Jan 19, 2024

    @brettcannon
    MemberAuthor

    I was going to say to skip them. 😁 Thanks for the prompt fix!

  12. added a commit that references this issue on Jan 22, 2024
  13. brettcannon commented on Jan 22, 2024

    @brettcannon
    MemberAuthor

    I had to reopen this as the fix didn't get backported to 3.12 and 3.11.

  14. added 2 commits that reference this issue on Jan 22, 2024
  15. added 2 commits that reference this issue on Jan 22, 2024
  16. vstinner commented on Jan 22, 2024

    @vstinner
    Member

    I had to reopen this as the fix didn't get backported to 3.12 and 3.11.

    Alright. I merged the 2 backports, thanks. I close again the issue.

  17. added a commit that references this issue on Feb 11, 2024
  18. added a commit that references this issue on Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixes3.13only security fixesOS-wasitestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions