Option -fail for test_hardlinks to simulate failure, moved tmp to releng/tmp
This commit is contained in:
parent
dbe152aa6e
commit
d006fc0dad
@ -14,6 +14,7 @@ export in_iso=""
|
|||||||
export copy_on_disk="$workdir"/xorriso_hardlinks_copy_dir
|
export copy_on_disk="$workdir"/xorriso_hardlinks_copy_dir
|
||||||
export keep=0
|
export keep=0
|
||||||
export failure=0
|
export failure=0
|
||||||
|
export simulate_failure=0
|
||||||
export next_is_xorriso=0
|
export next_is_xorriso=0
|
||||||
export next_is_rc=0
|
export next_is_rc=0
|
||||||
export bad=0
|
export bad=0
|
||||||
@ -106,8 +107,11 @@ do
|
|||||||
elif test x"$i" = x"-v"
|
elif test x"$i" = x"-v"
|
||||||
then
|
then
|
||||||
report_about="-report_about ALL"
|
report_about="-report_about ALL"
|
||||||
|
elif test x"$i" = x"-fail"
|
||||||
|
then
|
||||||
|
simulate_failure=1
|
||||||
else
|
else
|
||||||
echo "Usage: $0 [-rc FILE] [-keep] [-cleanup] [-xorriso PATH] [-v]" >&2
|
echo "Usage: $0 [-rc FILE] [-keep] [-cleanup] [-fail] [-xorriso PATH] [-v]" >&2
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -191,8 +195,14 @@ echo "=== Copying from image to temporary disk tree" >&2
|
|||||||
-extract "$in_iso" "$copy_on_disk"
|
-extract "$in_iso" "$copy_on_disk"
|
||||||
|
|
||||||
|
|
||||||
## For testing the test: Let it fail deliberately
|
if test "$simulate_failure" = 1
|
||||||
# rm "$copy_on_disk"/file_1_link_b
|
then
|
||||||
|
echo "===" >&2
|
||||||
|
echo "=== SIMULATING FAILURE BY REMOVING AN EXTRACTED FILE" >&2
|
||||||
|
echo "===" >&2
|
||||||
|
echo "FAIL : $prog : Simulated failure caused by option -fail"
|
||||||
|
rm "$copy_on_disk"/file_1_link_b
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo "=== Comparing original disk tree and temporary one" >&2
|
echo "=== Comparing original disk tree and temporary one" >&2
|
||||||
@ -230,6 +240,7 @@ echo
|
|||||||
if test "$failure" = 1
|
if test "$failure" = 1
|
||||||
then
|
then
|
||||||
echo "======== $prog :" 'FAILED'
|
echo "======== $prog :" 'FAILED'
|
||||||
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "======== $prog :" "Passed"
|
echo "======== $prog :" "Passed"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user