diff options
author | Lars Wirzenius <liw@liw.fi> | 2014-03-18 07:54:23 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2014-03-18 08:27:24 +0000 |
commit | e1556613f870e5ad173b6a2348671ae8fafa1561 (patch) | |
tree | 268964eb9d93ac129ecc8ca7d02fda4f1066f63b /yarns/0100-fuse.yarn | |
parent | 7488d466afbfdc2d90cc976fe448d50e3ec0c7c7 (diff) | |
download | obnam-e1556613f870e5ad173b6a2348671ae8fafa1561.tar.gz |
Add test case for FUSE bug
Diffstat (limited to 'yarns/0100-fuse.yarn')
-rw-r--r-- | yarns/0100-fuse.yarn | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/yarns/0100-fuse.yarn b/yarns/0100-fuse.yarn index 0653d08e..d3433f0e 100644 --- a/yarns/0100-fuse.yarn +++ b/yarns/0100-fuse.yarn @@ -31,6 +31,20 @@ Clean up. FINALLY unmount repository F +In 2014, for Obnam 1.7, a bug was reported that the FUSE plugin would +only read the first 64 kilobytes of a file. Verify that this is no +longer a problem. + + SCENARIO restoring a big file with FUSE + ASSUMING user is in group fuse + GIVEN 1M of data in file L/big.dat + AND a manifest of L in M + WHEN user U backs up directory L to repository R + AND user U FUSE mounts the repository R at F + THEN L, restored to F/latest, matches manifest M + AND big.dat in L and in mounted F compare equally + FINALLY unmount repository F + We can only run this test if the user is in the `fuse` group. This may be a portability concern: this works in Debian GNU/Linux, but might be different in other Linux distros, or on non-Linux systems. (If it @@ -45,6 +59,15 @@ against the FUSE mount, and comparing the two manifests. run_obnam "$MATCH_1" mount -r "$DATADIR/$MATCH_2" \ --to "$DATADIR/$MATCH_3" +We also check a specific file by comparing it in the mount and in its +original location. We do the comparison with cmp(1) instead of the +usual way, because this triggered a bug. + + IMPLEMENTS THEN (\S+) in (\S+) and in mounted (\S+) compare equally + cmp \ + "$DATADIR/$MATCH_2/$MATCH_1" \ + "$DATADIR/$MATCH_3/latest/$DATADIR/$MATCH_2/$MATCH_1" + If we did do the fuse mount, **always** unmount it, even when a step failed. We do not want failed test runs to leavo mounts lying around. |