-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
I investigated what this test is doing and the reason on why this test is failing.
It tests with a strict limit on the usable virtual memory the internal behaviour of dd by setting a large (30M) block_size ("ibs", "obs" and "bs") and expects certain behaviour regarding when the memory for these block-sizes are allocated and not allocated.
This way the test can validade
- the correct behaviour for the cases where the memory should not be allocated.
- AND it can test cases where it expects it to be allocated by testing for unsuccessfull return code.
Now, the problem with uutils is, that it is more efficient than GNU and does not need to allocate the buffer when the test expects it to do so (for seek and skip operations). It uses io::copy(src, dst) where the dst is some dummy data sink that just ignores every write. Thus no buffer is to be allocated.
Thats why the test is red.
I successfully proved this theory by artificially allocate the memory in the expected cases. I'll link the PR to this issue.
The only remaining issue could be that dd should do only one single read per block instead of multiples. I'm not sure what the io::copy() is doing internally.