Description
On my Linux computer, four of the tests for du
fail, despite them passing on Travis.
I am specifically trying to fix test_du_basics_subdir()
right now (the others may be similar, but I have not checked yet). When I run the command outside of cargo test
, it seems to work fine. It also seems to work fine during cargo test
when the full path to the original fixture (subdir/deeper
) is specified. However, for whatever reason, du
thinks the block size of subdir
is 0 with the current setup, so the output ends up being 4\tsubdir/deeper\n
rather than 8\tsubdir/deeper\n
. I am unable to replicate this issue outside of cargo test
, which is posing some difficulties.
The test for who -m
also fails, but it seems to be because the current TTY has no name, as changing line 321 from if !self.my_line_only || cur_tty == ut.tty_device() {
to if !self.my_line_only || (cur_tty == ut.tty_device() && cur_tty.len() > 0) {
appears to fix the issue. Again, this only occurs for me under cargo test
. I'm thinking it might be because the tester forks or something.