Improvements about releng/manual_burn
This commit is contained in:
parent
ab5da44817
commit
cafec268c9
@ -79,6 +79,7 @@ There are several options which work with run_all_auto and any single test.
|
|||||||
-k keep self-generated data.
|
-k keep self-generated data.
|
||||||
-c cleanup temporary data kept from previous run and exit.
|
-c cleanup temporary data kept from previous run and exit.
|
||||||
-f simulate failure.
|
-f simulate failure.
|
||||||
|
-h print this help text
|
||||||
-- end of general options, begin of test specific options.
|
-- end of general options, begin of test specific options.
|
||||||
After option "--", there may be given options which are specific to
|
After option "--", there may be given options which are specific to
|
||||||
particular manually executable test scripts.
|
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
|
If no option --dev is given, then the user gets asked which of the listed
|
||||||
drives to examine more closely.
|
drives to examine more closely.
|
||||||
|
|
||||||
>>> ./manual_burn -x ../xorriso/xorriso [-- [--dev device_file_to_use]
|
./manual_burn -x ../xorriso/xorriso [-- [--dev device_file_to_use]
|
||||||
>>> [--what ...directory...]]
|
[--what ...directory...] [--any_media]]
|
||||||
>>> burns the content of the directory given with --what onto re-usable
|
Burns the content of the directory given with --what onto re-usable
|
||||||
>>> media: CD-RW, DVD-RW, DVD-RAM, DVD+RW, BD-RE.
|
media: CD-RW, DVD-RW, DVD-RAM, DVD+RW, BD-RE.
|
||||||
>>> Other media types get refused.
|
Other media types get refused, unless option --any_media is given.
|
||||||
>>> Data, which are possibly present on the media, get overwritten.
|
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
|
>>> ./run_all_manual
|
||||||
|
|
||||||
@ -165,6 +169,8 @@ Predefined are:
|
|||||||
30 = Unexpected state of own directory for self generated files
|
30 = Unexpected state of own directory for self generated files
|
||||||
29 = Not in ./releng directory or missing essential parts of ./releng
|
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
|
General options, variables, and functions
|
||||||
|
|
||||||
@ -230,3 +236,6 @@ TODO:
|
|||||||
|
|
||||||
* derive a GNU xorriso test suite from libisoburn test suite
|
* 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
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ Specific options:
|
|||||||
to existing regular files.
|
to existing regular files.
|
||||||
Overview:
|
Overview:
|
||||||
Test burning to re-usable media CD-RW, DVD-RW, DVD-RAM, DVD+RW, BD-RE.
|
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
|
HLP
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ if test -e "$dev"
|
|||||||
then
|
then
|
||||||
if test "$any_media" = 1 -a -f "$dev"
|
if test "$any_media" = 1 -a -f "$dev"
|
||||||
then
|
then
|
||||||
echo "FAIL: --dev $dev leads to an existing regular file"
|
echo "FAIL: ${SELF} : --dev $dev leads to an existing regular file"
|
||||||
echo
|
echo
|
||||||
cleanup
|
cleanup
|
||||||
exit 31
|
exit 31
|
||||||
@ -110,7 +110,7 @@ then
|
|||||||
else
|
else
|
||||||
if test "$any_media" = "0"
|
if test "$any_media" = "0"
|
||||||
then
|
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
|
echo
|
||||||
cleanup
|
cleanup
|
||||||
exit 31
|
exit 31
|
||||||
@ -125,7 +125,7 @@ set -e
|
|||||||
if test "$ret" -ne 0
|
if test "$ret" -ne 0
|
||||||
then
|
then
|
||||||
echo "$res" >&2
|
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
|
echo
|
||||||
cleanup
|
cleanup
|
||||||
exit 1
|
exit 1
|
||||||
@ -141,7 +141,7 @@ then
|
|||||||
echo "Recognized as re-usable."
|
echo "Recognized as re-usable."
|
||||||
elif test "$media" = "is not recognizable"
|
elif test "$media" = "is not recognizable"
|
||||||
then
|
then
|
||||||
echo "FAIL: No recognizable media detected in: '$dev'"
|
echo "FAIL: ${SELF} : No recognizable media detected in: '$dev'"
|
||||||
echo
|
echo
|
||||||
cleanup
|
cleanup
|
||||||
exit 2
|
exit 2
|
||||||
@ -149,7 +149,7 @@ then
|
|||||||
then
|
then
|
||||||
echo "Accepted media only because of option --any_media : '$media'"
|
echo "Accepted media only because of option --any_media : '$media'"
|
||||||
else
|
else
|
||||||
echo "FAIL: No re-usable media detected, but: '$media'"
|
echo "FAIL: ${SELF} : No re-usable media detected, but: '$media'"
|
||||||
echo
|
echo
|
||||||
cleanup
|
cleanup
|
||||||
exit 2
|
exit 2
|
||||||
@ -168,17 +168,25 @@ ret=$?
|
|||||||
set -e
|
set -e
|
||||||
if test "$ret" -ne 0
|
if test "$ret" -ne 0
|
||||||
then
|
then
|
||||||
echo "FAIL: Non-zero exit value with burn run: $ret"
|
echo "FAIL: ${SELF} : Non-zero exit value with burn run: $ret"
|
||||||
echo
|
echo
|
||||||
cleanup
|
cleanup
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# >>> simulate failure
|
if test "$SIMULATE_FAILURE" = 1
|
||||||
# >>> if test -f "$dev"
|
then
|
||||||
# >>> then
|
echo "FAIL: ${SELF} : Simulated failure caused by option -f"
|
||||||
# >>> ... alter image ...
|
if test -f "$dev"
|
||||||
# >>> fi
|
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
|
# Check read
|
||||||
echo "$RELENG_XORRISO" -for_backup -indev "$dev" \
|
echo "$RELENG_XORRISO" -for_backup -indev "$dev" \
|
||||||
@ -194,7 +202,7 @@ ret=$?
|
|||||||
set -e
|
set -e
|
||||||
if test "$ret" -ne 0
|
if test "$ret" -ne 0
|
||||||
then
|
then
|
||||||
echo "FAIL: Non-zero exit value with checkread run: $ret"
|
echo "FAIL: ${SELF} : Non-zero exit value with checkread run: $ret"
|
||||||
echo
|
echo
|
||||||
cleanup
|
cleanup
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user