Skip to content

JIT CI is broken due to test_pathlib and test_posixpath #118246

Closed

Description

@savannahostrowski

Looks like something in emulation/QEMU changed and now test_pathlib and test_posixpath are causing the GHA workflow to fail for Linux Arm.

Linked PRs

Activity

  1. nineteendo commented on Apr 24, 2024

    @nineteendo
    Contributor

    Can it not be fixed? Or can we skip certain tests?

  2. barneygale commented on Apr 24, 2024

    @barneygale
    Contributor

    Could you share a link to a failing GHA workflow please?

  3. brandtbucher commented on Apr 24, 2024

    @brandtbucher
    Member

    Can it not be fixed? Or can we skip certain tests?

    Yeah, we could probably use the --ignorefile option and maintain a text file with a list of individual failures under emulation... any volunteers?

    The current PR is a good stopgap though, just to get things passing on PRs (we already skip a bunch of tests, so adding these isn't a huge change).

  4. savannahostrowski commented on Apr 24, 2024

    @savannahostrowski
    MemberAuthor

    Yes, definitely - https://github.com/python/cpython/actions/runs/8820363755/job/24213816403

    I'd like to spend time digging into the emulation failures but this is intended to provide fix in the meantime.

  5. nineteendo commented on Apr 24, 2024

    @nineteendo
    Contributor
    ======================================================================
    FAIL: test_ismount (test.test_posixpath.PosixPathTest.test_ismount)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/home/runner/work/cpython/cpython/Lib/test/test_posixpath.py", line 215, in test_ismount
        self.assertIs(posixpath.ismount("/"), True)
        ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    AssertionError: False is not True
    
    ======================================================================
    FAIL: test_is_mount_root (test.test_pathlib.test_pathlib.PathSubclassTest.test_is_mount_root)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/home/runner/work/cpython/cpython/Lib/test/test_pathlib/test_pathlib.py", line 1121, in test_is_mount_root
        self.assertTrue(R.is_mount())
        ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
    AssertionError: False is not true
    
    ======================================================================
    FAIL: test_is_mount_root (test.test_pathlib.test_pathlib.PathTest.test_is_mount_root)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/home/runner/work/cpython/cpython/Lib/test/test_pathlib/test_pathlib.py", line 1121, in test_is_mount_root
        self.assertTrue(R.is_mount())
        ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
    AssertionError: False is not true
    
    ======================================================================
    FAIL: test_is_mount_root (test.test_pathlib.test_pathlib.PosixPathTest.test_is_mount_root)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/home/runner/work/cpython/cpython/Lib/test/test_pathlib/test_pathlib.py", line 1121, in test_is_mount_root
        self.assertTrue(R.is_mount())
        ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
    AssertionError: False is not true
    
  6. barneygale commented on Apr 24, 2024

    @barneygale
    Contributor

    Thanks for the link! It might have been aggravated by #117447 - perhaps under emulation, lstat('/') and lstat('/..') are returning different st_inos for some reason.

  7. brandtbucher commented on Apr 24, 2024

    @brandtbucher
    Member

    Ah, I missed that change. Thanks for digging into it.

  8. brandtbucher commented on Apr 24, 2024

    @brandtbucher
    Member

    Yeah, we could probably use the --ignorefile option and maintain a text file with a list of individual failures under emulation... any volunteers?

    GH-118251

  9. brandtbucher commented on Apr 24, 2024

    @brandtbucher
    Member

    @barneygale, is this something that you think is worth fixing in os.path.ismount? I don't think Python technically supports emulated environments, so it's not worth reverting any speed improvement or whatever.

  10. barneygale commented on Apr 24, 2024

    @barneygale
    Contributor

    POSIX says:

    The special filename dot-dot shall refer to the parent directory of its predecessor directory. As a special case, in the root directory, dot-dot may refer to the root directory itself.

    I think / and /.. always refer to the same directory in practice, and os.path.ismount() uses that fact to detect the root directory. In all other cases, joining .. onto a path and calling lstat() will produce a different stat result. This all seems quite reasonable to me -- I'm not sure if there's anything to fix in ismount().

  11. added a commit that references this issue on Apr 24, 2024
  12. brandtbucher commented on Apr 24, 2024

    @brandtbucher
    Member

    This is done, then!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions