Commit graph

387 commits

Author SHA1 Message Date
Thomas Waldmann
9529895ed4 get rid of datetime.isoformat to avoid bugs like #2994
(cherry picked from commit da2f8dbe81)
2017-09-10 05:58:03 +02:00
Thomas Waldmann
90fdfd26d8 repository: test FD invalidation 2017-09-06 15:17:05 +02:00
Thomas Waldmann
230e0feac6 migrate locks to child PID when daemonize is used
(cherry picked from commit 09e3a02fbc)
2017-08-14 00:25:51 +02:00
Marian Beermann
a93f636151 archiver: add test for paperkey import, fix bug
(cherry picked from commit 78f0e5d473)
2017-07-16 12:36:04 -07:00
Marian Beermann
6990beb69e xattr: test split_lstring
(cherry picked from commit 6c67b64ab6)
2017-07-16 12:36:03 -07:00
Thomas Waldmann
35b0f1f4f9 Manifest: use limited unpacker
(cherry picked from commit 6c2c51939d)
2017-06-26 02:25:20 +02:00
edgewood
932fb9ec7a Split up parsing and filtering for --keep-within (#2726)
Split up parsing and filtering for --keep-within

Fixes #2610

Parse --keep-within argument early, via new method within_range passed
to argparse type=, so that better error messages can be given.

Also swallows ValueError stacktrace per the comment in the old code that
including it wasn't desirable.
2017-06-25 23:31:04 +02:00
TW
04aa426334 Merge pull request #2722 from ThomasWaldmann/backports5
even more backports
2017-06-23 16:24:33 +02:00
Thomas Waldmann
8deb4dfdda remove skipping the noatime tests on GNU/Hurd, fixes #2710
I recently installed GNU/Hurd 2017 and found the atime test works now.

(cherry picked from commit 49411d1c6c)
2017-06-22 01:03:32 +02:00
Thomas Waldmann
10b8cd9218 use stat with follow_symlinks=False
should be equivalent to using os.lstat() before.

(cherry picked from commit efec00b39c)
2017-06-21 15:16:43 +02:00
Thomas Waldmann
7846ef2e69 remove attic dependency of the tests, fixes #2505
attic.tar.gz contains a repo + corresponding keyfile - all the
upgrader module tests need.

.tar.gz because the .tar was 20x bigger.

(cherry picked from commit fed5873e29)
2017-06-21 03:00:52 +02:00
Marian Beermann
aafbaaea20 cache sync: check Operation.READ compatibility with manifest
(cherry picked from commit c9c227f2ca)
2017-06-21 00:53:49 +02:00
Thomas Waldmann
0b46c0d192 enable remote tests on cygwin
the cygwin issue that caused these tests to break was fixed in cygwin
at least since cygwin 2.8.0 (maybe even since 2.7.0).

also added a comment to our workaround (os_write wrapper, that is needed
still for people running older cygwin versions) that it can be removed
when cygwin 2.8.0 is considered ancient (and everybody has upgraded to
some fixed version).

(cherry picked from commit 4766d66875)
2017-06-21 00:49:29 +02:00
Marian Beermann
1de042f9e5 key file names: limit to 100 characters (not bytes)
(cherry picked from commit 38ed9a20af)
2017-06-21 00:39:24 +02:00
Marian Beermann
649afe0c17 key file names: remove colons from host name
(cherry picked from commit 4b8a04b5e7)
2017-06-21 00:37:46 +02:00
Martin Hostettler
6ce476a42b Add tests for cache compatibility code. 2017-06-08 21:38:59 +02:00
Martin Hostettler
ca5ea4f53d Add tests for mandatory repository feature flags. 2017-06-08 20:36:55 +02:00
Martin Hostettler
8783460fc3 Add minimal version of in repository mandatory feature flags.
This should allow us to make sure older borg versions can be cleanly
prevented from doing operations that are no longer safe because of
repository format evolution. This allows more fine grained control than
just incrementing the manifest version. So for example a change that
still allows new archives to be created but would corrupt the repository
when an old version tries to delete an archive or check the repository
would add the new feature to the check and delete set but leave it out
of the write set.

This is somewhat inspired by ext{2,3,4} which uses sets for
compat (everything except fsck), ro-compat (may only be accessed
read-only by older versions) and features (refuse all access).
2017-06-08 20:36:54 +02:00
Benedikt Neuffer
97c770e318 ipv6 address support
also: Location: more informative exception when parsing fails
2017-05-23 15:31:04 +02:00
Marian Beermann
d9681c6b15 fuse: fix crash if empty (None) xattr is read 2017-05-23 15:27:39 +02:00
Marian Beermann
1c6cefbee7 Revert "Merge pull request #1971 from leo-b/1.0-maint-patterns"
This reverts commit d188886269, reversing
changes made to c688b1be85.

# Conflicts:
#	borg/archiver.py
2017-05-15 23:41:09 +02:00
Marian Beermann
6335d593ab Revert "Merge pull request #2231 from leo-b/1.0-maint-patterns"
This reverts commit 9a5bc514b3, reversing
changes made to 8b5ad3819c.
2017-05-15 23:38:17 +02:00
Marian Beermann
173ecfddb4 Revert "Merge pull request #2401 from ThomasWaldmann/patterns-style-default-1.0"
This reverts commit 7a4e9e7a6f, reversing
changes made to b007808706.
2017-05-15 23:37:28 +02:00
Thomas Waldmann
6a929c689e embrace y2038 issue to support 32bit platforms
(cherry picked from commit de76a6b821)
2017-04-29 23:56:53 +02:00
TW
7a4e9e7a6f Merge pull request #2401 from ThomasWaldmann/patterns-style-default-1.0
support switching the pattern style default in patterns file
2017-04-09 20:47:51 +02:00
Thomas Waldmann
8f86f2a732 add test for borg delete --force
(cherry picked from commit 2ad5f903fe)
2017-04-07 05:53:14 +02:00
Thomas Waldmann
e653e1e273 support switching the pattern style default in patterns file
(cherry picked from commit 42371181fc)
2017-04-07 05:35:33 +02:00
Marian Beermann
949871d463 serve: fix forced command lines containing BORG_ env vars
(cherry picked from commit 88dfb3e9c5)
2017-04-04 18:50:09 +02:00
Thomas Waldmann
07bcd29144 clamp (nano)second values to unproblematic range, fixes #2304
filesystem -> clamp -> archive (create)

(cherry picked from commit b7a17a6db7)
2017-03-16 20:54:33 +01:00
Thomas Waldmann
be1227fd1c borg delete --force --force to delete severely corrupted archives, fixes #1975
(cherry picked from commit 4d81b186ec)
2017-03-10 23:03:25 +01:00
Abdel-Rahman
bfc745237a extract: warning RC for unextracted big extended attributes, followup (#2258)
* Set warning exit code when xattr is too big

* Warnings for more extended attributes errors (ENOTSUP, EACCES)

* Add tests for all xattr warnings

(cherry picked from commit 63b5cbfc99)
2017-03-10 22:44:27 +01:00
Abdel-Rahman
b4c0dcfbdf Add return code functions (#2199)
(cherry picked from commit 4b33c3fe14)
2017-03-10 22:44:27 +01:00
TW
5efda261b3 Fix compression exceptions (#2224)
* trigger bug in --verify-data, see #2221

* raise decompression errors as DecompressionError, fixes #2221

this is a subclass of IntegrityError, so borg check --verify-data works correctly if
the decompressor stumbles over corrupted data before the plaintext gets verified
(in a unencrypted repository, otherwise the MAC check would fail first).

* fixup: fix exception docstring, add placeholder, change wording
2017-03-10 19:06:54 +01:00
Thomas Waldmann
391e302182 Location: accept //servername/share/path 2017-03-10 18:57:36 +01:00
Abogical
4543691c05 Add testsuite to test handling of too big xattr 2017-03-10 18:57:15 +01:00
enkore
9a5bc514b3 Merge pull request #2231 from leo-b/1.0-maint-patterns
Fix for PR #1971
2017-02-28 20:08:05 +01:00
Alexander 'Leo' Bergolth
fefe59589e --patterns-from was accessing args.roots instead of args.paths
add a test case that parses a command containing --patterns-from
2017-02-28 12:01:37 +01:00
enkore
3a3dfcbef5 Merge pull request #2149 from borgbackup/release-1.0.10
Release 1.0.10
2017-02-13 13:29:14 +01:00
Thomas Waldmann
e5f7121296 paperkey.html - decode as utf-8, fixes #2150
hardcoded the encoding for reading it. while utf-8 is the default
encoding on many systems, it does not work everywhere.

and when it tries to decode with the ascii decoder, it fails.
2017-02-13 04:12:12 +01:00
Marian Beermann
cf1f409871 add test for export key --qr-html 2017-02-12 22:26:06 +01:00
enkore
d188886269 Merge pull request #1971 from leo-b/1.0-maint-patterns
new --pattern and --patterns-from options
2017-02-12 19:06:35 +01:00
Alexander 'Leo' Bergolth
a908599aa9 add two tests for the order of patterns and excludes 2017-01-26 16:31:31 +01:00
TW
ca0c1dab11 Merge pull request #2015 from ThomasWaldmann/fix-location-regex
fix bad parsing of wrong syntax
2017-01-21 05:46:58 +01:00
Thomas Waldmann
c0fb8da595 fix xattr test race condition, fixes #2047 2017-01-14 23:19:40 +01:00
Alexander 'Leo' Bergolth
58c3e0cd48 flake8 beautifications 2017-01-13 17:53:41 +01:00
Alexander 'Leo' Bergolth
7b668a1b50 - change argument parsing of pattern- and exclude-files:
patterns from such files are inserted in the order of appearance on the commandline now.
- allow specifying root paths for borg create and borg extract only by root patterns ("R path")
- adopt test cases and add some test cases for pattern argument parsing
2017-01-13 17:30:07 +01:00
Thomas Waldmann
1667926c96 fix bad parsing of wrong syntax
this was like whack-a-mole: fix one regex -> another issue pops up
2017-01-12 01:01:24 +01:00
Alexander 'Leo' Bergolth
ead93b2e58 minor changes due to TWs review 2017-01-11 14:00:58 +01:00
Thomas Waldmann
2938a5f6fb work around spurious log level related test fail when using pytest-xdist 2017-01-06 05:48:50 +01:00
Thomas Waldmann
5ed6d21302 parallel testing: fix issue related to non-reproducible set / dict order 2017-01-06 05:48:50 +01:00