Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-100005: Skip test_script_as_dev_fd() on FreeBSD #100006

Merged
merged 1 commit into from
Dec 5, 2022
Merged

gh-100005: Skip test_script_as_dev_fd() on FreeBSD #100006

merged 1 commit into from
Dec 5, 2022

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Dec 5, 2022

On FreeBSD, skip test_script_as_dev_fd() of test_cmd_line_script if fdescfs is not mounted (at /dev/fd).

On FreeBSD, skip test_script_as_dev_fd() of test_cmd_line_script if
fdescfs is not mounted (at /dev/fd).
@vstinner
Copy link
Member Author

vstinner commented Dec 5, 2022

With this PR, the test is now skipped on FreeBSD:

$ ./python -m test test_cmd_line_script -v -m test_script_as_dev_fd
(...)
test_script_as_dev_fd (test.test_cmd_line_script.CmdLineTest.test_script_as_dev_fd) ... skipped 'Requires fdescfs mounted on /dev/fd on FreeBSD'

If I mount manually /dev/fd, it works as expected:

$ sudo mount -t fdescfs none /dev/fd 

$ ./python -m test test_cmd_line_script -v -m test_script_as_dev_fd
(...)
test_script_as_dev_fd (test.test_cmd_line_script.CmdLineTest.test_script_as_dev_fd) ... 

/usr/home/vstinner/python/main/Lib/subprocess.py:849: RuntimeWarning: pass_fds overriding close_fds.
  warnings.warn("pass_fds overriding close_fds.", RuntimeWarning)

ok
(...)

cc @ronaldoussoren


By the way, the test emits a warning because of this Lib/subprocess.py code:

            if pass_fds and not close_fds:
                warnings.warn("pass_fds overriding close_fds.", RuntimeWarning)
                close_fds = True

@miss-islington
Copy link
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @vstinner, I could not cleanly backport this to 3.10 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 038b151963d9d4a5f4c852544fb5b0402ffcb218 3.10

@bedevere-bot
Copy link

GH-100007 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Dec 5, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 5, 2022
…0006)

On FreeBSD, skip test_script_as_dev_fd() of test_cmd_line_script if
fdescfs is not mounted (at /dev/fd).
(cherry picked from commit 038b151)

Co-authored-by: Victor Stinner <[email protected]>
@vstinner vstinner removed the needs backport to 3.10 only security fixes label Dec 5, 2022
@vstinner
Copy link
Member Author

vstinner commented Dec 5, 2022

Ah, test_script_as_dev_fd() was not backported to Python 3.10.

miss-islington added a commit that referenced this pull request Dec 5, 2022
On FreeBSD, skip test_script_as_dev_fd() of test_cmd_line_script if
fdescfs is not mounted (at /dev/fd).
(cherry picked from commit 038b151)

Co-authored-by: Victor Stinner <[email protected]>
@encukou
Copy link
Member

encukou commented Oct 8, 2024

It was, in #99817.
This fails on the stable buildbot, so it should be backported to 3.10 & 3.9.

@encukou encukou added needs backport to 3.9 only security fixes needs backport to 3.10 only security fixes labels Oct 8, 2024
@miss-islington-app
Copy link

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @vstinner, I could not cleanly backport this to 3.9 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 038b151963d9d4a5f4c852544fb5b0402ffcb218 3.9

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 8, 2024
…0006)

On FreeBSD, skip test_script_as_dev_fd() of test_cmd_line_script if
fdescfs is not mounted (at /dev/fd).
(cherry picked from commit 038b151)

Co-authored-by: Victor Stinner <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Oct 8, 2024

GH-125109 is a backport of this pull request to the 3.10 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.10 only security fixes label Oct 8, 2024
@encukou encukou removed the needs backport to 3.9 only security fixes label Oct 10, 2024
pablogsal pushed a commit that referenced this pull request Oct 22, 2024
…#125109)

gh-100005: Skip test_script_as_dev_fd() on FreeBSD (GH-100006)

On FreeBSD, skip test_script_as_dev_fd() of test_cmd_line_script if
fdescfs is not mounted (at /dev/fd).
(cherry picked from commit 038b151)

Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Petr Viktorin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants