xemu/tests/tcg
Max Filippov d0ce7e9cfc target/xtensa: fix timers test
The value of CCOUNT special register is calculated as time elapsed
since CCOUNT == 0 multiplied by the core frequency. In icount mode time
increment between consecutive instructions that don't involve time
warps is constant, but unless the result of multiplication of this
constant by the core frequency is a whole number the CCOUNT increment
between these instructions may not be constant. E.g. with icount=7 each
instruction takes 128ns, with core clock of 10MHz CCOUNT values for
consecutive instructions are:

  502: (128 * 502 * 10000000) / 1000000000 = 642.56
  503: (128 * 503 * 10000000) / 1000000000 = 643.84
  504: (128 * 504 * 10000000) / 1000000000 = 645.12

I.e.the CCOUNT increments depend on the absolute time. This results in
varying CCOUNT differences for consecutive instructions in tests that
involve time warps and don't set CCOUNT explicitly.

Change frequency of the core used in tests so that clock cycle takes
exactly 64ns. Change icount power used in tests to 6, so that each
instruction takes exactly 1 clock cycle. With these changes CCOUNT
increments only depend on the number of executed instructions and that's
what timer tests expect, so they work correctly.

Longer story:
  http://lists.nongnu.org/archive/html/qemu-devel/2018-03/msg04326.html

Cc: Pavel Dovgaluk <Pavel.Dovgaluk@ispras.ru>
Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2018-03-26 14:17:04 -07:00
..
alpha
cris tests: Avoid non-portable 'echo -ARG' 2017-07-11 17:45:00 +02:00
lm32 test: lm32: use semihosting for testing 2014-05-24 19:42:29 +02:00
mips target-mips: correct the values in the DSP tests 2013-07-30 17:48:24 +02:00
openrisc target/openrisc: Rename the cpu from or32 to or1k 2017-02-14 08:14:58 +11:00
xtensa target/xtensa: fix timers test 2018-03-26 14:17:04 -07:00
hello-arm.c
hello-i386.c tests/tcg: fix a few warnings 2012-10-27 14:37:25 +00:00
hello-mips.c
linux-test.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
Makefile tests/tcg: Fix compilation of test_path 2014-05-07 21:00:43 +04:00
pi_10.com
README qemu-tech: move TCG test documentation to tests/tcg/README 2016-10-07 10:05:30 +02:00
runcom.c
sha1.c
test_path.c tests/tcg: Fix compilation of test_path 2014-05-07 21:00:43 +04:00
test-arm-iwmmxt.s
test-i386-code16.S
test-i386-fprem.c Clean up includes some more 2016-03-22 22:20:16 +01:00
test-i386-muldiv.h
test-i386-shift.h
test-i386-ssse3.c
test-i386-vm86.S
test-i386.c Replace 'struct ucontext' with 'ucontext_t' type 2017-07-20 10:10:28 +01:00
test-i386.h
test-mmap.c maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
testthread.c maint: remove unused include for signal.h 2015-09-11 10:21:38 +03:00

This directory contains various interesting programs for
regression testing.

The target "make test" runs the programs and, if applicable,
runs "diff" to detect mismatches between output on the host and
output on QEMU.

i386
====

test-i386
---------

This program executes most of the 16 bit and 32 bit x86 instructions and
generates a text output, for comparison with the output obtained with
a real CPU or another emulator.

The Linux system call modify_ldt() is used to create x86 selectors
to test some 16 bit addressing and 32 bit with segmentation cases.

The Linux system call vm86() is used to test vm86 emulation.

Various exceptions are raised to test most of the x86 user space
exception reporting.

linux-test
----------

This program tests various Linux system calls. It is used to verify
that the system call parameters are correctly converted between target
and host CPUs.

test-i386-fprem
---------------

runcom
------

test-mmap
---------

sha1
----

hello-i386
----------


ARM
===

hello-arm
---------

test-arm-iwmmxt
---------------

MIPS
====

hello-mips
----------

hello-mipsel
------------

CRIS
====
The testsuite for CRIS is in tests/tcg/cris.  You can run it
with "make test-cris".

LM32
====
The testsuite for LM32 is in tests/tcg/cris.  You can run it
with "make test-lm32".