Re: [hatari-devel] Problems with some FPU tests

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On 04/23/2018 09:18 PM, Thorsten Otto wrote:
No i think it was correct. The first test was run from the script, without
loading a default config, and with --cpulevel 3 (but without explicitly
setting fpu, so it was still off). The 2nd test was run from the command line,
with a default hatari.cfg setup for TT (cpulevel and with fpu), and specifying
--cpulevel 0 on the command line, thus the message in the log that FPU was
turned off. The 2nd run terminated with a segfault.

I cannot reproduce a crash.

Could you provide command line options with which you can reproduce this
with default Hatari config.  Or if that's not reproducible, provide
your Hatari config file and the exact options with which you can
currently reproduce it.

Please tell also which compiler you use.


Or could you provide your test-inf.ttp so I could have a try?

Attached below, ttp, source and script i was using. It has slightly changed in
the meantime, but still gives the same behaviour.

Attached is a small update to the script (clean it up a bit +
add FPU option + make error message more visible).


PS.: the ttp contained in the zip was compiled with the m68k-atari-mint-gcc
cross compiler, and using a modified version of Markus's libcmini (and another
small patch to Hatari to redirect Fwrite(2) to stderr when run without TOS).
That should make writing tests much easier. Would there be Interest to include
that in Hatari?

Sure.  Tests should output something so that they can be tested also
on real HW, so emulating that seems kind of necessary.

Note: Hatari already supports redirecting Atari console out with
normal TOS versions, by catching xconout vector. It even does some interpretation for the VT52 codes. However, that (--conout 2) works
only with real TOS & EmuTOS.


	- Eero
--- run_test.sh.orig	2018-04-23 23:46:22.356846959 +0300
+++ run_test.sh	2018-04-24 00:13:11.234260374 +0300
@@ -1,32 +1,42 @@
 #!/bin/sh
 
 if [ $# -lt 3 -o "$1" = "-h" -o "$1" = "--help" ]; then
-	echo "Usage: $0 <hatari> <program> <cpulevel> ..."
-	exit 1;
+	echo "Usage: $0 <hatari> <program> <fputype> <cpulevel> ..."
+	exit 1
 fi
 
 hatari="$1"
 shift
 if [ ! -x "$hatari" ]; then
 	echo "First parameter must point to valid hatari executable."
-	exit 1;
-fi;
+	exit 1
+fi
 
 program="$1"
 shift
 if [ ! -f "$program" ]; then
 	echo "Second parameter must point to valid gemdos executable."
-	exit 1;
-fi;
+	exit 1
+fi
+
+case "$1" in
+        none|68881|68882|internal)
+		fpu="$1"
+		;;
+	*)
+		echo "Valid FPU types are: none/68881/88882/internal"
+		exit 1
+		;;
+esac
+shift
 
 cpulevel="$1"
 shift
 if [ -z "$cpulevel" -o "$cpulevel" -lt 0 -o "$cpulevel" -gt 4 ]; then
-	echo "Third parameter must be cpulevel in range 0..4."
-	exit 1;
-fi;
+	echo "Fourth parameter must be cpulevel in range 0..4."
+	exit 1
+fi
 
-basedir=$(dirname $0)
 testdir=$(mktemp -d)
 
 remove_temp() {
@@ -37,16 +47,16 @@
 export SDL_VIDEODRIVER=dummy
 export SDL_AUDIODRIVER=dummy
 
-echo HOME="$testdir" "$hatari" --log-level debug --sound off --cpuclock 32 \
-	--tos none -d "$testdir" --run-vbls 500 --bios-intercept on --cpulevel "$cpulevel" "$@" "$basedir/$program" \
-	> "$testdir/out.txt"
-HOME="$testdir" "$hatari" --log-level debug --sound off --cpuclock 32 \
-	--tos none -d "$testdir" --run-vbls 500 --bios-intercept on --cpulevel "$cpulevel" "$@" "$basedir/$program" \
-	2>> "$testdir/out.txt"
+echo HOME="$testdir" "$hatari" --log-level debug --sound off --fast-forward yes \
+	--tos none -d "$testdir" --run-vbls 500 --cpulevel "$cpulevel" "$@" \
+	--fpu "$fpu" "$program" >> "$testdir/out.txt"
+HOME="$testdir" "$hatari" --log-level debug --sound off --fast-forward yes \
+	--tos none -d "$testdir" --run-vbls 500 --cpulevel "$cpulevel" \
+	--fpu "$fpu" "$@" "$program" 2>> "$testdir/out.txt"
 exitstat=$?
 if [ $exitstat -ne 0 ]; then
-	echo "Running hatari failed. Status=${exitstat}."
 	cat "$testdir/out.txt"
+	echo "ERROR: Running hatari failed. Status=${exitstat}."
 	exit 1
 fi
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/