Add test for dup-gc(1) - dedup - deduplicating backup program
HTML git clone git://bitreich.org/dedup/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/dedup/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
DIR LICENSE
---
DIR commit 64a0069cdcbb478e604d9e41318db915a21fac70
DIR parent e814b11f226f19a9a60a5bfc53e0be2128d91ef0
HTML Author: sin <sin@2f30.org>
Date: Fri, 26 Apr 2019 12:56:53 +0100
Add test for dup-gc(1)
Diffstat:
M dotest | 18 ++++++++++++++++++
1 file changed, 18 insertions(+), 0 deletions(-)
---
DIR 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