dedup

data deduplication program
git clone git://git.2f30.org/dedup.git
Log | Files | Refs | README | LICENSE

commit 64a0069cdcbb478e604d9e41318db915a21fac70
parent e814b11f226f19a9a60a5bfc53e0be2128d91ef0
Author: sin <sin@2f30.org>
Date:   Fri, 26 Apr 2019 12:56:53 +0100

Add test for dup-gc(1)

Diffstat:
Mdotest | 18++++++++++++++++++
1 file changed, 18 insertions(+), 0 deletions(-)

diff --git a/dotest b/dotest @@ -72,9 +72,27 @@ test4() rm -rf "$repo" "$data" } +test5() +{ + repo=`mktemp -d` + data=`mktemp` + dd if=/dev/urandom of="$data" bs=1M count=64 + ./dup-init "$repo" + ./dup-pack -r "$repo" snap0 < "$data" + ./dup-gc "$repo" + ./dup-rm -r "$repo" snap0 < "$data" + ./dup-pack -r "$repo" snap0 < "$data" + ./dup-gc "$repo" + sum0=`sha1sum "$data" | awk '{print $1}'` + sum1=`./dup-unpack -r "$repo" snap0 | sha1sum | awk '{print $1}'` + [ "$sum0" = "$sum1" ] + rm -rf "$repo" "$data" +} + make test0 test1 test2 test3 test4 +test5