Skip to content

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

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:test_script_as_dev_fd
Dec 5, 2022
Merged

gh-100005: Skip test_script_as_dev_fd() on FreeBSD#100006
vstinner merged 1 commit into
python:mainfrom
vstinner:test_script_as_dev_fd

Conversation

@vstinner

@vstinnervstinner commented Dec 5, 2022

Copy link
Copy Markdown
Member

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
Copy Markdown
MemberAuthor

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

@vstinnervstinner added needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes labels Dec 5, 2022
@vstinner
vstinner merged commit 038b151 into python:mainDec 5, 2022
@vstinner
vstinner deleted the test_script_as_dev_fd branch December 5, 2022 13:23
@vstinnervstinner added needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes and removed needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes labels Dec 5, 2022
@miss-islington

Copy link
Copy Markdown
Contributor

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

@miss-islington

Copy link
Copy Markdown
Contributor

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

@miss-islington

Copy link
Copy Markdown
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
Copy Markdown

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

@bedevere-botbedevere-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 <vstinner@python.org>
@vstinnervstinner removed the needs backport to 3.10 only security fixes label Dec 5, 2022
@vstinner

Copy link
Copy Markdown
MemberAuthor

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>
@encukou

Copy link
Copy Markdown
Member

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

@miss-islington-app

Copy link
Copy Markdown

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

@miss-islington-app

Copy link
Copy Markdown

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

@miss-islington-app

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

@bedevere-appbedevere-appBot removed the needs backport to 3.10 only security fixes label Oct 8, 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 <vstinner@python.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core reviewskip newstestsTests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@vstinner@miss-islington@bedevere-bot@encukou