AltraMayor / AltraMayor/f3

f3probe unit test

Đang mở
#143 5 bình luận 0 reaction 0 người được giao Xem trên GitHub
Documentation
Ngôn ngữ chính
C
Star
3.4k
Fork
177
Merge trung bình
2 ngày 15 giờ
Pull request đã merge (30 ngày)
2

Mô tả

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.)

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.