diff options
author | Lars Wirzenius <liw@liw.fi> | 2014-01-26 13:54:04 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2014-01-26 13:54:04 +0000 |
commit | de1500705bc5dadfad41a2379d9e99462519f267 (patch) | |
tree | c1adbde1082ec4e6dc8a589d3d3a543d6052e765 | |
parent | ca69a5ced17d7fb7126f4ea7b82ee61d3c7de924 (diff) | |
download | obnam-de1500705bc5dadfad41a2379d9e99462519f267.tar.gz |
Convert user-old-node-size test to yarn
-rwxr-xr-x | tests/use-old-node-size.script | 24 | ||||
-rw-r--r-- | tests/use-old-node-size.stdout | 1 | ||||
-rw-r--r-- | yarns/0030-basics.yarn | 19 |
3 files changed, 19 insertions, 25 deletions
diff --git a/tests/use-old-node-size.script b/tests/use-old-node-size.script deleted file mode 100755 index a540db10..00000000 --- a/tests/use-old-node-size.script +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# Copyright 2011 Lars Wirzenius -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -set -e - -$SRCDIR/tests/backup --node-size=4k -$SRCDIR/tests/backup --node-size=16k - -# Check that there's two generations. -$SRCDIR/tests/obnam $opts genids | wc -l | sed 's/ *//' - diff --git a/tests/use-old-node-size.stdout b/tests/use-old-node-size.stdout deleted file mode 100644 index 0cfbf088..00000000 --- a/tests/use-old-node-size.stdout +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/yarns/0030-basics.yarn b/yarns/0030-basics.yarn index a2ae12fa..34cad9d2 100644 --- a/yarns/0030-basics.yarn +++ b/yarns/0030-basics.yarn @@ -207,3 +207,22 @@ create one. Test that such timestamps work. WHEN user U backs up directory L to repository R AND user U restores their latest generation in repository R into X THEN L, restored to X, matches manifest M + +Change B-tree node size +----------------------- + +The setting for B-tree node size (`--node-size`) only affects new +B-trees. Thus, if we've backed up with one size, and change the +setting to a new size, the backup should still work. + + SCENARIO backup with changed B-tree node size + GIVEN 100kB of new data in directory L + AND user U sets configuration node-size to 65536 + WHEN user U backs up directory L to repository R + GIVEN 100Kb of new data in directory L + AND a manifest of directory L in M + AND user U sets configuration node-size to 4096 + WHEN user U backs up directory L to repository R + AND user U restores their latest generation in repository R into X + THEN L, restored to X, matches manifest M + AND user U can fsck the repository R |