ParallelSSH / ssh2-python

Python bindings for libssh2 C library.
https://parallel-ssh.org
GNU Lesser General Public License v2.1
228 stars 72 forks source link

Tests fail on btrfs filesystem #145

Closed thrasibule closed 3 years ago

thrasibule commented 3 years ago

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.

pkittenis commented 3 years ago

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