chore: re-enable adaptive read tests, enhance github actions
This commit is contained in:
@@ -28,6 +28,8 @@ if ! $MD5SUM $RNDSEQ >/dev/null 2>&1; then
|
||||
MD5SUM=../simple-md5sum
|
||||
fi
|
||||
|
||||
nbfailed=0
|
||||
|
||||
# Assemble sed expressions for removal of variable output contents
|
||||
|
||||
SED_REMOVE_ISO_DIR="([a-zA-Z]:/[a-zA-Z0-9/]+)?${ISODIR}/"
|
||||
@@ -44,12 +46,13 @@ fi
|
||||
# Usage
|
||||
|
||||
if test "$1" == "--help" || test "$1" == "-h"; then
|
||||
echo "Usage: $0 [gui] [all|cont <test case>]"
|
||||
echo "Usage: $0 [gui] [all|[cont|only] <test case>]"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
doall="no"
|
||||
cont_at="false"
|
||||
only_this_one="false"
|
||||
gui_mode="false"
|
||||
|
||||
param=($*)
|
||||
@@ -59,6 +62,7 @@ case "${param[0]}" in
|
||||
gui_mode="true"
|
||||
param[0]="${param[1]}"
|
||||
param[1]="${param[2]}"
|
||||
param[2]="${param[3]}"
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -69,6 +73,9 @@ case "${param[0]}" in
|
||||
cont)
|
||||
cont_at="${param[1]}"
|
||||
;;
|
||||
only)
|
||||
only_this_one="${param[1]}"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Sanity check
|
||||
@@ -118,9 +125,19 @@ function try()
|
||||
cont_at="false"
|
||||
fi
|
||||
|
||||
if test "$only_this_one" != "false"; then
|
||||
if test "$only_this_one" != "${CODEC_PREFIX}_$2"; then
|
||||
return 1
|
||||
elif test "$only_this_one" == "done_please_exit"; then
|
||||
exit $nbfailed
|
||||
else
|
||||
only_this_one="done_please_exit"
|
||||
fi
|
||||
fi
|
||||
|
||||
doit=$(echo $doit | cut -d\ -f 2)
|
||||
|
||||
if test $doall = "yes" || test $doit = "yes"; then
|
||||
if test $doall = "yes" || test $doit = "yes" || test $only_this_one != "false"; then
|
||||
# Clean up temporary files
|
||||
if test -n "$TMPISO" && test -f "$TMPISO"; then
|
||||
rm -f $TMPISO
|
||||
@@ -222,7 +239,9 @@ function run_regtest()
|
||||
|
||||
filter=cat
|
||||
echo "$options" | grep -qw SORTED && filter=sort
|
||||
if [ "${CODEC_PREFIX}_${testsymbol}" = RS01_scan_no_device ] || [ "${CODEC_PREFIX}_${testsymbol}" = RS01_read_no_device ]; then
|
||||
if [ "${CODEC_PREFIX}_${testsymbol}" = RS01_scan_no_device ] || \
|
||||
[ "${CODEC_PREFIX}_${testsymbol}" = RS01_read_no_device ] || \
|
||||
[ "${CODEC_PREFIX}_${testsymbol}" = RS01_adaptive_no_device ]; then
|
||||
# for Windows
|
||||
sed -i -re "s=device $NON_EXISTENT_DEVICE\.=/dev/sdz: No such file or directory=" $NEWLOG
|
||||
fi
|
||||
@@ -236,17 +255,21 @@ function run_regtest()
|
||||
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
|
||||
head -n 2 $LOGDIR/${CODEC_PREFIX}_${testsymbol} >$REFLOG
|
||||
sed -e "s=${SED_REMOVE_ISO_DIR}==g" $NEWLOG >>$REFLOG
|
||||
pass="skip"
|
||||
else
|
||||
pass="false"
|
||||
fi
|
||||
while true; do
|
||||
read -n 1 -p ">> Press 'a' to accept this diff; 'v' to vimdiff; any other key to fail this test:" -e answer
|
||||
if test "$answer" == "a"; then
|
||||
cp $REFLOG $LOGDIR
|
||||
head -n 2 $LOGDIR/${CODEC_PREFIX}_${testsymbol} >$REFLOG
|
||||
sed -e "s=${SED_REMOVE_ISO_DIR}==g" $NEWLOG >>$REFLOG
|
||||
pass="skip"
|
||||
elif test "$answer" == "v"; then
|
||||
vimdiff $REFLOG $NEWLOG
|
||||
continue
|
||||
else
|
||||
pass="false"
|
||||
fi
|
||||
break
|
||||
done
|
||||
else
|
||||
pass="false"
|
||||
fi
|
||||
@@ -313,6 +336,8 @@ function run_regtest()
|
||||
;;
|
||||
|
||||
*)
|
||||
nbfailed=$((nbfailed + 1))
|
||||
[ $nbfailed -ge 256 ] && nbfailed=255
|
||||
echo "test symbol for config: $testsymbol"
|
||||
if test "$fail_on_bad" == "yes"; then
|
||||
next=$(grep -A 1 ${CODEC_PREFIX}_$testsymbol config.txt | tail -n 1 | cut -d\ -f 1)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Global toggles
|
||||
|
||||
FAIL_ON_BAD yes
|
||||
FAIL_ON_BAD no
|
||||
SPAWN_LOG_WINDOW no
|
||||
INTERACTIVE_DIFF yes
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ Device: sim-cd, Simulated CD drive 1.00
|
||||
Using READ CD.
|
||||
Medium "Random Image": CD-R mode 1, 21000 sectors, created 16-07-2006.
|
||||
|
||||
RS01-type ECC found
|
||||
Adaptive reading: Trying to collect enough data for error correction.
|
||||
|
||||
*
|
||||
|
||||
@@ -9,6 +9,7 @@ Device: sim-cd, Simulated CD drive 1.00
|
||||
Using READ CD.
|
||||
Medium "Random Image": CD-R mode 1, 21000 sectors, created 16-07-2006.
|
||||
|
||||
RS01-type ECC found
|
||||
Adaptive reading: Trying to collect enough data for error correction.
|
||||
Creating new rs01-tmp.iso image.
|
||||
Repairable: 0.0% (correctable: 0; now reading [0..20999], size 21000)
|
||||
|
||||
@@ -86,7 +86,7 @@ try_sector: trying sector 20850
|
||||
try_sector: no cookie, skipping current modulo
|
||||
RS02Recognize: skipping exhaustive RS02 search
|
||||
...trying RS03
|
||||
RS03Recognize: medium sim-cd
|
||||
RS03RecognizeImage: medium sim-cd
|
||||
FindRS03HeaderInImage: medium sim-cd
|
||||
RS03RecognizeImage: skipping exhaustive RS03 search
|
||||
...no augmented image detected.
|
||||
|
||||
@@ -86,7 +86,7 @@ try_sector: trying sector 20850
|
||||
try_sector: no cookie, skipping current modulo
|
||||
RS02Recognize: skipping exhaustive RS02 search
|
||||
...trying RS03
|
||||
RS03Recognize: medium sim-cd
|
||||
RS03RecognizeImage: medium sim-cd
|
||||
FindRS03HeaderInImage: medium sim-cd
|
||||
RS03RecognizeImage: skipping exhaustive RS03 search
|
||||
...no augmented image detected.
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -9,6 +9,7 @@ Device: sim-cd, Simulated CD drive 1.00
|
||||
Using READ CD.
|
||||
Medium "Random Image": CD-R mode 1, 21044 sectors, created 16-07-2006.
|
||||
|
||||
RS01-type ECC found
|
||||
Adaptive reading: Trying to collect enough data for error correction.
|
||||
* Warning: Medium contains 44 sectors more as recorded in the .ecc file
|
||||
* (Medium: 21044 sectors; expected from .ecc file: 21000 sectors).
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -9,6 +9,7 @@ Device: sim-cd, Simulated CD drive 1.00
|
||||
Using READ CD.
|
||||
Medium "Random Image": CD-R mode 1, 20956 sectors, created 16-07-2006.
|
||||
|
||||
RS01-type ECC found
|
||||
Adaptive reading: Trying to collect enough data for error correction.
|
||||
* Warning: Medium contains 44 sectors less as recorded in the .ecc file
|
||||
* (Medium: 20956 sectors; expected from .ecc file: 21000 sectors).
|
||||
|
||||
@@ -9,6 +9,7 @@ Device: sim-cd, Simulated CD drive 1.00
|
||||
Using READ CD.
|
||||
Medium "Random Image": CD-R mode 1, 21002 sectors, created 16-07-2006.
|
||||
|
||||
RS01-type ECC found
|
||||
Adaptive reading: Trying to collect enough data for error correction.
|
||||
* Warning: Medium contains 2 sectors more as recorded in the .ecc file
|
||||
* (Medium: 21002 sectors; expected from .ecc file: 21000 sectors).
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -9,6 +9,7 @@ Device: sim-cd, Simulated CD drive 1.00
|
||||
Using READ CD.
|
||||
Medium "Random Image": CD-R mode 1, 34932 sectors, Ecc, created 16-07-2006.
|
||||
|
||||
RS02-type ECC found
|
||||
* Warning: This image requires dvdisaster-99.99!
|
||||
* Proceeding could trigger incorrect behaviour.
|
||||
* Please visit http://www.dvdisaster.org for an upgrade.
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -9,6 +9,7 @@ Device: sim-cd, Simulated CD drive 1.00
|
||||
Using READ CD.
|
||||
Medium "Random Image": CD-R mode 1, 34932 sectors, Ecc, created 16-07-2006.
|
||||
|
||||
RS02-type ECC found
|
||||
Adaptive reading: Trying to collect enough data for error correction.
|
||||
Creating new rs02-tmp.iso image.
|
||||
Repairable: 0.2% (missing: 34932; now reading [0..34931], size 34932)Repairable: 0.3% (missing: 34900; now reading [0..34931], size 34932)Repairable: 0.4% (missing: 34868; now reading [0..34931], size 34932)Repairable: 0.5% (missing: 34820; now reading [0..34931], size 34932)Repairable: 0.6% (missing: 34788; now reading [0..34931], size 34932)Repairable: 0.7% (missing: 34756; now reading [0..34931], size 34932)Repairable: 0.8% (missing: 34724; now reading [0..34931], size 34932)Repairable: 0.9% (missing: 34692; now reading [0..34931], size 34932)Repairable: 1.0% (missing: 34644; now reading [0..34931], size 34932)Repairable: 1.1% (missing: 34612; now reading [0..34931], size 34932)Repairable: 1.2% (missing: 34580; now reading [0..34931], size 34932)Repairable: 1.3% (missing: 34548; now reading [0..34931], size 34932)Repairable: 1.4% (missing: 34516; now reading [0..34931], size 34932)Repairable: 1.5% (missing: 34484; now reading [0..34931], size 34932)Repairable: 1.6% (missing: 34436; now reading [0..34931], size 34932)Repairable: 1.7% (missing: 34404; now reading [0..34931], size 34932)Repairable: 1.8% (missing: 34372; now reading [0..34931], size 34932)Repairable: 1.9% (missing: 34340; now reading [0..34931], size 34932)Repairable: 2.0% (missing: 34308; now reading [0..34931], size 34932)Repairable: 2.1% (missing: 34260; now reading [0..34931], size 34932)Repairable: 2.2% (missing: 34228; now reading [0..34931], size 34932)Repairable: 2.3% (missing: 34196; now reading [0..34931], size 34932)Repairable: 2.4% (missing: 34164; now reading [0..34931], size 34932)Repairable: 2.5% (missing: 34132; now reading [0..34931], size 34932)Repairable: 2.6% (missing: 34084; now reading [0..34931], size 34932)Repairable: 2.7% (missing: 34052; now reading [0..34931], size 34932)Repairable: 2.8% (missing: 34020; now reading [0..34931], size 34932)Repairable: 2.9% (missing: 33988; now reading [0..34931], size 34932)Repairable: 3.0% (missing: 33956; now reading [0..34931], size 34932)Sector 992, try 1: Medium Error; Unrecovered read error.
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -9,6 +9,7 @@ Device: sim-cd, Simulated CD drive 1.00
|
||||
Using READ CD.
|
||||
Medium "Random Image": CD-R mode 1, 34932 sectors, Ecc, created 16-07-2006.
|
||||
|
||||
RS01-type ECC found
|
||||
Adaptive reading: Trying to collect enough data for error correction.
|
||||
|
||||
*
|
||||
|
||||
@@ -441,7 +441,7 @@ fi
|
||||
# Tests whether CRC and ECC information is taken from the read process,
|
||||
# not the wrong ecc file.
|
||||
|
||||
if false && try "read image with wrong ecc (RS01) and create new ecc" ecc_recreate_after_read_wrong_rs01; then
|
||||
if 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
|
||||
@@ -1478,9 +1478,6 @@ fi
|
||||
|
||||
REGTEST_SECTION="Reading tests (adaptive)"
|
||||
|
||||
echo "Currently not enabled!"
|
||||
exit $nbfailed
|
||||
|
||||
# Read good image with error correction data available
|
||||
|
||||
if try "reading good image" adaptive_good; then
|
||||
|
||||
@@ -730,7 +730,7 @@ fi
|
||||
|
||||
# Fix image containing 137 extra bytes
|
||||
|
||||
if false && try "trying to fix image with 137 extra bytes" fix_image_plus137; then
|
||||
if 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
|
||||
@@ -743,7 +743,7 @@ fi
|
||||
# error in the zero-padded area following the 137 bytes.
|
||||
# Both shall be corrected.
|
||||
|
||||
if false && try "trying to fix image with error in 137 extra bytes" fix_image_error_in_plus137; then
|
||||
if 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
|
||||
@@ -1775,9 +1775,6 @@ fi
|
||||
|
||||
REGTEST_SECTION="Reading tests (adaptive)"
|
||||
|
||||
echo "Currently not enabled!"
|
||||
exit $nbfailed
|
||||
|
||||
# Read complete / optimal image
|
||||
|
||||
if try "reading good image" adaptive_good; then
|
||||
|
||||
@@ -6,4 +6,5 @@ for i in rs*.bash; do
|
||||
allfailed=$((allfailed + ret))
|
||||
done
|
||||
echo Failed $allfailed tests
|
||||
[ $allfailed -ge 256 ] allfailed=255
|
||||
exit $allfailed
|
||||
|
||||
Reference in New Issue
Block a user