AltraMayor / AltraMayor/f3

f3probe unit test

未关闭
#143 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Documentation
主要语言
C
星标
3.4k
派生
177
平均合并
2 天 15 小时
30 天内合并 PR
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 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。