diff --git a/cbox-build.sh b/cbox-build.sh
index 066dfa3..fdae0a0 100755
--- a/cbox-build.sh
+++ b/cbox-build.sh
@@ -78,7 +78,7 @@ function qemu_boot()
{
if [ ! -e "$HD_IMAGE" ]
then echo "Creating temporary harddisk image ..."
- dd if=/dev/zero of="$HD_IMAGE" bs=1M count=5
+ dd if=/dev/zero of="$HD_IMAGE" bs=1M count=20
fi
echo "Starting qemu ..."
qemu -cdrom "$IMAGEFILE" -m 64 -hda "$IMAGEFILE" -boot d -n misc/qemu-ifup || true
diff --git a/cryptobox.conf.d/usr/lib/cryptobox/cbox-manage.sh b/cryptobox.conf.d/usr/lib/cryptobox/cbox-manage.sh
index 0231b19..db39e81 100755
--- a/cryptobox.conf.d/usr/lib/cryptobox/cbox-manage.sh
+++ b/cryptobox.conf.d/usr/lib/cryptobox/cbox-manage.sh
@@ -218,10 +218,11 @@ function umount_crypto()
{
# do not break on error
set +e
- # thttpd removes PATH for cgis
/etc/init.d/samba stop
- ps -e | grep -q " samba$" && killall samba
- ps -e | grep -q " samba$" && killall -9 samba
+ ps -e | grep -q " smbd$" && killall smbd
+ ps -e | grep -q " nmbd$" && killall nmbd
+ ps -e | grep -q " smbd$" && killall -9 smbd
+ ps -e | grep -q " nmbd$" && killall -9 nmbd
umount "$CRYPTO_DIR"
$CRYPTSETUP remove "$CRYPTMAPPER_DEV"
set -e
diff --git a/cryptobox.conf.d/usr/lib/cryptobox/validate.sh b/cryptobox.conf.d/usr/lib/cryptobox/validate.sh
index 940f13c..f5a2053 100755
--- a/cryptobox.conf.d/usr/lib/cryptobox/validate.sh
+++ b/cryptobox.conf.d/usr/lib/cryptobox/validate.sh
@@ -28,11 +28,14 @@ function do_single()
{
local TESTNAME=$(basename $1)
curl --insecure --silent --output "${2}/${TESTNAME}.html" --config "$1/input.curl"
- [ -e "${2}/${TESTNAME}.html" ] && sed "1,/CBOX-STATUS-begin/d; /CBOX-STATUS-end/,\$d" "${2}/${TESTNAME}.html" >"${2}/${TESTNAME}.status"
- # the diff option "-B" is required, because the status output of
- # the cryptobox.pl script contains some blank lines
- diff -NB "${2}/${TESTNAME}.status" "$1/output" >"${2}/${TESTNAME}.diff" || true
- rm "${2}/${TESTNAME}.status"
+ # there is no status in certain cases - e.g. for error 404
+ if [ -e "${2}/${TESTNAME}.html" ]
+ then sed "1,/CBOX-STATUS-begin/d; /CBOX-STATUS-end/,\$d" "${2}/${TESTNAME}.html" >"${2}/${TESTNAME}.status"
+ # the diff option "-B" is required, because the status output of
+ # the cryptobox.pl script contains some blank lines
+ diff -NB "${2}/${TESTNAME}.status" "$1/output" >"${2}/${TESTNAME}.diff" || true
+ rm "${2}/${TESTNAME}.status"
+ fi
cp "$1/description" "${2}/${TESTNAME}.desc"
}
@@ -47,7 +50,7 @@ function do_series()
done
create_summary "$REPORT_DIR/$1" >"$REPORT_DIR/$1/summary.html"
tar czf "$REPORT_DIR/${1}-results.tar.gz" -C "$REPORT_DIR" "$1"
- echo "$REPORT_DIR/${1}-results.tar.gz"
+ #echo "$REPORT_DIR/${1}-results.tar.gz"
}
@@ -65,12 +68,12 @@ create_summary()
sed 's#$#
#' "$DIFF_FILE"
else cat "$SUMMARY_TEMPLATE_DIR/result-ok"
echo "no differences found"
+ # remove empty diff
+ [ -e "$DIFF_FILE" ] && rm "$DIFF_FILE"
fi
cat "$SUMMARY_TEMPLATE_DIR/single_footer"
# remove description file
rm "$a"
- # remove if empty
- [ -e "$DIFF_FILE" -a ! -s "$DIFF_FILE" ] && rm "$DIFF_FILE"
done
cat "$SUMMARY_TEMPLATE_DIR/footer"
}
@@ -91,10 +94,21 @@ case "$ACTION" in
[ ! -d "$CASE_DIR" ] && error_die 2 "the test case was not found ($CASE_DIR)!"
do_series "$2"
;;
+ check_all )
+ "$0" list | sort | while read a
+ do echo -n "Validating $a ..."
+ "$0" check "$a"
+ echo
+ echo -n "Waiting 20 seconds ..."
+ sleep 20
+ echo
+ done
+ ;;
* )
echo "Syntax of $(basename $0)"
echo -e "\t list \t\t - show a list of available test cases"
- echo -e "\t check NAME \t - execute a test case - if successful the filename of the report is printed"
+ echo -e "\t check NAME \t - execute a test case"
+ echo -e "\t check_all \t - execute all test cases"
echo -e "\t help \t\t - this syntax information"
echo
;;
diff --git a/cryptobox.conf.d/usr/share/cryptobox/templates/macros.cs b/cryptobox.conf.d/usr/share/cryptobox/templates/macros.cs
index 8c46e3b..ee1108f 100644
--- a/cryptobox.conf.d/usr/share/cryptobox/templates/macros.cs
+++ b/cryptobox.conf.d/usr/share/cryptobox/templates/macros.cs
@@ -15,7 +15,7 @@
if:(name(item) == errname)
?>