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

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

miss-islington commented Dec 5, 2022

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

@miss-islington
Copy link
Contributor

miss-islington commented Dec 5, 2022

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

@miss-islington
Copy link
Contributor

miss-islington commented Dec 5, 2022

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

bedevere-bot commented Dec 5, 2022

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

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 <vstinner@python.org>
@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 <vstinner@python.org>
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.

None yet

3 participants