aboutsummaryrefslogtreecommitdiff
path: root/tests/400-successful_backup_restore.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/400-successful_backup_restore.sh')
-rw-r--r--tests/400-successful_backup_restore.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/400-successful_backup_restore.sh b/tests/400-successful_backup_restore.sh
index bf07a00..8274964 100644
--- a/tests/400-successful_backup_restore.sh
+++ b/tests/400-successful_backup_restore.sh
@@ -9,14 +9,14 @@ function files_are_the_same()
[ -z "$(diff "$1" "$2")" ]
}
-rm -f input backedup_input ref out
+rm -f input backedup_input base out
-# Create a four-sector reference file (the original file)
-dd if=/dev/zero of=ref bs=512 count=4 1>/dev/null 2>&1
+# Create a four-sector base file (the original file)
+dd if=/dev/zero of=base bs=512 count=4 1>/dev/null 2>&1
# Change the orignal file to make it an input file for differential backup
# There will be four different sectors in the input file
-cp ref input
+cp base input
# The first sector will have the 0th byte chaged
printf '\xFF' | dd of=input bs=1 count=1 seek=0 conv=notrunc 1>/dev/null 2>&1
@@ -29,7 +29,7 @@ printf '\xFF' | dd of=input bs=1 count=1 seek=$(( (512 * 3) - 1 )) conv=notrunc
# The fourth sector will have the middle byte changed
printf '\xFF' | dd of=input bs=1 count=1 seek=$(( (512 * 4) - (512 / 2) )) conv=notrunc 1>/dev/null 2>&1
-assert "" "" 0 $PROGRAM_EXEC backup -s 512 input ref out
+assert "" "" 0 $PROGRAM_EXEC backup -s 512 input base out
if ! files_are_the_same out 400-expected_backup_output.bin; then
echo "assert: Backup output file differs from the expected one"
@@ -38,9 +38,9 @@ fi
# Modify the file to backup (the input file used in the backup phase)
cp input backedup_input
-cp ref input
-if ! files_are_the_same ref input; then
- echo "assert: The input file must be the same as the reference one before restoring it"
+cp base input
+if ! files_are_the_same base input; then
+ echo "assert: The input file must be the same as the base one before restoring it"
exit 1
fi
@@ -51,6 +51,6 @@ if ! files_are_the_same input backedup_input; then
exit 1
fi
-rm -f input backedup_input ref out
+rm -f input backedup_input base out
exit 0