|
|
@@ -133,12 +133,21 @@ DUMP=../tmp/nonvacuity.dump
|
|
|
# therefore left Compiler.mod half-mutated, with `git status` showing a source
|
|
|
# that no case had finished with. It joins the copies above, taken before the
|
|
|
# first mutation and covered by the same trap.
|
|
|
+#
|
|
|
+# tests/probe/modrm11.{py,s} are the last two: the mod=11 table section mutates
|
|
|
+# them and puts them back after each case, so a run that died between the two
|
|
|
+# left them edited. They move here for the same reason. restore_all copies
|
|
|
+# them directly instead of calling restore_probe, which is defined halfway down
|
|
|
+# this file: a trap firing before that definition would abort the rest of the
|
|
|
+# restore with "command not found".
|
|
|
mkdir -p ../tmp
|
|
|
SAVED_E=../tmp/nonvacuity.Exec86.mod
|
|
|
SAVED_SH=../tmp/nonvacuity.Shell.mod
|
|
|
SAVED_CI=../tmp/nonvacuity.comimage.py
|
|
|
SAVED_T=../tmp/nonvacuity.comtest.py
|
|
|
SAVED_C=../tmp/nonvacuity.Compiler.mod
|
|
|
+SAVED_PY=../tmp/nonvacuity.modrm11.py
|
|
|
+SAVED_S=../tmp/nonvacuity.modrm11.s
|
|
|
|
|
|
cp Runtime.mod "$SAVED" || exit 1
|
|
|
cp Exec86.mod "$SAVED_E" || exit 1
|
|
|
@@ -146,6 +155,8 @@ cp Shell.mod "$SAVED_SH" || exit 1
|
|
|
cp tests/comimage.py "$SAVED_CI" || exit 1
|
|
|
cp tests/comtest.py "$SAVED_T" || exit 1
|
|
|
cp Compiler.mod "$SAVED_C" || exit 1
|
|
|
+cp tests/probe/modrm11.py "$SAVED_PY" || exit 1
|
|
|
+cp tests/probe/modrm11.s "$SAVED_S" || exit 1
|
|
|
|
|
|
restore_all () {
|
|
|
cp "$SAVED" Runtime.mod
|
|
|
@@ -154,6 +165,8 @@ restore_all () {
|
|
|
cp "$SAVED_CI" tests/comimage.py
|
|
|
cp "$SAVED_T" tests/comtest.py
|
|
|
cp "$SAVED_C" Compiler.mod
|
|
|
+ cp "$SAVED_PY" tests/probe/modrm11.py
|
|
|
+ cp "$SAVED_S" tests/probe/modrm11.s
|
|
|
"$GM2" -fiso -c Runtime.mod >/dev/null 2>&1
|
|
|
"$GM2" -fiso -c Exec86.mod >/dev/null 2>&1
|
|
|
# The shell is rebuilt as well: a test that runs against a binary built
|
|
|
@@ -324,11 +337,9 @@ fi
|
|
|
echo
|
|
|
echo "== the mod=11 table (probe/modrm11.py)"
|
|
|
# These mutate the probe's own sources, not the runtime, so there is no
|
|
|
-# rebuild in the loop. SAVED_PY / SAVED_S are restored after each case.
|
|
|
-SAVED_PY=../tmp/nonvacuity.modrm11.py
|
|
|
-SAVED_S=../tmp/nonvacuity.modrm11.s
|
|
|
-cp tests/probe/modrm11.py "$SAVED_PY" || exit 1
|
|
|
-cp tests/probe/modrm11.s "$SAVED_S" || exit 1
|
|
|
+# rebuild in the loop. SAVED_PY / SAVED_S are taken at the top of this file,
|
|
|
+# beside the EXIT trap, so an interrupted run restores them too; each case
|
|
|
+# still puts them back here so the next one starts from the real table.
|
|
|
|
|
|
M11="python3 tests/probe/modrm11.py"
|
|
|
restore_probe () {
|