This repository has been archived by the owner on Mar 19, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added checks for lzfast lib compression algorithms.
Also fixed the dartfile and the all-disk-tests script. Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
- Loading branch information
Showing
9 changed files
with
441 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/sh | ||
# | ||
# Run a simple backup with encryption and compression of the Bareos build directory | ||
# then verify the signatures. | ||
# | ||
TestName="lzo-encrypt-test" | ||
JobName=lz4Test | ||
. scripts/functions | ||
|
||
scripts/cleanup | ||
scripts/copy-crypto-confs | ||
echo "${cwd}/build" >${cwd}/tmp/file-list | ||
|
||
# set compatible mode for filedaemon so that lz4hc is allowed | ||
cp ${scripts}/bareos-fd.conf ${scripts}/bareos-fd.conf.tmp | ||
sed -e 's#FileDaemon {.*#FileDaemon { compatible=no#' < ${scripts}/bareos-fd.conf.tmp > ${scripts}/bareos-fd.conf | ||
|
||
start_test | ||
|
||
cat <<END_OF_DATA >${cwd}/tmp/bconcmds | ||
@$out /dev/null | ||
messages | ||
@$out ${cwd}/tmp/log1.out | ||
label storage=File volume=TestVolume001 | ||
run job=$JobName yes | ||
wait | ||
messages | ||
list volumes | ||
@# | ||
@# now do a restore | ||
@# | ||
@$out ${cwd}/tmp/log2.out | ||
@# setdebug level=0 fd | ||
restore where=${cwd}/tmp/bareos-restores storage=File | ||
5 | ||
mark * | ||
done | ||
yes | ||
wait | ||
messages | ||
quit | ||
END_OF_DATA | ||
|
||
run_bareos | ||
sleep 2 | ||
check_for_zombie_jobs storage=File | ||
stop_bareos | ||
|
||
check_two_logs | ||
check_restore_diff | ||
end_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/bin/sh | ||
# | ||
# Run a simple backup of the Bareos build directory using the compressed option | ||
# then restore it. | ||
# | ||
TestName="lz4-test" | ||
JobName=lz4 | ||
. scripts/functions | ||
|
||
scripts/cleanup | ||
scripts/copy-test-confs | ||
echo "${cwd}/build" >${cwd}/tmp/file-list | ||
|
||
|
||
# set compatible mode for filedaemon so that lz4hc is allowed | ||
cp ${scripts}/bareos-fd.conf ${scripts}/bareos-fd.conf.tmp | ||
sed -e 's#FileDaemon {.*#FileDaemon { compatible=no#' < ${scripts}/bareos-fd.conf.tmp > ${scripts}/bareos-fd.conf | ||
|
||
start_test | ||
|
||
cat <<END_OF_DATA >${cwd}/tmp/bconcmds | ||
@$out /dev/null | ||
messages | ||
@$out ${cwd}/tmp/log1.out | ||
status all | ||
status all | ||
messages | ||
label storage=File volume=TestVolume001 | ||
run job=lz4Test storage=File yes | ||
wait | ||
messages | ||
@# | ||
@# now do a restore | ||
@# | ||
@$out ${cwd}/tmp/log2.out | ||
restore where=${cwd}/tmp/bareos-restores select storage=File | ||
unmark * | ||
mark * | ||
done | ||
yes | ||
wait | ||
messages | ||
quit | ||
END_OF_DATA | ||
|
||
run_bareos | ||
check_for_zombie_jobs storage=File | ||
stop_bareos | ||
|
||
check_two_logs | ||
check_restore_diff | ||
grep " Software Compression" ${cwd}/tmp/log1.out | grep "%" 2>&1 1>/dev/null | ||
if [ $? != 0 ] ; then | ||
echo " !!!!! No compression !!!!!" | ||
bstat=1 | ||
fi | ||
end_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/sh | ||
# | ||
# Run a simple backup with encryption and compression of the Bareos build directory | ||
# then verify the signatures. | ||
# | ||
TestName="lzo-encrypt-test" | ||
JobName=lz4hcTest | ||
. scripts/functions | ||
|
||
scripts/cleanup | ||
scripts/copy-crypto-confs | ||
echo "${cwd}/build" >${cwd}/tmp/file-list | ||
|
||
# set compatible mode for filedaemon so that lz4hc is allowed | ||
cp ${scripts}/bareos-fd.conf ${scripts}/bareos-fd.conf.tmp | ||
sed -e 's#FileDaemon {.*#FileDaemon { compatible=no#' < ${scripts}/bareos-fd.conf.tmp > ${scripts}/bareos-fd.conf | ||
|
||
start_test | ||
|
||
cat <<END_OF_DATA >${cwd}/tmp/bconcmds | ||
@$out /dev/null | ||
messages | ||
@$out ${cwd}/tmp/log1.out | ||
label storage=File volume=TestVolume001 | ||
run job=$JobName yes | ||
wait | ||
messages | ||
list volumes | ||
@# | ||
@# now do a restore | ||
@# | ||
@$out ${cwd}/tmp/log2.out | ||
@# setdebug level=0 fd | ||
restore where=${cwd}/tmp/bareos-restores storage=File | ||
5 | ||
mark * | ||
done | ||
yes | ||
wait | ||
messages | ||
quit | ||
END_OF_DATA | ||
|
||
run_bareos | ||
sleep 2 | ||
check_for_zombie_jobs storage=File | ||
stop_bareos | ||
|
||
check_two_logs | ||
check_restore_diff | ||
end_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/bin/sh | ||
# | ||
# Run a simple backup of the Bareos build directory using the compressed option | ||
# then restore it. | ||
# | ||
TestName="lz4hc-test" | ||
JobName=lz4hc | ||
. scripts/functions | ||
|
||
scripts/cleanup | ||
scripts/copy-test-confs | ||
echo "${cwd}/build" >${cwd}/tmp/file-list | ||
|
||
|
||
# set compatible mode for filedaemon so that lz4hc is allowed | ||
cp ${scripts}/bareos-fd.conf ${scripts}/bareos-fd.conf.tmp | ||
sed -e 's#FileDaemon {.*#FileDaemon { compatible=no#' < ${scripts}/bareos-fd.conf.tmp > ${scripts}/bareos-fd.conf | ||
|
||
start_test | ||
|
||
cat <<END_OF_DATA >${cwd}/tmp/bconcmds | ||
@$out /dev/null | ||
messages | ||
@$out ${cwd}/tmp/log1.out | ||
status all | ||
status all | ||
messages | ||
label storage=File volume=TestVolume001 | ||
run job=lz4hcTest storage=File yes | ||
wait | ||
messages | ||
@# | ||
@# now do a restore | ||
@# | ||
@$out ${cwd}/tmp/log2.out | ||
restore where=${cwd}/tmp/bareos-restores select storage=File | ||
unmark * | ||
mark * | ||
done | ||
yes | ||
wait | ||
messages | ||
quit | ||
END_OF_DATA | ||
|
||
run_bareos | ||
check_for_zombie_jobs storage=File | ||
stop_bareos | ||
|
||
check_two_logs | ||
check_restore_diff | ||
grep " Software Compression" ${cwd}/tmp/log1.out | grep "%" 2>&1 1>/dev/null | ||
if [ $? != 0 ] ; then | ||
echo " !!!!! No compression !!!!!" | ||
bstat=1 | ||
fi | ||
end_test |
Oops, something went wrong.