Improvements about releng/manual_burn

This commit is contained in:
Thomas Schmitt 2011-08-04 20:49:20 +00:00
parent f04db99750
commit 136c3adf6c
2 changed files with 36 additions and 19 deletions

View File

@ -79,6 +79,7 @@ There are several options which work with run_all_auto and any single test.
-k keep self-generated data.
-c cleanup temporary data kept from previous run and exit.
-f simulate failure.
-h print this help text
-- end of general options, begin of test specific options.
After option "--", there may be given options which are specific to
particular manually executable test scripts.
@ -109,12 +110,15 @@ the user or require sysadmin considerations before they are run:
If no option --dev is given, then the user gets asked which of the listed
drives to examine more closely.
>>> ./manual_burn -x ../xorriso/xorriso [-- [--dev device_file_to_use]
>>> [--what ...directory...]]
>>> burns the content of the directory given with --what onto re-usable
>>> media: CD-RW, DVD-RW, DVD-RAM, DVD+RW, BD-RE.
>>> Other media types get refused.
>>> Data, which are possibly present on the media, get overwritten.
./manual_burn -x ../xorriso/xorriso [-- [--dev device_file_to_use]
[--what ...directory...] [--any_media]]
Burns the content of the directory given with --what onto re-usable
media: CD-RW, DVD-RW, DVD-RAM, DVD+RW, BD-RE.
Other media types get refused, unless option --any_media is given.
Data, which are possibly present on the media, get overwritten.
The result gets check read and compared with the state of the input
directory. MD5 mismatch causes a test failure. Differences to the directory
state are reported but still regarded as success.
>>> ./run_all_manual
@ -165,6 +169,8 @@ Predefined are:
30 = Unexpected state of own directory for self generated files
29 = Not in ./releng directory or missing essential parts of ./releng
When exiting prematurely, make sure to call function cleanup.
General options, variables, and functions
@ -230,3 +236,6 @@ TODO:
* derive a GNU xorriso test suite from libisoburn test suite
* auto_ tests should know whether they work underneath run_all_auto
or whether they run standalone

View File

@ -19,7 +19,7 @@ Specific options:
to existing regular files.
Overview:
Test burning to re-usable media CD-RW, DVD-RW, DVD-RAM, DVD+RW, BD-RE.
One time usable media will be rejected deliberately.
By default, one-time usable media will be rejected deliberately.
HLP
}
@ -102,7 +102,7 @@ if test -e "$dev"
then
if test "$any_media" = 1 -a -f "$dev"
then
echo "FAIL: --dev $dev leads to an existing regular file"
echo "FAIL: ${SELF} : --dev $dev leads to an existing regular file"
echo
cleanup
exit 31
@ -110,7 +110,7 @@ then
else
if test "$any_media" = "0"
then
echo "FAIL: --dev $dev does not lead to an existing file"
echo "FAIL: ${SELF} : --dev $dev does not lead to an existing file"
echo
cleanup
exit 31
@ -125,7 +125,7 @@ set -e
if test "$ret" -ne 0
then
echo "$res" >&2
echo "FAIL: Non-zero exit value $ret with: $RELENG_XORRISO -outdev $dev"
echo "FAIL: ${SELF} : Non-zero exit value $ret with: $RELENG_XORRISO -outdev $dev"
echo
cleanup
exit 1
@ -141,7 +141,7 @@ then
echo "Recognized as re-usable."
elif test "$media" = "is not recognizable"
then
echo "FAIL: No recognizable media detected in: '$dev'"
echo "FAIL: ${SELF} : No recognizable media detected in: '$dev'"
echo
cleanup
exit 2
@ -149,7 +149,7 @@ then
then
echo "Accepted media only because of option --any_media : '$media'"
else
echo "FAIL: No re-usable media detected, but: '$media'"
echo "FAIL: ${SELF} : No re-usable media detected, but: '$media'"
echo
cleanup
exit 2
@ -168,17 +168,25 @@ ret=$?
set -e
if test "$ret" -ne 0
then
echo "FAIL: Non-zero exit value with burn run: $ret"
echo "FAIL: ${SELF} : Non-zero exit value with burn run: $ret"
echo
cleanup
exit 1
fi
# >>> simulate failure
# >>> if test -f "$dev"
# >>> then
# >>> ... alter image ...
# >>> fi
if test "$SIMULATE_FAILURE" = 1
then
echo "FAIL: ${SELF} : Simulated failure caused by option -f"
if test -f "$dev"
then
# Alter image
dd if=/dev/urandom bs=2K count=1 \
of="$dev" conv=notrunc seek=400
else
cleanup
exit 1
fi
fi
# Check read
echo "$RELENG_XORRISO" -for_backup -indev "$dev" \
@ -194,7 +202,7 @@ ret=$?
set -e
if test "$ret" -ne 0
then
echo "FAIL: Non-zero exit value with checkread run: $ret"
echo "FAIL: ${SELF} : Non-zero exit value with checkread run: $ret"
echo
cleanup
exit 1