Skip to content

fix(services/fs): return IsADirectory on Linux direct-I/O directory reads and consolidate tests - #9599

Merged
Xuanwo merged 2 commits into
mainfrom
xuanwo/9583-consolidate-rust-java-tests
Dec 3, 2026
Merged

Xuanwo merged 2 commits into
mainfrom
xuanwo/9583-consolidate-rust-java-tests

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Dec 3, 2026

Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes #9583.

Rationale for this change

On ext4 and tmpfs, Linux rejects an O_DIRECT open of a directory before fs can inspect the file type. Separately, six TimeoutLayer tests wait in real time for Tokio deadlines, and Cargo and JUnit can run the same fs integration tests and Java service-config tests with fewer binaries and classes.

What changes are included in this PR?

  • In services/fs on Linux, when a direct-I/O open reports Unsupported, confirm a readable directory with a read-only directory open so direct-I/O reads return IsADirectory.
  • Pause Tokio time in six TimeoutLayer tests while preserving their deadlines and assertions.
  • Run all fs integration cases from one binary and combine the 13 Java service-config cases into one class.
  • Tighten test assertions to check NotFound for deleted Foyer entries, and to check the error kind, operation, option, and wildcard hint for unsupported write conditions.

Are there any user-facing changes?

On Linux, direct-I/O reads of a readable directory now return IsADirectory.

Observed on ext4 and tmpfs:

  • Whole-file reads, range reads, and Reader::read on a readable directory returned IsADirectory on both filesystems.
  • Regular files read successfully on ext4 and returned Unsupported on tmpfs.
  • Files and directories with read permission removed returned PermissionDenied on both filesystems.

Breaking changes

AI Usage Statement

  • Pi in T3 Code, magpie/codex/gpt-6.2-astra, high effort. Mapped existing test coverage and identified the Linux directory-open path to verify.
  • Pi in T3 Code, magpie/codex/gpt-6.2-sol, max effort. Implemented the changes and verified them against the existing test suites and local Linux filesystems.
  • Antigravity in T3 Code, Gemini 4 Neon, High effort. Copy-edited the PR title and description.
  • Pi in T3 Code, magpie/devin/swe-2-1, default effort (no explicit reasoning-effort override). Independently reviewed the signed commit and reran the affected Rust and Java suites.

Run stalled TimeoutLayer tests on Tokio time and consolidate the FS and Java suites. Assert the error kinds and relevant diagnostics for removed objects and unsupported write conditions.

Linux can reject an O_DIRECT open before FS can inspect the directory. Confirm the directory with a read-only directory open and report IsADirectory.
@Xuanwo
Xuanwo requested a review from PsiACE December 3, 2026 12:47
@Xuanwo
Xuanwo merged commit 52d9050 into main Dec 3, 2026
99 checks passed
@Xuanwo
Xuanwo deleted the xuanwo/9583-consolidate-rust-java-tests branch December 3, 2026 18:41
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.

chore(tests): pause TimeoutLayer sleeps, tighten weak assertions, and merge fragmented fs/Java tests

2 participants