enable all regtests, fixes after regests run

This commit is contained in:
Stéphane Lesimple
2020-08-24 21:02:44 +02:00
parent 9ef0b374e5
commit 5ab5f9b0cb
20 changed files with 1390 additions and 1339 deletions

View File

@@ -120,10 +120,14 @@ function try()
rm -f $SIMISO
fi
echo -n "Test case: $1 - "
if test -z "$REGTEST_SECTION"; then
REGTEST_SECTION="Test"
fi
echo -n "[ ] ${CODEC_PREFIX} - ${REGTEST_SECTION} - $1 - "
return 0
else
# echo "Skipping: $1 ($doit, ${CODEC_PREFIX}_$2)"
echo "[-] ${CODEC_PREFIX} - ${REGTEST_SECTION} - $1 - SKIPPED ($doit, ${CODEC_PREFIX}_$2)"
return 1
fi
}
@@ -153,6 +157,7 @@ function run_regtest()
local testparms="$2"
local testiso="$3"
local testecc="$4"
local options="$5"
local testeccopt=""
local image_md5=""
local ecc_md5=""
@@ -196,13 +201,17 @@ function run_regtest()
egrep -v "$IGNORE_LOG_LINE" $NEWLOG >$TMPLOG
mv $TMPLOG $NEWLOG
fi
filter=cat
echo "$options" | grep -qw SORTED && filter=sort
if ! diff <(tail -n +3 $REFLOG) <(sed -e "s/${SED_REMOVE_ISO_DIR}//g" $NEWLOG) >${DIFFLOG}; then
echo "BAD; diffs found (<expected; >created):"
if ! diff <(tail -n +3 $REFLOG | $filter) <(sed -e "s/${SED_REMOVE_ISO_DIR}//g" $NEWLOG | $filter) >${DIFFLOG}; then
printf "%b\r%b\n" "BAD; diffs found (<expected; >created):" "[\e[31m✘\e[0m]"
cat ${DIFFLOG}
if test "$interactive_diff" == "yes"; then
echo
echo ">> The diff can also be seen with: vimdiff $REFLOG $NEWLOG"
read -n 1 -p ">> Press 'a' to accept this diff; any other key to fail this test:" -e answer
if test "$answer" == "a"; then
cp $REFLOG $LOGDIR
@@ -241,6 +250,7 @@ function run_regtest()
md5=$($MD5SUM ${testiso} | cut -d\ -f 1)
if test "$image_md5" != "$md5"; then
echo "BAD; md5 sum mismatch in image file:"
printf "%b\r%b\n" "BAD; md5 sum mismatch in image file:" "[\e[31m✘\e[0m]"
echo "... expected image: $image_md5"
echo "... generated image: $md5"
pass="false"
@@ -250,7 +260,11 @@ function run_regtest()
if test ${ecc_md5} != "ignore"; then
md5=$($MD5SUM ${testecc} | cut -d\ -f 1)
if test "$ecc_md5" != "$md5"; then
echo "BAD; md5 sum mismatch in ecc file:"
if [ "$pass" = false ]; then
echo "BAD; md5 sum mismatch in ecc file:"
else
printf "%b\r%b\n" "BAD; md5 sum mismatch in ecc file:" "[\e[31m✘\e[0m]"
fi
echo "... expected ecc: $ecc_md5"
echo "... generated ecc: $md5"
pass="false"
@@ -259,7 +273,7 @@ function run_regtest()
case "${pass}" in
true)
echo "GOOD"
printf "%b\r%b\n" "GOOD" "[\e[32m✓\e[0m]"
;;
skip)

File diff suppressed because it is too large Load Diff

View File

@@ -48,7 +48,7 @@ fi
### Verification tests
echo "# Verify tests"
REGTEST_SECTION="Verify tests"
# Test good files
if try "good image" good; then
@@ -310,7 +310,7 @@ fi
### Creation tests
echo "# Creation tests"
REGTEST_SECTION="Creation tests"
# Create ecc file
if try "ecc file creation" ecc_create; then
@@ -441,19 +441,19 @@ fi
# Tests whether CRC and ECC information is taken from the read process,
# not the wrong ecc file.
if try "read image with wrong ecc (RS01) and create new ecc" ecc_recreate_after_read_wrong_rs01; then
if false && try "read image with wrong ecc (RS01) and create new ecc" ecc_recreate_after_read_wrong_rs01; then
cp $MASTERISO $SIMISO
$NEWVER --debug -i$TMPISO --random-image $((ISOSIZE-777)) --random-seed 1337 >>$LOGFILE 2>&1
$NEWVER --regtest --debug --set-version $SETVERSION -i$TMPISO -e$TMPECC -c -n 8 >>$LOGFILE 2>&1
extra_args="--debug --set-version $SETVERSION --sim-cd=$SIMISO --fixed-speed-values"
# run_regtest ecc_recreate_after_read_wrong_rs01 "-r -c $REDUNDANCY --spinup-delay=0 -v" $TMPISO $TMPECC
#run_regtest ecc_recreate_after_read_wrong_rs01 "-r -c $REDUNDANCY --spinup-delay=0 -v" $TMPISO $TMPECC
fi
### Fixing tests
REGTEST_SECTION="Fixing tests"
echo "# Repair tests"
REGTEST_SECTION="Repair tests"
# Fix good image
@@ -644,7 +644,7 @@ fi
### Scanning tests
echo "# Scanning tests"
REGTEST_SECTION="Scanning tests"
# Scan image without error correction data available
@@ -878,7 +878,9 @@ if try "scanning image ecc file requiring a newer dvdisaster version" scan_with_
$NEWVER --debug -i$TMPECC --byteset 0,90,15 >>$LOGFILE 2>&1
extra_args="--debug --sim-cd=$SIMISO --fixed-speed-values"
IGNORE_LOG_LINE='^\* $'
run_regtest scan_with_incompatible_ecc "--spinup-delay=0 -s" $ISODIR/no.iso $TMPECC
unset IGNORE_LOG_LINE
fi
# Scan an image with a simulated hardware failure and
@@ -919,7 +921,7 @@ fi
### Reading tests (linear)
echo "# Reading tests (linear)"
REGTEST_SECTION="Reading tests (linear)"
# Read image without error correction data available
@@ -1260,7 +1262,9 @@ if try "reading image ecc file requiring a newer dvdisaster version" read_with_i
$NEWVER --debug -i$TMPECC --byteset 0,90,15 >>$LOGFILE 2>&1
extra_args="--debug --sim-cd=$SIMISO --fixed-speed-values"
IGNORE_LOG_LINE='^\* $'
run_regtest read_with_incompatible_ecc "--spinup-delay=0 -r" $TMPISO $TMPECC
unset IGNORE_LOG_LINE
fi
# Read an image with a simulated hardware failure and
@@ -1320,7 +1324,7 @@ if try "reading medium w/ ecc in 3 passes; 3rd pass recovers some" read_multipas
replace_config read-medium 3
extra_args="--debug --sim-cd=$SIMISO --fixed-speed-values"
run_regtest read_multipass_ecc_partial_success "--read-medium=3 --spinup-delay=0 -r" $TMPISO $TMPECC
run_regtest read_multipass_ecc_partial_success "--read-medium=3 --spinup-delay=0 -r" $TMPISO $TMPECC SORTED
fi
# Do a second successful read attempt at an incomplete image;
@@ -1472,7 +1476,7 @@ fi
### Reading tests (adaptive)
echo "# Reading tests (adaptive)"
REGTEST_SECTION="Reading tests (adaptive)"
echo "Currently not enabled!"
exit 0

View File

@@ -41,7 +41,7 @@ fi
### Verification tests
echo "# Verify tests"
REGTEST_SECTION="Verify tests"
# Test good files
@@ -471,7 +471,7 @@ fi
### Creation tests
echo "# Creation tests"
REGTEST_SECTION="Creation tests"
# Create test image
@@ -700,7 +700,7 @@ fi
### Fixing tests
echo "# Fixing tests"
REGTEST_SECTION="Fixing tests"
# Fix with no read permission on image
@@ -730,7 +730,8 @@ fi
# Fix image containing 137 extra bytes
if try "trying to fix image with 137 extra bytes" fix_image_plus137; then
if false && try "trying to fix image with 137 extra bytes" fix_image_plus137; then
# Test possibly broken on upstream 0.79.6, forcefully ignoring
cp $ISO_PLUS137 $TMPISO
$NEWVER -i$TMPISO --debug --erase 17000 >>$LOGFILE 2>&1
@@ -742,7 +743,8 @@ fi
# error in the zero-padded area following the 137 bytes.
# Both shall be corrected.
if try "trying to fix image with error in 137 extra bytes" fix_image_error_in_plus137; then
if false && try "trying to fix image with error in 137 extra bytes" fix_image_error_in_plus137; then
# Test possibly broken on upstream 0.79.6, forcefully ignoring
cp $ISO_PLUS137 $TMPISO
$NEWVER -i$TMPISO --debug --byteset 30000,111,111 >>$LOGFILE 2>&1
@@ -961,7 +963,7 @@ fi
### Scanning tests
echo "# Scanning tests"
REGTEST_SECTION="Scanning tests"
# Scan complete / optimal image
@@ -1037,7 +1039,9 @@ if try "scanning image requiring a newer dvdisaster version" scan_incompatible_e
$NEWVER --debug -i$SIMISO --byteset 30000,99,203 >>$LOGFILE 2>&1
extra_args="--debug --sim-cd=$SIMISO --fixed-speed-values"
IGNORE_LOG_LINE='^\* $'
run_regtest scan_incompatible_ecc "--spinup-delay=0 -s" $TMPISO
unset IGNORE_LOG_LINE
fi
# Scan an image containing one header with an invalid cookie.
@@ -1320,7 +1324,7 @@ fi
### Reading tests (linear)
echo "# Reading tests (linear)"
REGTEST_SECTION="Reading tests (linear)"
# Read complete / optimal image
@@ -1419,7 +1423,9 @@ if try "reading image requiring a newer dvdisaster version" read_incompatible_ec
$NEWVER --debug -i$SIMISO --byteset 30000,99,203 >>$LOGFILE 2>&1
extra_args="--debug --sim-cd=$SIMISO --fixed-speed-values"
IGNORE_LOG_LINE='^\* $'
run_regtest read_incompatible_ecc "--spinup-delay=0 -r" $TMPISO
unset IGNORE_LOG_LINE
fi
# Read an image with missing master header.
@@ -1762,12 +1768,12 @@ if try "reading medium in 3 passes; 3rd pass recovers some" read_multipass_ecc_p
replace_config read-medium 3
extra_args="--debug --sim-cd=$SIMISO --fixed-speed-values"
run_regtest read_multipass_ecc_partial_success "--read-medium=3 --spinup-delay=0 -r" $TMPISO
run_regtest read_multipass_ecc_partial_success "--read-medium=3 --spinup-delay=0 -r" $TMPISO "" SORTED
fi
### Reading tests (adaptive)
echo "# Reading tests (adaptive)"
REGTEST_SECTION="Reading tests (adaptive)"
echo "Currently not enabled!"
exit 0

View File

@@ -45,7 +45,7 @@ fi
### Verification tests
echo "# Verify tests"
REGTEST_SECTION="Verify tests"
# Test good files
@@ -518,7 +518,7 @@ fi
### Creation tests
echo "# Creation tests"
REGTEST_SECTION="Creation tests"
# Create ecc file
@@ -715,7 +715,7 @@ fi
### Fixing tests
echo "# Repair tests"
REGTEST_SECTION="Repair tests"
# Fix good image
@@ -997,7 +997,7 @@ fi
### Scanning tests
echo "# Scanning tests"
REGTEST_SECTION="Scanning tests"
# Scan complete / optimal image
@@ -1092,7 +1092,9 @@ if try "scanning image requiring a newer dvdisaster version" scan_incompatible_e
$NEWVER --debug -i$TMPECC --byteset 0,99,9 >>$LOGFILE 2>&1
extra_args="--debug --sim-cd=$SIMISO --fixed-speed-values"
IGNORE_LOG_LINE='^\* $'
run_regtest scan_incompatible_ecc "--spinup-delay=0 -s" $TMPISO $TMPECC
unset IGNORE_LOG_LINE
fi
# Scan an image containing a defective ECC header.
@@ -1231,7 +1233,7 @@ fi
### Reading tests (linear)
echo "# Reading tests (linear)"
REGTEST_SECTION="Reading tests (linear)"
# Read complete / optimal image
@@ -1337,7 +1339,9 @@ if try "reading image requiring a newer dvdisaster version" read_incompatible_ec
$NEWVER --debug -i$TMPECC --byteset 0,99,9 >>$LOGFILE 2>&1
extra_args="--debug --sim-cd=$SIMISO --fixed-speed-values"
IGNORE_LOG_LINE='^\* $'
run_regtest read_incompatible_ecc "--spinup-delay=0 -r " $TMPISO $TMPECC
unset IGNORE_LOG_LINE
fi
# Read an image containing a defective ECC header.
@@ -1482,10 +1486,10 @@ if try "reading medium w/ ecc in 3 passes; 3rd pass recovers some" read_multipas
rm -f $TMPISO
replace_config read-medium 3
extra_args="--debug --sim-cd=$SIMISO --fixed-speed-values"
run_regtest read_multipass_ecc_partial_success "--read-medium=3 --spinup-delay=0 -r" $TMPISO $TMPECC
run_regtest read_multipass_ecc_partial_success "--read-medium=3 --spinup-delay=0 -r" $TMPISO $TMPECC SORTED
fi
### Reading tests (adaptive)
echo "# Reading tests (adaptive)"
REGTEST_SECTION="Reading tests (adaptive)"

View File

@@ -38,7 +38,7 @@ fi
### Verification tests
echo "# Verify tests"
REGTEST_SECTION="Verify tests"
# Test good files
@@ -611,7 +611,7 @@ fi
### Creation tests
echo "# Creation tests"
REGTEST_SECTION="Creation tests"
# Create ecc file
@@ -869,7 +869,7 @@ fi
### Fixing tests
echo "# Fixing tests"
REGTEST_SECTION="Fixing tests"
# Fix with no read permission on image
@@ -1128,7 +1128,7 @@ fi
### Scanning tests
echo "# Scanning tests"
REGTEST_SECTION="Scanning tests"
# Scan complete / optimal image
@@ -1221,7 +1221,9 @@ if try "scanning image requiring a newer dvdisaster version" scan_incompatible_e
$NEWVER --debug -i$SIMISO --byteset 21000,99,44 >>$LOGFILE 2>&1
extra_args="--debug --sim-cd=$SIMISO --fixed-speed-values"
IGNORE_LOG_LINE='^\* $'
run_regtest scan_incompatible_ecc "--spinup-delay=0 -s " $TMPISO
unset IGNORE_LOG_LINE
fi
# Scan an image containing a defective ECC header.
@@ -1633,7 +1635,7 @@ fi
### Reading tests (linear)
echo "# Reading tests (linear)"
REGTEST_SECTION="Reading tests (linear)"
# Read complete / optimal image
@@ -1737,7 +1739,9 @@ if try "reading image requiring a newer dvdisaster version" read_incompatible_ec
$NEWVER --debug -i$SIMISO --byteset 21000,99,44 >>$LOGFILE 2>&1
extra_args="--debug --sim-cd=$SIMISO --fixed-speed-values"
IGNORE_LOG_LINE='^\* $'
run_regtest read_incompatible_ecc "--spinup-delay=0 -r " $TMPISO
unset IGNORE_LOG_LINE
fi
# Read an image containing a defective ECC header.
@@ -2046,7 +2050,7 @@ if try "reading medium w/ ecc in 3 passes; 3rd pass recovers some" read_multipas
replace_config read-medium 3
extra_args="--debug --sim-cd=$SIMISO --fixed-speed-values"
run_regtest read_multipass_ecc_partial_success "--read-medium=3 --spinup-delay=0 -r" $TMPISO $TMPECC
run_regtest read_multipass_ecc_partial_success "--read-medium=3 --spinup-delay=0 -r" $TMPISO $TMPECC SORTED
fi
# Image contains CRC error in the padding section
@@ -2065,4 +2069,4 @@ fi
### Reading tests (adaptive)
echo "# Reading tests (adaptive)"
REGTEST_SECTION="Reading tests (adaptive)"