f3probe unit test
- 主要言語
- C
- スター
- 3.4k
- フォーク
- 177
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 2
説明
The "real limbo drive" unit test cases suggest an intention to detect wrapping by modulus other than a power of 2. However, the code `offset &= fdev->address_mask;` in `fdev_write_block()` that is used for the simulation of the fake drive and `fdev->address_mask = (((uint64_t)1) << wrap) - 1;` in `create_file_device()` suggests that only powers of 2 are supported. Furthermore, the code seems to use only the `wrap` variable, not `real_size_bytes`, to do the wrapping, effectively operating the test with a power of 2 wrapping, rendering it unable to detect whether or not wrapping with a different modulus that is not a power of 2 would be detected.
Either there needs to be clear comment with each real limbo drive unit test record what it is meant to test or the simulated fake drive needs support wrapping at the real device size. (If a fake device uses a 2^n-1 mask as in the code and the real device has slightly more capacity this extra capacity will never be seen and the fake device will behave as if it has a 2^n capacity real drive.)
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。