ParallelSSH/ssh2-python

Tests fail on btrfs filesystem

thrasibule opened this issue · 1 comments

Bug reports

Steps to reproduce:

  1. Run the sftp tests: pytest tests/test_sftp.py
  2. assert error on this line: https://github.com/ParallelSSH/ssh2-python/blob/master/tests/test_sftp.py#L259

The reason is I use btrfs which doesn't use inodes, so the number of free inodes is always 0. For instance this is the output of stat on my home directory:

  File: "."
    ID: db1a9d2a5fd7f276 Namelen: 255     Type: btrfs
Block size: 4096       Fundamental block size: 4096
Blocks: Total: 63743569   Free: 11700730   Available: 11555225
Inodes: Total: 0          Free: 0

I suggest removing that line, or testing other attributes that are not 0. I can send a PR to that effect.

PR welcome. Using vfs.f_files is still needed to exercise that code, without assertion.