PHP5.3.7のcrypt関数のバグはこうしてリリースされた

話題になってるこのバグ。

PHP5.3.7のcrypt関数のバグはこうして生まれた | 徳丸浩の日記

「テストしろや」というのを真っ先に思いつくが、実はcryptのテスト自体は存在していて、バグの存在を検出していたのだという。
では、にもかかわらず、なぜリリースされてしまったのか?

上記記事にもリンクされてるが、関係者の人がGoogle+で説明していた。
ログイン - Google アカウント

Rasmus Lerdorf

You can see the code coverage, test case failures, Valgrind reports and more for each branch.
The crypt change did trigger a test to fail, we just went a bit too fast with the release and didn't notice the failure. This is mostly because we have too many test failures which is primarily caused by us adding tests for bug reports before actually fixing the bug. I still like the practice of adding test cases for bugs and then working towards making the tests pass, however for some of these non-critical bugs that are taking a while to change we should probably switch them to XFAIL (expected fail) so they don't clutter up the test failure output and thus making it harder to spot new failures like this crypt one.

各ブランチにおいて、テストやコードの解析は行われていて、件のバグも検出できていた。しかし、バグ報告のために作成されたテスト(将来のバージョンでバグが修正されるまでは失敗しっぱなし)が大量にあって、その失敗に埋もれて気づかなかったのだという。

今後の改善として、失敗することがわかってるテストはXFAIL(expected fail)ステータスをつけて隔離することで、それ以外の予期せぬ失敗に気づくようにするそうだ。

まあ、不幸な事故の教訓を生かして開発プロセスが改善されたので良かったんじゃないですかね。