[Bug]: Intermittent failure in PathUtilsTests.testNewDirectoryIsExcludedAndExistingChoiceIsKept
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
PathUtilsTests.swift の99行目にある失敗する期待値の周辺を読み、テストのリソース値の読み取りと書き込みを調べてください。swift test --filter testNewDirectoryIsExcludedAndExistingChoiceIsKept を繰り返し実行し、その後、報告された断続的な動作を調査するために make test の実行結果を繰り返し比較してください。完了条件は、既存ディレクトリのバックアップ選択肢が引き続き含まれることをテストが確実に検証することです。
索引モデルが issue の本文から書いたものです。
説明
I have done the following
- I have searched the existing issues
- If possible, I've reproduced the issue using the 'main' branch of this project
Steps to reproduce
Run make test repeatedly. The failure is intermittent, and I have no reliable way to trigger it.
I saw 1 failure across about 12 test runs on working branches. PathUtils.swift and PathUtilsTests.swift are unchanged from main on that branch. The test then passed 5 times when run alone with swift test --filter testNewDirectoryIsExcludedAndExistingChoiceIsKept, and passed in the next 2 full runs.
Problem description
PathUtilsTests.testNewDirectoryIsExcludedAndExistingChoiceIsKept intermittently fails on its last expectation, which checks that an existing directory's choice to be included in backups is kept:
◇ Test testNewDirectoryIsExcludedAndExistingChoiceIsKept() started.
✘ Test testNewDirectoryIsExcludedAndExistingChoiceIsKept() recorded an issue at PathUtilsTests.swift:99:9: Expectation failed: try !Self.isExcludedFromBackup(snapshots)
↳ try !Self.isExcludedFromBackup(snapshots) → <not evaluated>
✘ Test testNewDirectoryIsExcludedAndExistingChoiceIsKept() failed after 0.015 seconds with 1 issue.
✘ Suite PathUtilsTests failed after 0.016 seconds with 1 issue.
The test reads isExcludedFromBackup as true, sets it to false through a copy of the URL, calls createDirectoryExcludingFromBackup again, and expects to read false.
A possible cause, which I have not confirmed: URL caches resource values, so the last read through snapshots could return the earlier value. If so, the fault is in the test rather than in createDirectoryExcludingFromBackup, and calling removeAllCachedResourceValues() before the read may fix it.
Environment
- OS: macOS 27.2
- Xcode: Swift 6.4 (swiftlang-6.4.0.34.1 clang-2100.3.34.1)
- Container: working branch based on main at ec82253e
- Temporary directory: on the boot volume (APFS)
Code of Conduct
- I agree to follow this project's Code of Conduct
- 主要言語
- Swift
- スター
- 51k
- フォーク
- 1.8k
- 平均マージ
- 2日 9時間
- マージ済み PR(30日)
- 35
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apple/container のほかの issue
-
[Request]: container ls --filter label=key=value対応中かも @kavix が 13 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
apple/container#2403 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Request]: Improve robustness and path resolution in ensure-hawkeye.sh対応中かも @denizguney が 36 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
[Bug]: kernel download hangs forever when the server stops sending対応中かも @devops-thiago が 39 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
apple/container#2327 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: container export -o deletes an existing directory対応中かも @devops-thiago が 39 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
apple/container#2325 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: --mount and -v accept a relative container path and mount it at /<path>対応中かも @devops-thiago が 39 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
apple/container の issue をすべて見る
似ている issue
-
area:shell order:5 status:ready type:bug
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
krystianslowik/arkt#899 ·
メンテナーはふだん 1 日以内に返信
-
help wanted roadmap tests
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
🐞 bug 💠 component 🔍 triage v4 🧰 library
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
Orange-OpenSource/ouds-ios#1875 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
521xueweihan/HelloGitHub#4295 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100