borg icon indicating copy to clipboard operation
borg copied to clipboard

Test on many file systems automatically

Open enkore opened this issue 9 years ago • 11 comments

ext4/xfs or tmpfs (which one I am not sure - check that) is already done by Vagrant. We should also test sshfs, cifs/smbfs, nfs, ntfs-3g to avoid issues like #1287.

This could be done within the existing wheezy Vagrant machines that also builds the borg binaries. So we could test from source as well as the freshly built binaries. testsuite.archiver is already made so that both binaries and src are covered.

The FS needs to be setup and mounted (for NTFS, use a loop device), then the test suite tempdir ( http://pytest.org/latest/tmpdir.html#base-temporary-directory ) has to point into the FS during a test suite run. This has to be done for each FS.


:moneybag: there is a bounty for this

enkore avatar Jul 08 '16 15:07 enkore

@enkore you can also do this in travis. You are free to install additional software using apt, executing scripts (like for creating and mounting a smb share).

bmarwell avatar Jul 15 '16 12:07 bmarwell

We don't want this in Travis because the Travis builds take very long to complete as-is.

enkore avatar Jul 15 '16 13:07 enkore

Where are tests currently performed? Is it /tmp? Is there a single location in the code where I can modify this to something that's only used by borg? It seems like we might currently just be pulling this from tempfile, not a good idea IMO.

Edit: yeah that looks like the case. Should I refactor that to pull it from a python module which pulls from an ENV variable if defined, or otherwise tempfile?

PlasmaPower avatar Jul 22 '16 18:07 PlasmaPower

tempfile respects TEMPDIR, TMP, TEMP etc. environment variables. So that has to be set but also --basetemp for py.test

enkore avatar Jul 22 '16 18:07 enkore

@enkore We don't care about where py.test puts stuff though right? It's a bit hacky to just set TMPDIR because some unrelated stuff will end up there, but it works.

PlasmaPower avatar Jul 22 '16 18:07 PlasmaPower

--basetemp is for the tmpdir fixture of py.test, which is used by some tests and will definitely get more use in the future (when more parts are ported to py.test) :)

enkore avatar Jul 22 '16 18:07 enkore

Oh, I see. Makes sense. However, py.test uses py.path.get_temproot which uses tempfile internally so it will respect TMPDIR, right?

PlasmaPower avatar Jul 22 '16 18:07 PlasmaPower

Then only TMPDIR would be needed (good!). However, it has to be verified that it works as intended anyway :)

enkore avatar Jul 22 '16 18:07 enkore

Where should I create the device file for things like ext4 or NTFS? /tmp or /var/tmp? (in ram or on the disk) I'm thinking I should do the latter for space requirements.

PlasmaPower avatar Jul 22 '16 19:07 PlasmaPower

I closed #1820 (without merging it) for now as it was not making progress.

I guess next try should be more incremental, step-by-step, so it can get merged more quickly.

ThomasWaldmann avatar Jul 02 '18 15:07 ThomasWaldmann

Maybe NTFS with kernel 5.15 (e.g. on Ubuntu Jammy) would be a good start:

  • it is local, kernel driver - not network / server side setup
  • still somewhat different from other linux fs

ThomasWaldmann avatar Apr 09 '22 12:04 ThomasWaldmann

Considering that we test on quite some different platforms (github CI and/or vagrant) which use different filesystems, this is already solved.

ThomasWaldmann avatar Nov 16 '25 16:11 ThomasWaldmann