Skip to content

Studio tests: keep two Linux-host assumptions off the Windows and macOS legs - #17107

Merged
danielhanchen merged 1 commit into
mainfrom
fix-linux-only-test-reads
Nov 8, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fix-linux-only-test-reads

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Summary

Two test files on main assume a Linux host. Any PR whose cross-platform run selects them goes red on the leg that is not Linux, whatever the PR changed. Two current examples:

windows-latest (#17067)
FAILED test_diffusion_comfy_block.py::test_a_many_layer_nvfp4_fallback_load_that_fits_is_not_refused
FAILED test_diffusion_comfy_block.py::test_block_dequant_is_checked_for_its_peak_intermediates[nvfp4]
  ... and four more, all:
FileNotFoundError: [Errno 2] No such file or directory: '/proc/self/status'

macos-15 (#17098)
FAILED test_sd_cpp_args.py::test_native_speed_flags
  assert ['--diffusion-fa'] == ['--diffusion-fa', '--diffusion-conv-direct']
FAILED test_sd_cpp_args.py::test_minimax_h3_video_command_has_all_joint_av_components
  assert ['--offload-to-cpu', '--clip-on-cpu'] == ['--diffusion-fa', '--offload-to-cpu']

In both files the product code is right and the tests are wrong.

  • test_diffusion_comfy_block.py. The six memory-peak tests already skip with needs /proc/self/status RssAnon when _rss_anon_bytes() returns None. But the helper opens /proc/self/status unguarded. Off Linux it raises FileNotFoundError instead of returning None, so the tests error out instead of skipping.
  • test_sd_cpp_args.py. On Apple Metal, sd.cpp deliberately drops --diffusion-conv-direct and adds --clip-on-cpu (Studio: sd.cpp on Macs, CPU backend on a paravirtual GPU and no direct conv on Metal #13369). Most tests in the file pin sys.platform before they build a command. These two do not, so on a Mac runner they get the Metal command and compare it against the Linux one.

Change

Tests only:

  • _rss_anon_bytes() returns None when /proc/self/status cannot be opened, so the existing skips fire on Windows and macOS. On Linux nothing changes.
  • The file's existing autouse fixture in test_sd_cpp_args.py, which already pins the host probes, also pins sys.platform to linux. Every test there now builds the same command on any host unless it sets the platform itself, as the Metal tests already do. That covers the two tests above and any later one that forgets the pin.

Testing

result
test_sd_cpp_args.py, test_sd_cpp_backend.py, test_diffusion_comfy_block.py on Linux, this branch 345 passed, 5 skipped
main, Windows and macOS legs of #17067 and #17098 the failures above
this branch, test_diffusion_comfy_block.py + test_sd_cpp_args.py on ubuntu-latest 156 passed, 5 skipped
this branch, same files on macos-15 150 passed, 11 skipped (the six RssAnon tests skip)
this branch, same files on windows-latest 150 passed, 11 skipped (the six RssAnon tests skip)

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T04:25:56.373580Z 70d48a7 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 70d48a7202

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant