• =?US-ASCII?Q?Re=3A_Pytest_8=2Ex_bug=3F__=22Perm?= =?US-ASCII?Q?ission_d

    From =?ISO-8859-1?Q?Timo_R=F6hling?=@21:1/5 to All on Wed Mar 27 12:10:02 2024
    Hi,

    Am 27. März 2024 10:59:46 MEZ schrieb Julian Gilbey <julian@d-and-j.net>:
    I'm stymied by a pytest-related bug. I thought it was a bug in a
    particular pytest plugin (pytest-order), but it's now shown up in
    another pytest plugin as well, so I wonder if either there's a bug in
    pytest 8.x or something subtle has changed that requires a
    modification to the plugins. I couldn't see anything obvious on the
    pytest changelog page, and the error message itself is mysterious to
    me. The bug does not show with pytest 7.4.4, so it is certainly
    related to the new pytest version.
    I wasn't able to pinpoint the cause yet, but I noticed that the failing sessions have "rootdir: /tmp" instead of the usual /tmp/autopkgtest-lxc.*/downtmp/autopkgtest_tmp/build


    Cheers
    Timo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Julian Gilbey@21:1/5 to All on Wed Mar 27 16:40:02 2024
    On Wed, Mar 27, 2024 at 11:36:55AM +0100, Timo Röhling wrote:
    Hi,

    Am 27. März 2024 10:59:46 MEZ schrieb Julian Gilbey <julian@d-and-j.net>: >I'm stymied by a pytest-related bug. I thought it was a bug in a >particular pytest plugin (pytest-order), but it's now shown up in
    another pytest plugin as well, so I wonder if either there's a bug in >pytest 8.x or something subtle has changed that requires a
    modification to the plugins. I couldn't see anything obvious on the
    pytest changelog page, and the error message itself is mysterious to
    me. The bug does not show with pytest 7.4.4, so it is certainly
    related to the new pytest version.
    I wasn't able to pinpoint the cause yet, but I noticed that the failing sessions have "rootdir: /tmp" instead of the usual /tmp/autopkgtest-lxc.*/downtmp/autopkgtest_tmp/build


    Cheers
    Timo

    Hi Timo,

    Oh, that is interesting! Good spot, thank you! I wonder whether
    tmpdir is creating a weird location? BTW, this problem appears when
    running autopkgtest under lxc. In my other package, the tests passed
    when running under sbuild but not with autopkgtest under lxc, which
    suggests that there's something weird about the lxc setup.

    Best wishes,

    Julian

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Julian Gilbey@21:1/5 to All on Wed Mar 27 18:20:02 2024
    On Wed, Mar 27, 2024 at 11:36:55AM +0100, Timo Röhling wrote:
    Hi,

    Am 27. März 2024 10:59:46 MEZ schrieb Julian Gilbey <julian@d-and-j.net>: >I'm stymied by a pytest-related bug. I thought it was a bug in a >particular pytest plugin (pytest-order), but it's now shown up in
    another pytest plugin as well, so I wonder if either there's a bug in >pytest 8.x or something subtle has changed that requires a
    modification to the plugins. I couldn't see anything obvious on the
    pytest changelog page, and the error message itself is mysterious to
    me. The bug does not show with pytest 7.4.4, so it is certainly
    related to the new pytest version.
    I wasn't able to pinpoint the cause yet, but I noticed that the failing sessions have "rootdir: /tmp" instead of the usual /tmp/autopkgtest-lxc.*/downtmp/autopkgtest_tmp/build

    Ah, I think you've hit the nail on the head!!

    https://github.com/pytest-dev/pytest/issues/11781

    And then pytest looks for any __init__.py file it can find, including
    in unreadable directories...

    Unfortunately, changing the argument from str(tmpdir) to
    f"--rootdir={tmpdir}" caused my computer to crash (CPU usage went
    through the roof until the computer became unresponsive) - clearly
    there's something not quite right here yet!!

    Best wishes,

    Julian

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)