Flaky test: command_runs_with_configured_cwd_and_resolves_relative_path fails with ETXTBSY
- 主要言語
- Rust
- スター
- 54.2k
- フォーク
- 6.2k
- 平均マージ
- 3日 4時間
- マージ済み PR(30日)
- 240
説明
**Describe the bug**
The test
`providers::command_auth::tests::command_runs_with_configured_cwd_and_resolves_relative_path`
occasionally fails on Linux CI with:
```text
failed to run auth command './get-token.sh': Text file busy (os error 26)
```
Failed CI job:
https://github.com/aaif-goose/goose/actions/runs/34327955183/job/102389802174?pr=11944
The equivalent `rustls-tls` job passed, and rerunning the test succeeds, suggesting a filesystem-related race when the temporary script is created and immediately executed.
The test was introduced in #11657.
**To reproduce**
Run repeatedly on Linux:
```bash
cargo test -p goose --lib \
providers::command_auth::tests::command_runs_with_configured_cwd_and_resolves_relative_path
```
**Expected behavior**
The test should pass reliably in CI.
**Additional context**
A possible fix is to create the script under a temporary filename and atomically rename it before execution. The exact cause should be confirmed before implementation.
コントリビューションガイド
調査の方向性
失敗しているテストは providers::command_auth::tests::command_runs_with_configured_cwd_and_resolves_relative_path にあります。テストファイルを確認して、一時スクリプト './get-token.sh' がどのように作成され、実行されるかを見てください。ファイルがビジー状態になる(ETXTBSY)Linux 上の競合状態を調査してください。考えられる修正方法は、一時ファイルに書き込み、実行前にそれをアトミックにリネームすることです。テストを繰り返し実行して、この不安定な動作を再現してください。
索引モデルが issue の本文から書いたものです。
評価
- 領域
- testing
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 活発
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 55/100