All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 01/15] tests: mv tests/* -> tests/tcg
@ 2012-01-10 19:10 Anthony Liguori
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 02/15] build: split unit test builds to a separate makefile fragment Anthony Liguori
                   ` (15 more replies)
  0 siblings, 16 replies; 25+ messages in thread
From: Anthony Liguori @ 2012-01-10 19:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 Makefile                                          |    4 ++--
 configure                                         |    6 +++---
 tests/{ => tcg}/Makefile                          |    0
 tests/{ => tcg}/alpha/Makefile                    |    0
 tests/{ => tcg}/alpha/crt.s                       |    0
 tests/{ => tcg}/alpha/hello-alpha.c               |    0
 tests/{ => tcg}/alpha/test-cond.c                 |    0
 tests/{ => tcg}/alpha/test-ovf.c                  |    0
 tests/{ => tcg}/cris/.gdbinit                     |    0
 tests/{ => tcg}/cris/Makefile                     |    0
 tests/{ => tcg}/cris/README                       |    0
 tests/{ => tcg}/cris/check_abs.c                  |    0
 tests/{ => tcg}/cris/check_addc.c                 |    0
 tests/{ => tcg}/cris/check_addcm.c                |    0
 tests/{ => tcg}/cris/check_addi.s                 |    0
 tests/{ => tcg}/cris/check_addiv32.s              |    0
 tests/{ => tcg}/cris/check_addm.s                 |    0
 tests/{ => tcg}/cris/check_addo.c                 |    0
 tests/{ => tcg}/cris/check_addoq.c                |    0
 tests/{ => tcg}/cris/check_addq.s                 |    0
 tests/{ => tcg}/cris/check_addr.s                 |    0
 tests/{ => tcg}/cris/check_addxc.s                |    0
 tests/{ => tcg}/cris/check_addxm.s                |    0
 tests/{ => tcg}/cris/check_addxr.s                |    0
 tests/{ => tcg}/cris/check_andc.s                 |    0
 tests/{ => tcg}/cris/check_andm.s                 |    0
 tests/{ => tcg}/cris/check_andq.s                 |    0
 tests/{ => tcg}/cris/check_andr.s                 |    0
 tests/{ => tcg}/cris/check_asr.s                  |    0
 tests/{ => tcg}/cris/check_ba.s                   |    0
 tests/{ => tcg}/cris/check_bas.s                  |    0
 tests/{ => tcg}/cris/check_bcc.s                  |    0
 tests/{ => tcg}/cris/check_bound.c                |    0
 tests/{ => tcg}/cris/check_boundc.s               |    0
 tests/{ => tcg}/cris/check_boundr.s               |    0
 tests/{ => tcg}/cris/check_btst.s                 |    0
 tests/{ => tcg}/cris/check_clearfv32.s            |    0
 tests/{ => tcg}/cris/check_clrjmp1.s              |    0
 tests/{ => tcg}/cris/check_cmp-2.s                |    0
 tests/{ => tcg}/cris/check_cmpc.s                 |    0
 tests/{ => tcg}/cris/check_cmpm.s                 |    0
 tests/{ => tcg}/cris/check_cmpq.s                 |    0
 tests/{ => tcg}/cris/check_cmpr.s                 |    0
 tests/{ => tcg}/cris/check_cmpxc.s                |    0
 tests/{ => tcg}/cris/check_cmpxm.s                |    0
 tests/{ => tcg}/cris/check_dstep.s                |    0
 tests/{ => tcg}/cris/check_ftag.c                 |    0
 tests/{ => tcg}/cris/check_gcctorture_pr28634-1.c |    0
 tests/{ => tcg}/cris/check_gcctorture_pr28634.c   |    0
 tests/{ => tcg}/cris/check_glibc_kernelversion.c  |    0
 tests/{ => tcg}/cris/check_hello.c                |    0
 tests/{ => tcg}/cris/check_int64.c                |    0
 tests/{ => tcg}/cris/check_jsr.s                  |    0
 tests/{ => tcg}/cris/check_lapc.s                 |    0
 tests/{ => tcg}/cris/check_lsl.s                  |    0
 tests/{ => tcg}/cris/check_lsr.s                  |    0
 tests/{ => tcg}/cris/check_lz.c                   |    0
 tests/{ => tcg}/cris/check_mapbrk.c               |    0
 tests/{ => tcg}/cris/check_mcp.s                  |    0
 tests/{ => tcg}/cris/check_mmap1.c                |    0
 tests/{ => tcg}/cris/check_mmap2.c                |    0
 tests/{ => tcg}/cris/check_mmap3.c                |    0
 tests/{ => tcg}/cris/check_movdelsr1.s            |    0
 tests/{ => tcg}/cris/check_movecr.s               |    0
 tests/{ => tcg}/cris/check_movei.s                |    0
 tests/{ => tcg}/cris/check_movemr.s               |    0
 tests/{ => tcg}/cris/check_movemrv32.s            |    0
 tests/{ => tcg}/cris/check_moveq.c                |    0
 tests/{ => tcg}/cris/check_mover.s                |    0
 tests/{ => tcg}/cris/check_moverm.s               |    0
 tests/{ => tcg}/cris/check_movmp.s                |    0
 tests/{ => tcg}/cris/check_movpmv32.s             |    0
 tests/{ => tcg}/cris/check_movpr.s                |    0
 tests/{ => tcg}/cris/check_movprv32.s             |    0
 tests/{ => tcg}/cris/check_movscr.s               |    0
 tests/{ => tcg}/cris/check_movsm.s                |    0
 tests/{ => tcg}/cris/check_movsr.s                |    0
 tests/{ => tcg}/cris/check_movucr.s               |    0
 tests/{ => tcg}/cris/check_movum.s                |    0
 tests/{ => tcg}/cris/check_movur.s                |    0
 tests/{ => tcg}/cris/check_mulv32.s               |    0
 tests/{ => tcg}/cris/check_mulx.s                 |    0
 tests/{ => tcg}/cris/check_neg.s                  |    0
 tests/{ => tcg}/cris/check_not.s                  |    0
 tests/{ => tcg}/cris/check_openpf1.c              |    0
 tests/{ => tcg}/cris/check_openpf2.c              |    0
 tests/{ => tcg}/cris/check_openpf3.c              |    0
 tests/{ => tcg}/cris/check_openpf4.c              |    0
 tests/{ => tcg}/cris/check_openpf5.c              |    0
 tests/{ => tcg}/cris/check_orc.s                  |    0
 tests/{ => tcg}/cris/check_orm.s                  |    0
 tests/{ => tcg}/cris/check_orq.s                  |    0
 tests/{ => tcg}/cris/check_orr.s                  |    0
 tests/{ => tcg}/cris/check_ret.s                  |    0
 tests/{ => tcg}/cris/check_scc.s                  |    0
 tests/{ => tcg}/cris/check_settls1.c              |    0
 tests/{ => tcg}/cris/check_sigalrm.c              |    0
 tests/{ => tcg}/cris/check_stat1.c                |    0
 tests/{ => tcg}/cris/check_stat2.c                |    0
 tests/{ => tcg}/cris/check_stat3.c                |    0
 tests/{ => tcg}/cris/check_stat4.c                |    0
 tests/{ => tcg}/cris/check_subc.s                 |    0
 tests/{ => tcg}/cris/check_subm.s                 |    0
 tests/{ => tcg}/cris/check_subq.s                 |    0
 tests/{ => tcg}/cris/check_subr.s                 |    0
 tests/{ => tcg}/cris/check_swap.c                 |    0
 tests/{ => tcg}/cris/check_time1.c                |    0
 tests/{ => tcg}/cris/check_time2.c                |    0
 tests/{ => tcg}/cris/check_xarith.s               |    0
 tests/{ => tcg}/cris/crisutils.h                  |    0
 tests/{ => tcg}/cris/crt.s                        |    0
 tests/{ => tcg}/cris/sys.c                        |    0
 tests/{ => tcg}/cris/sys.h                        |    0
 tests/{ => tcg}/cris/testutils.inc                |    0
 tests/{ => tcg}/hello-arm.c                       |    0
 tests/{ => tcg}/hello-i386.c                      |    0
 tests/{ => tcg}/hello-mips.c                      |    0
 tests/{ => tcg}/linux-test.c                      |    0
 tests/{ => tcg}/lm32/Makefile                     |    0
 tests/{ => tcg}/lm32/crt.S                        |    0
 tests/{ => tcg}/lm32/linker.ld                    |    0
 tests/{ => tcg}/lm32/macros.inc                   |    0
 tests/{ => tcg}/lm32/test_add.S                   |    0
 tests/{ => tcg}/lm32/test_addi.S                  |    0
 tests/{ => tcg}/lm32/test_and.S                   |    0
 tests/{ => tcg}/lm32/test_andhi.S                 |    0
 tests/{ => tcg}/lm32/test_andi.S                  |    0
 tests/{ => tcg}/lm32/test_b.S                     |    0
 tests/{ => tcg}/lm32/test_be.S                    |    0
 tests/{ => tcg}/lm32/test_bg.S                    |    0
 tests/{ => tcg}/lm32/test_bge.S                   |    0
 tests/{ => tcg}/lm32/test_bgeu.S                  |    0
 tests/{ => tcg}/lm32/test_bgu.S                   |    0
 tests/{ => tcg}/lm32/test_bi.S                    |    0
 tests/{ => tcg}/lm32/test_bne.S                   |    0
 tests/{ => tcg}/lm32/test_break.S                 |    0
 tests/{ => tcg}/lm32/test_bret.S                  |    0
 tests/{ => tcg}/lm32/test_call.S                  |    0
 tests/{ => tcg}/lm32/test_calli.S                 |    0
 tests/{ => tcg}/lm32/test_cmpe.S                  |    0
 tests/{ => tcg}/lm32/test_cmpei.S                 |    0
 tests/{ => tcg}/lm32/test_cmpg.S                  |    0
 tests/{ => tcg}/lm32/test_cmpge.S                 |    0
 tests/{ => tcg}/lm32/test_cmpgei.S                |    0
 tests/{ => tcg}/lm32/test_cmpgeu.S                |    0
 tests/{ => tcg}/lm32/test_cmpgeui.S               |    0
 tests/{ => tcg}/lm32/test_cmpgi.S                 |    0
 tests/{ => tcg}/lm32/test_cmpgu.S                 |    0
 tests/{ => tcg}/lm32/test_cmpgui.S                |    0
 tests/{ => tcg}/lm32/test_cmpne.S                 |    0
 tests/{ => tcg}/lm32/test_cmpnei.S                |    0
 tests/{ => tcg}/lm32/test_divu.S                  |    0
 tests/{ => tcg}/lm32/test_eret.S                  |    0
 tests/{ => tcg}/lm32/test_lb.S                    |    0
 tests/{ => tcg}/lm32/test_lbu.S                   |    0
 tests/{ => tcg}/lm32/test_lh.S                    |    0
 tests/{ => tcg}/lm32/test_lhu.S                   |    0
 tests/{ => tcg}/lm32/test_lw.S                    |    0
 tests/{ => tcg}/lm32/test_modu.S                  |    0
 tests/{ => tcg}/lm32/test_mul.S                   |    0
 tests/{ => tcg}/lm32/test_muli.S                  |    0
 tests/{ => tcg}/lm32/test_nor.S                   |    0
 tests/{ => tcg}/lm32/test_nori.S                  |    0
 tests/{ => tcg}/lm32/test_or.S                    |    0
 tests/{ => tcg}/lm32/test_orhi.S                  |    0
 tests/{ => tcg}/lm32/test_ori.S                   |    0
 tests/{ => tcg}/lm32/test_ret.S                   |    0
 tests/{ => tcg}/lm32/test_sb.S                    |    0
 tests/{ => tcg}/lm32/test_scall.S                 |    0
 tests/{ => tcg}/lm32/test_sextb.S                 |    0
 tests/{ => tcg}/lm32/test_sexth.S                 |    0
 tests/{ => tcg}/lm32/test_sh.S                    |    0
 tests/{ => tcg}/lm32/test_sl.S                    |    0
 tests/{ => tcg}/lm32/test_sli.S                   |    0
 tests/{ => tcg}/lm32/test_sr.S                    |    0
 tests/{ => tcg}/lm32/test_sri.S                   |    0
 tests/{ => tcg}/lm32/test_sru.S                   |    0
 tests/{ => tcg}/lm32/test_srui.S                  |    0
 tests/{ => tcg}/lm32/test_sub.S                   |    0
 tests/{ => tcg}/lm32/test_sw.S                    |    0
 tests/{ => tcg}/lm32/test_xnor.S                  |    0
 tests/{ => tcg}/lm32/test_xnori.S                 |    0
 tests/{ => tcg}/lm32/test_xor.S                   |    0
 tests/{ => tcg}/lm32/test_xori.S                  |    0
 tests/{ => tcg}/pi_10.com                         |  Bin 54 -> 54 bytes
 tests/{ => tcg}/runcom.c                          |    0
 tests/{ => tcg}/sha1.c                            |    0
 tests/{ => tcg}/test-arm-iwmmxt.s                 |    0
 tests/{ => tcg}/test-i386-code16.S                |    0
 tests/{ => tcg}/test-i386-muldiv.h                |    0
 tests/{ => tcg}/test-i386-shift.h                 |    0
 tests/{ => tcg}/test-i386-ssse3.c                 |    0
 tests/{ => tcg}/test-i386-vm86.S                  |    0
 tests/{ => tcg}/test-i386.c                       |    0
 tests/{ => tcg}/test-i386.h                       |    0
 tests/{ => tcg}/test-mmap.c                       |    0
 tests/{ => tcg}/test_path.c                       |    0
 tests/{ => tcg}/testthread.c                      |    0
 tests/{ => tcg}/xtensa/Makefile                   |    0
 tests/{ => tcg}/xtensa/crt.S                      |    0
 tests/{ => tcg}/xtensa/linker.ld                  |    0
 tests/{ => tcg}/xtensa/macros.inc                 |    0
 tests/{ => tcg}/xtensa/test_b.S                   |    0
 tests/{ => tcg}/xtensa/test_bi.S                  |    0
 tests/{ => tcg}/xtensa/test_boolean.S             |    0
 tests/{ => tcg}/xtensa/test_bz.S                  |    0
 tests/{ => tcg}/xtensa/test_clamps.S              |    0
 tests/{ => tcg}/xtensa/test_fail.S                |    0
 tests/{ => tcg}/xtensa/test_interrupt.S           |    0
 tests/{ => tcg}/xtensa/test_loop.S                |    0
 tests/{ => tcg}/xtensa/test_mac16.S               |    0
 tests/{ => tcg}/xtensa/test_max.S                 |    0
 tests/{ => tcg}/xtensa/test_min.S                 |    0
 tests/{ => tcg}/xtensa/test_mmu.S                 |    0
 tests/{ => tcg}/xtensa/test_mul16.S               |    0
 tests/{ => tcg}/xtensa/test_mul32.S               |    0
 tests/{ => tcg}/xtensa/test_nsa.S                 |    0
 tests/{ => tcg}/xtensa/test_pipeline.S            |    0
 tests/{ => tcg}/xtensa/test_quo.S                 |    0
 tests/{ => tcg}/xtensa/test_rem.S                 |    0
 tests/{ => tcg}/xtensa/test_rst0.S                |    0
 tests/{ => tcg}/xtensa/test_sar.S                 |    0
 tests/{ => tcg}/xtensa/test_sext.S                |    0
 tests/{ => tcg}/xtensa/test_shift.S               |    0
 tests/{ => tcg}/xtensa/test_timer.S               |    0
 tests/{ => tcg}/xtensa/test_windowed.S            |    0
 tests/{ => tcg}/xtensa/vectors.S                  |    0
 227 files changed, 5 insertions(+), 5 deletions(-)
 rename tests/{ => tcg}/Makefile (100%)
 rename tests/{ => tcg}/alpha/Makefile (100%)
 rename tests/{ => tcg}/alpha/crt.s (100%)
 rename tests/{ => tcg}/alpha/hello-alpha.c (100%)
 rename tests/{ => tcg}/alpha/test-cond.c (100%)
 rename tests/{ => tcg}/alpha/test-ovf.c (100%)
 rename tests/{ => tcg}/cris/.gdbinit (100%)
 rename tests/{ => tcg}/cris/Makefile (100%)
 rename tests/{ => tcg}/cris/README (100%)
 rename tests/{ => tcg}/cris/check_abs.c (100%)
 rename tests/{ => tcg}/cris/check_addc.c (100%)
 rename tests/{ => tcg}/cris/check_addcm.c (100%)
 rename tests/{ => tcg}/cris/check_addi.s (100%)
 rename tests/{ => tcg}/cris/check_addiv32.s (100%)
 rename tests/{ => tcg}/cris/check_addm.s (100%)
 rename tests/{ => tcg}/cris/check_addo.c (100%)
 rename tests/{ => tcg}/cris/check_addoq.c (100%)
 rename tests/{ => tcg}/cris/check_addq.s (100%)
 rename tests/{ => tcg}/cris/check_addr.s (100%)
 rename tests/{ => tcg}/cris/check_addxc.s (100%)
 rename tests/{ => tcg}/cris/check_addxm.s (100%)
 rename tests/{ => tcg}/cris/check_addxr.s (100%)
 rename tests/{ => tcg}/cris/check_andc.s (100%)
 rename tests/{ => tcg}/cris/check_andm.s (100%)
 rename tests/{ => tcg}/cris/check_andq.s (100%)
 rename tests/{ => tcg}/cris/check_andr.s (100%)
 rename tests/{ => tcg}/cris/check_asr.s (100%)
 rename tests/{ => tcg}/cris/check_ba.s (100%)
 rename tests/{ => tcg}/cris/check_bas.s (100%)
 rename tests/{ => tcg}/cris/check_bcc.s (100%)
 rename tests/{ => tcg}/cris/check_bound.c (100%)
 rename tests/{ => tcg}/cris/check_boundc.s (100%)
 rename tests/{ => tcg}/cris/check_boundr.s (100%)
 rename tests/{ => tcg}/cris/check_btst.s (100%)
 rename tests/{ => tcg}/cris/check_clearfv32.s (100%)
 rename tests/{ => tcg}/cris/check_clrjmp1.s (100%)
 rename tests/{ => tcg}/cris/check_cmp-2.s (100%)
 rename tests/{ => tcg}/cris/check_cmpc.s (100%)
 rename tests/{ => tcg}/cris/check_cmpm.s (100%)
 rename tests/{ => tcg}/cris/check_cmpq.s (100%)
 rename tests/{ => tcg}/cris/check_cmpr.s (100%)
 rename tests/{ => tcg}/cris/check_cmpxc.s (100%)
 rename tests/{ => tcg}/cris/check_cmpxm.s (100%)
 rename tests/{ => tcg}/cris/check_dstep.s (100%)
 rename tests/{ => tcg}/cris/check_ftag.c (100%)
 rename tests/{ => tcg}/cris/check_gcctorture_pr28634-1.c (100%)
 rename tests/{ => tcg}/cris/check_gcctorture_pr28634.c (100%)
 rename tests/{ => tcg}/cris/check_glibc_kernelversion.c (100%)
 rename tests/{ => tcg}/cris/check_hello.c (100%)
 rename tests/{ => tcg}/cris/check_int64.c (100%)
 rename tests/{ => tcg}/cris/check_jsr.s (100%)
 rename tests/{ => tcg}/cris/check_lapc.s (100%)
 rename tests/{ => tcg}/cris/check_lsl.s (100%)
 rename tests/{ => tcg}/cris/check_lsr.s (100%)
 rename tests/{ => tcg}/cris/check_lz.c (100%)
 rename tests/{ => tcg}/cris/check_mapbrk.c (100%)
 rename tests/{ => tcg}/cris/check_mcp.s (100%)
 rename tests/{ => tcg}/cris/check_mmap1.c (100%)
 rename tests/{ => tcg}/cris/check_mmap2.c (100%)
 rename tests/{ => tcg}/cris/check_mmap3.c (100%)
 rename tests/{ => tcg}/cris/check_movdelsr1.s (100%)
 rename tests/{ => tcg}/cris/check_movecr.s (100%)
 rename tests/{ => tcg}/cris/check_movei.s (100%)
 rename tests/{ => tcg}/cris/check_movemr.s (100%)
 rename tests/{ => tcg}/cris/check_movemrv32.s (100%)
 rename tests/{ => tcg}/cris/check_moveq.c (100%)
 rename tests/{ => tcg}/cris/check_mover.s (100%)
 rename tests/{ => tcg}/cris/check_moverm.s (100%)
 rename tests/{ => tcg}/cris/check_movmp.s (100%)
 rename tests/{ => tcg}/cris/check_movpmv32.s (100%)
 rename tests/{ => tcg}/cris/check_movpr.s (100%)
 rename tests/{ => tcg}/cris/check_movprv32.s (100%)
 rename tests/{ => tcg}/cris/check_movscr.s (100%)
 rename tests/{ => tcg}/cris/check_movsm.s (100%)
 rename tests/{ => tcg}/cris/check_movsr.s (100%)
 rename tests/{ => tcg}/cris/check_movucr.s (100%)
 rename tests/{ => tcg}/cris/check_movum.s (100%)
 rename tests/{ => tcg}/cris/check_movur.s (100%)
 rename tests/{ => tcg}/cris/check_mulv32.s (100%)
 rename tests/{ => tcg}/cris/check_mulx.s (100%)
 rename tests/{ => tcg}/cris/check_neg.s (100%)
 rename tests/{ => tcg}/cris/check_not.s (100%)
 rename tests/{ => tcg}/cris/check_openpf1.c (100%)
 rename tests/{ => tcg}/cris/check_openpf2.c (100%)
 rename tests/{ => tcg}/cris/check_openpf3.c (100%)
 rename tests/{ => tcg}/cris/check_openpf4.c (100%)
 rename tests/{ => tcg}/cris/check_openpf5.c (100%)
 rename tests/{ => tcg}/cris/check_orc.s (100%)
 rename tests/{ => tcg}/cris/check_orm.s (100%)
 rename tests/{ => tcg}/cris/check_orq.s (100%)
 rename tests/{ => tcg}/cris/check_orr.s (100%)
 rename tests/{ => tcg}/cris/check_ret.s (100%)
 rename tests/{ => tcg}/cris/check_scc.s (100%)
 rename tests/{ => tcg}/cris/check_settls1.c (100%)
 rename tests/{ => tcg}/cris/check_sigalrm.c (100%)
 rename tests/{ => tcg}/cris/check_stat1.c (100%)
 rename tests/{ => tcg}/cris/check_stat2.c (100%)
 rename tests/{ => tcg}/cris/check_stat3.c (100%)
 rename tests/{ => tcg}/cris/check_stat4.c (100%)
 rename tests/{ => tcg}/cris/check_subc.s (100%)
 rename tests/{ => tcg}/cris/check_subm.s (100%)
 rename tests/{ => tcg}/cris/check_subq.s (100%)
 rename tests/{ => tcg}/cris/check_subr.s (100%)
 rename tests/{ => tcg}/cris/check_swap.c (100%)
 rename tests/{ => tcg}/cris/check_time1.c (100%)
 rename tests/{ => tcg}/cris/check_time2.c (100%)
 rename tests/{ => tcg}/cris/check_xarith.s (100%)
 rename tests/{ => tcg}/cris/crisutils.h (100%)
 rename tests/{ => tcg}/cris/crt.s (100%)
 rename tests/{ => tcg}/cris/sys.c (100%)
 rename tests/{ => tcg}/cris/sys.h (100%)
 rename tests/{ => tcg}/cris/testutils.inc (100%)
 rename tests/{ => tcg}/hello-arm.c (100%)
 rename tests/{ => tcg}/hello-i386.c (100%)
 rename tests/{ => tcg}/hello-mips.c (100%)
 rename tests/{ => tcg}/linux-test.c (100%)
 rename tests/{ => tcg}/lm32/Makefile (100%)
 rename tests/{ => tcg}/lm32/crt.S (100%)
 rename tests/{ => tcg}/lm32/linker.ld (100%)
 rename tests/{ => tcg}/lm32/macros.inc (100%)
 rename tests/{ => tcg}/lm32/test_add.S (100%)
 rename tests/{ => tcg}/lm32/test_addi.S (100%)
 rename tests/{ => tcg}/lm32/test_and.S (100%)
 rename tests/{ => tcg}/lm32/test_andhi.S (100%)
 rename tests/{ => tcg}/lm32/test_andi.S (100%)
 rename tests/{ => tcg}/lm32/test_b.S (100%)
 rename tests/{ => tcg}/lm32/test_be.S (100%)
 rename tests/{ => tcg}/lm32/test_bg.S (100%)
 rename tests/{ => tcg}/lm32/test_bge.S (100%)
 rename tests/{ => tcg}/lm32/test_bgeu.S (100%)
 rename tests/{ => tcg}/lm32/test_bgu.S (100%)
 rename tests/{ => tcg}/lm32/test_bi.S (100%)
 rename tests/{ => tcg}/lm32/test_bne.S (100%)
 rename tests/{ => tcg}/lm32/test_break.S (100%)
 rename tests/{ => tcg}/lm32/test_bret.S (100%)
 rename tests/{ => tcg}/lm32/test_call.S (100%)
 rename tests/{ => tcg}/lm32/test_calli.S (100%)
 rename tests/{ => tcg}/lm32/test_cmpe.S (100%)
 rename tests/{ => tcg}/lm32/test_cmpei.S (100%)
 rename tests/{ => tcg}/lm32/test_cmpg.S (100%)
 rename tests/{ => tcg}/lm32/test_cmpge.S (100%)
 rename tests/{ => tcg}/lm32/test_cmpgei.S (100%)
 rename tests/{ => tcg}/lm32/test_cmpgeu.S (100%)
 rename tests/{ => tcg}/lm32/test_cmpgeui.S (100%)
 rename tests/{ => tcg}/lm32/test_cmpgi.S (100%)
 rename tests/{ => tcg}/lm32/test_cmpgu.S (100%)
 rename tests/{ => tcg}/lm32/test_cmpgui.S (100%)
 rename tests/{ => tcg}/lm32/test_cmpne.S (100%)
 rename tests/{ => tcg}/lm32/test_cmpnei.S (100%)
 rename tests/{ => tcg}/lm32/test_divu.S (100%)
 rename tests/{ => tcg}/lm32/test_eret.S (100%)
 rename tests/{ => tcg}/lm32/test_lb.S (100%)
 rename tests/{ => tcg}/lm32/test_lbu.S (100%)
 rename tests/{ => tcg}/lm32/test_lh.S (100%)
 rename tests/{ => tcg}/lm32/test_lhu.S (100%)
 rename tests/{ => tcg}/lm32/test_lw.S (100%)
 rename tests/{ => tcg}/lm32/test_modu.S (100%)
 rename tests/{ => tcg}/lm32/test_mul.S (100%)
 rename tests/{ => tcg}/lm32/test_muli.S (100%)
 rename tests/{ => tcg}/lm32/test_nor.S (100%)
 rename tests/{ => tcg}/lm32/test_nori.S (100%)
 rename tests/{ => tcg}/lm32/test_or.S (100%)
 rename tests/{ => tcg}/lm32/test_orhi.S (100%)
 rename tests/{ => tcg}/lm32/test_ori.S (100%)
 rename tests/{ => tcg}/lm32/test_ret.S (100%)
 rename tests/{ => tcg}/lm32/test_sb.S (100%)
 rename tests/{ => tcg}/lm32/test_scall.S (100%)
 rename tests/{ => tcg}/lm32/test_sextb.S (100%)
 rename tests/{ => tcg}/lm32/test_sexth.S (100%)
 rename tests/{ => tcg}/lm32/test_sh.S (100%)
 rename tests/{ => tcg}/lm32/test_sl.S (100%)
 rename tests/{ => tcg}/lm32/test_sli.S (100%)
 rename tests/{ => tcg}/lm32/test_sr.S (100%)
 rename tests/{ => tcg}/lm32/test_sri.S (100%)
 rename tests/{ => tcg}/lm32/test_sru.S (100%)
 rename tests/{ => tcg}/lm32/test_srui.S (100%)
 rename tests/{ => tcg}/lm32/test_sub.S (100%)
 rename tests/{ => tcg}/lm32/test_sw.S (100%)
 rename tests/{ => tcg}/lm32/test_xnor.S (100%)
 rename tests/{ => tcg}/lm32/test_xnori.S (100%)
 rename tests/{ => tcg}/lm32/test_xor.S (100%)
 rename tests/{ => tcg}/lm32/test_xori.S (100%)
 rename tests/{ => tcg}/pi_10.com (100%)
 rename tests/{ => tcg}/runcom.c (100%)
 rename tests/{ => tcg}/sha1.c (100%)
 rename tests/{ => tcg}/test-arm-iwmmxt.s (100%)
 rename tests/{ => tcg}/test-i386-code16.S (100%)
 rename tests/{ => tcg}/test-i386-muldiv.h (100%)
 rename tests/{ => tcg}/test-i386-shift.h (100%)
 rename tests/{ => tcg}/test-i386-ssse3.c (100%)
 rename tests/{ => tcg}/test-i386-vm86.S (100%)
 rename tests/{ => tcg}/test-i386.c (100%)
 rename tests/{ => tcg}/test-i386.h (100%)
 rename tests/{ => tcg}/test-mmap.c (100%)
 rename tests/{ => tcg}/test_path.c (100%)
 rename tests/{ => tcg}/testthread.c (100%)
 rename tests/{ => tcg}/xtensa/Makefile (100%)
 rename tests/{ => tcg}/xtensa/crt.S (100%)
 rename tests/{ => tcg}/xtensa/linker.ld (100%)
 rename tests/{ => tcg}/xtensa/macros.inc (100%)
 rename tests/{ => tcg}/xtensa/test_b.S (100%)
 rename tests/{ => tcg}/xtensa/test_bi.S (100%)
 rename tests/{ => tcg}/xtensa/test_boolean.S (100%)
 rename tests/{ => tcg}/xtensa/test_bz.S (100%)
 rename tests/{ => tcg}/xtensa/test_clamps.S (100%)
 rename tests/{ => tcg}/xtensa/test_fail.S (100%)
 rename tests/{ => tcg}/xtensa/test_interrupt.S (100%)
 rename tests/{ => tcg}/xtensa/test_loop.S (100%)
 rename tests/{ => tcg}/xtensa/test_mac16.S (100%)
 rename tests/{ => tcg}/xtensa/test_max.S (100%)
 rename tests/{ => tcg}/xtensa/test_min.S (100%)
 rename tests/{ => tcg}/xtensa/test_mmu.S (100%)
 rename tests/{ => tcg}/xtensa/test_mul16.S (100%)
 rename tests/{ => tcg}/xtensa/test_mul32.S (100%)
 rename tests/{ => tcg}/xtensa/test_nsa.S (100%)
 rename tests/{ => tcg}/xtensa/test_pipeline.S (100%)
 rename tests/{ => tcg}/xtensa/test_quo.S (100%)
 rename tests/{ => tcg}/xtensa/test_rem.S (100%)
 rename tests/{ => tcg}/xtensa/test_rst0.S (100%)
 rename tests/{ => tcg}/xtensa/test_sar.S (100%)
 rename tests/{ => tcg}/xtensa/test_sext.S (100%)
 rename tests/{ => tcg}/xtensa/test_shift.S (100%)
 rename tests/{ => tcg}/xtensa/test_timer.S (100%)
 rename tests/{ => tcg}/xtensa/test_windowed.S (100%)
 rename tests/{ => tcg}/xtensa/vectors.S (100%)

diff --git a/Makefile b/Makefile
index 9ce8768..0cbe7c2 100644
--- a/Makefile
+++ b/Makefile
@@ -241,7 +241,7 @@ clean:
 	rm -f trace-dtrace.h trace-dtrace.h-timestamp
 	rm -f $(GENERATED_SOURCES)
 	rm -rf $(qapi-dir)
-	$(MAKE) -C tests clean
+	$(MAKE) -C tests/tcg clean
 	for d in $(ALL_SUBDIRS) $(QEMULIBS) libcacard; do \
 	if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \
 	rm -f $$d/qemu-options.def; \
@@ -319,7 +319,7 @@ endif
 
 # various test targets
 test speed: all
-	$(MAKE) -C tests $@
+	$(MAKE) -C tests/tcg $@
 
 .PHONY: check
 check: $(patsubst %,run-check-%,$(CHECKS))
diff --git a/configure b/configure
index 0309dad..79790b3 100755
--- a/configure
+++ b/configure
@@ -3809,14 +3809,14 @@ echo "QEMU_INCLUDES+=$includes" >> $config_target_mak
 done # for target in $targets
 
 # build tree in object directory in case the source is not in the current directory
-DIRS="tests tests/cris slirp audio block net pc-bios/optionrom"
+DIRS="tests tests/tcg tests/tcg/cris slirp audio block net pc-bios/optionrom"
 DIRS="$DIRS pc-bios/spapr-rtas"
 DIRS="$DIRS roms/seabios roms/vgabios"
 DIRS="$DIRS fsdev ui"
 DIRS="$DIRS qapi qapi-generated"
 DIRS="$DIRS qga trace"
-FILES="Makefile tests/Makefile qdict-test-data.txt"
-FILES="$FILES tests/cris/Makefile tests/cris/.gdbinit"
+FILES="Makefile tests/tcg/Makefile qdict-test-data.txt"
+FILES="$FILES tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit"
 FILES="$FILES pc-bios/optionrom/Makefile pc-bios/keymaps"
 FILES="$FILES pc-bios/spapr-rtas/Makefile"
 FILES="$FILES roms/seabios/Makefile roms/vgabios/Makefile"
diff --git a/tests/Makefile b/tests/tcg/Makefile
similarity index 100%
rename from tests/Makefile
rename to tests/tcg/Makefile
diff --git a/tests/alpha/Makefile b/tests/tcg/alpha/Makefile
similarity index 100%
rename from tests/alpha/Makefile
rename to tests/tcg/alpha/Makefile
diff --git a/tests/alpha/crt.s b/tests/tcg/alpha/crt.s
similarity index 100%
rename from tests/alpha/crt.s
rename to tests/tcg/alpha/crt.s
diff --git a/tests/alpha/hello-alpha.c b/tests/tcg/alpha/hello-alpha.c
similarity index 100%
rename from tests/alpha/hello-alpha.c
rename to tests/tcg/alpha/hello-alpha.c
diff --git a/tests/alpha/test-cond.c b/tests/tcg/alpha/test-cond.c
similarity index 100%
rename from tests/alpha/test-cond.c
rename to tests/tcg/alpha/test-cond.c
diff --git a/tests/alpha/test-ovf.c b/tests/tcg/alpha/test-ovf.c
similarity index 100%
rename from tests/alpha/test-ovf.c
rename to tests/tcg/alpha/test-ovf.c
diff --git a/tests/cris/.gdbinit b/tests/tcg/cris/.gdbinit
similarity index 100%
rename from tests/cris/.gdbinit
rename to tests/tcg/cris/.gdbinit
diff --git a/tests/cris/Makefile b/tests/tcg/cris/Makefile
similarity index 100%
rename from tests/cris/Makefile
rename to tests/tcg/cris/Makefile
diff --git a/tests/cris/README b/tests/tcg/cris/README
similarity index 100%
rename from tests/cris/README
rename to tests/tcg/cris/README
diff --git a/tests/cris/check_abs.c b/tests/tcg/cris/check_abs.c
similarity index 100%
rename from tests/cris/check_abs.c
rename to tests/tcg/cris/check_abs.c
diff --git a/tests/cris/check_addc.c b/tests/tcg/cris/check_addc.c
similarity index 100%
rename from tests/cris/check_addc.c
rename to tests/tcg/cris/check_addc.c
diff --git a/tests/cris/check_addcm.c b/tests/tcg/cris/check_addcm.c
similarity index 100%
rename from tests/cris/check_addcm.c
rename to tests/tcg/cris/check_addcm.c
diff --git a/tests/cris/check_addi.s b/tests/tcg/cris/check_addi.s
similarity index 100%
rename from tests/cris/check_addi.s
rename to tests/tcg/cris/check_addi.s
diff --git a/tests/cris/check_addiv32.s b/tests/tcg/cris/check_addiv32.s
similarity index 100%
rename from tests/cris/check_addiv32.s
rename to tests/tcg/cris/check_addiv32.s
diff --git a/tests/cris/check_addm.s b/tests/tcg/cris/check_addm.s
similarity index 100%
rename from tests/cris/check_addm.s
rename to tests/tcg/cris/check_addm.s
diff --git a/tests/cris/check_addo.c b/tests/tcg/cris/check_addo.c
similarity index 100%
rename from tests/cris/check_addo.c
rename to tests/tcg/cris/check_addo.c
diff --git a/tests/cris/check_addoq.c b/tests/tcg/cris/check_addoq.c
similarity index 100%
rename from tests/cris/check_addoq.c
rename to tests/tcg/cris/check_addoq.c
diff --git a/tests/cris/check_addq.s b/tests/tcg/cris/check_addq.s
similarity index 100%
rename from tests/cris/check_addq.s
rename to tests/tcg/cris/check_addq.s
diff --git a/tests/cris/check_addr.s b/tests/tcg/cris/check_addr.s
similarity index 100%
rename from tests/cris/check_addr.s
rename to tests/tcg/cris/check_addr.s
diff --git a/tests/cris/check_addxc.s b/tests/tcg/cris/check_addxc.s
similarity index 100%
rename from tests/cris/check_addxc.s
rename to tests/tcg/cris/check_addxc.s
diff --git a/tests/cris/check_addxm.s b/tests/tcg/cris/check_addxm.s
similarity index 100%
rename from tests/cris/check_addxm.s
rename to tests/tcg/cris/check_addxm.s
diff --git a/tests/cris/check_addxr.s b/tests/tcg/cris/check_addxr.s
similarity index 100%
rename from tests/cris/check_addxr.s
rename to tests/tcg/cris/check_addxr.s
diff --git a/tests/cris/check_andc.s b/tests/tcg/cris/check_andc.s
similarity index 100%
rename from tests/cris/check_andc.s
rename to tests/tcg/cris/check_andc.s
diff --git a/tests/cris/check_andm.s b/tests/tcg/cris/check_andm.s
similarity index 100%
rename from tests/cris/check_andm.s
rename to tests/tcg/cris/check_andm.s
diff --git a/tests/cris/check_andq.s b/tests/tcg/cris/check_andq.s
similarity index 100%
rename from tests/cris/check_andq.s
rename to tests/tcg/cris/check_andq.s
diff --git a/tests/cris/check_andr.s b/tests/tcg/cris/check_andr.s
similarity index 100%
rename from tests/cris/check_andr.s
rename to tests/tcg/cris/check_andr.s
diff --git a/tests/cris/check_asr.s b/tests/tcg/cris/check_asr.s
similarity index 100%
rename from tests/cris/check_asr.s
rename to tests/tcg/cris/check_asr.s
diff --git a/tests/cris/check_ba.s b/tests/tcg/cris/check_ba.s
similarity index 100%
rename from tests/cris/check_ba.s
rename to tests/tcg/cris/check_ba.s
diff --git a/tests/cris/check_bas.s b/tests/tcg/cris/check_bas.s
similarity index 100%
rename from tests/cris/check_bas.s
rename to tests/tcg/cris/check_bas.s
diff --git a/tests/cris/check_bcc.s b/tests/tcg/cris/check_bcc.s
similarity index 100%
rename from tests/cris/check_bcc.s
rename to tests/tcg/cris/check_bcc.s
diff --git a/tests/cris/check_bound.c b/tests/tcg/cris/check_bound.c
similarity index 100%
rename from tests/cris/check_bound.c
rename to tests/tcg/cris/check_bound.c
diff --git a/tests/cris/check_boundc.s b/tests/tcg/cris/check_boundc.s
similarity index 100%
rename from tests/cris/check_boundc.s
rename to tests/tcg/cris/check_boundc.s
diff --git a/tests/cris/check_boundr.s b/tests/tcg/cris/check_boundr.s
similarity index 100%
rename from tests/cris/check_boundr.s
rename to tests/tcg/cris/check_boundr.s
diff --git a/tests/cris/check_btst.s b/tests/tcg/cris/check_btst.s
similarity index 100%
rename from tests/cris/check_btst.s
rename to tests/tcg/cris/check_btst.s
diff --git a/tests/cris/check_clearfv32.s b/tests/tcg/cris/check_clearfv32.s
similarity index 100%
rename from tests/cris/check_clearfv32.s
rename to tests/tcg/cris/check_clearfv32.s
diff --git a/tests/cris/check_clrjmp1.s b/tests/tcg/cris/check_clrjmp1.s
similarity index 100%
rename from tests/cris/check_clrjmp1.s
rename to tests/tcg/cris/check_clrjmp1.s
diff --git a/tests/cris/check_cmp-2.s b/tests/tcg/cris/check_cmp-2.s
similarity index 100%
rename from tests/cris/check_cmp-2.s
rename to tests/tcg/cris/check_cmp-2.s
diff --git a/tests/cris/check_cmpc.s b/tests/tcg/cris/check_cmpc.s
similarity index 100%
rename from tests/cris/check_cmpc.s
rename to tests/tcg/cris/check_cmpc.s
diff --git a/tests/cris/check_cmpm.s b/tests/tcg/cris/check_cmpm.s
similarity index 100%
rename from tests/cris/check_cmpm.s
rename to tests/tcg/cris/check_cmpm.s
diff --git a/tests/cris/check_cmpq.s b/tests/tcg/cris/check_cmpq.s
similarity index 100%
rename from tests/cris/check_cmpq.s
rename to tests/tcg/cris/check_cmpq.s
diff --git a/tests/cris/check_cmpr.s b/tests/tcg/cris/check_cmpr.s
similarity index 100%
rename from tests/cris/check_cmpr.s
rename to tests/tcg/cris/check_cmpr.s
diff --git a/tests/cris/check_cmpxc.s b/tests/tcg/cris/check_cmpxc.s
similarity index 100%
rename from tests/cris/check_cmpxc.s
rename to tests/tcg/cris/check_cmpxc.s
diff --git a/tests/cris/check_cmpxm.s b/tests/tcg/cris/check_cmpxm.s
similarity index 100%
rename from tests/cris/check_cmpxm.s
rename to tests/tcg/cris/check_cmpxm.s
diff --git a/tests/cris/check_dstep.s b/tests/tcg/cris/check_dstep.s
similarity index 100%
rename from tests/cris/check_dstep.s
rename to tests/tcg/cris/check_dstep.s
diff --git a/tests/cris/check_ftag.c b/tests/tcg/cris/check_ftag.c
similarity index 100%
rename from tests/cris/check_ftag.c
rename to tests/tcg/cris/check_ftag.c
diff --git a/tests/cris/check_gcctorture_pr28634-1.c b/tests/tcg/cris/check_gcctorture_pr28634-1.c
similarity index 100%
rename from tests/cris/check_gcctorture_pr28634-1.c
rename to tests/tcg/cris/check_gcctorture_pr28634-1.c
diff --git a/tests/cris/check_gcctorture_pr28634.c b/tests/tcg/cris/check_gcctorture_pr28634.c
similarity index 100%
rename from tests/cris/check_gcctorture_pr28634.c
rename to tests/tcg/cris/check_gcctorture_pr28634.c
diff --git a/tests/cris/check_glibc_kernelversion.c b/tests/tcg/cris/check_glibc_kernelversion.c
similarity index 100%
rename from tests/cris/check_glibc_kernelversion.c
rename to tests/tcg/cris/check_glibc_kernelversion.c
diff --git a/tests/cris/check_hello.c b/tests/tcg/cris/check_hello.c
similarity index 100%
rename from tests/cris/check_hello.c
rename to tests/tcg/cris/check_hello.c
diff --git a/tests/cris/check_int64.c b/tests/tcg/cris/check_int64.c
similarity index 100%
rename from tests/cris/check_int64.c
rename to tests/tcg/cris/check_int64.c
diff --git a/tests/cris/check_jsr.s b/tests/tcg/cris/check_jsr.s
similarity index 100%
rename from tests/cris/check_jsr.s
rename to tests/tcg/cris/check_jsr.s
diff --git a/tests/cris/check_lapc.s b/tests/tcg/cris/check_lapc.s
similarity index 100%
rename from tests/cris/check_lapc.s
rename to tests/tcg/cris/check_lapc.s
diff --git a/tests/cris/check_lsl.s b/tests/tcg/cris/check_lsl.s
similarity index 100%
rename from tests/cris/check_lsl.s
rename to tests/tcg/cris/check_lsl.s
diff --git a/tests/cris/check_lsr.s b/tests/tcg/cris/check_lsr.s
similarity index 100%
rename from tests/cris/check_lsr.s
rename to tests/tcg/cris/check_lsr.s
diff --git a/tests/cris/check_lz.c b/tests/tcg/cris/check_lz.c
similarity index 100%
rename from tests/cris/check_lz.c
rename to tests/tcg/cris/check_lz.c
diff --git a/tests/cris/check_mapbrk.c b/tests/tcg/cris/check_mapbrk.c
similarity index 100%
rename from tests/cris/check_mapbrk.c
rename to tests/tcg/cris/check_mapbrk.c
diff --git a/tests/cris/check_mcp.s b/tests/tcg/cris/check_mcp.s
similarity index 100%
rename from tests/cris/check_mcp.s
rename to tests/tcg/cris/check_mcp.s
diff --git a/tests/cris/check_mmap1.c b/tests/tcg/cris/check_mmap1.c
similarity index 100%
rename from tests/cris/check_mmap1.c
rename to tests/tcg/cris/check_mmap1.c
diff --git a/tests/cris/check_mmap2.c b/tests/tcg/cris/check_mmap2.c
similarity index 100%
rename from tests/cris/check_mmap2.c
rename to tests/tcg/cris/check_mmap2.c
diff --git a/tests/cris/check_mmap3.c b/tests/tcg/cris/check_mmap3.c
similarity index 100%
rename from tests/cris/check_mmap3.c
rename to tests/tcg/cris/check_mmap3.c
diff --git a/tests/cris/check_movdelsr1.s b/tests/tcg/cris/check_movdelsr1.s
similarity index 100%
rename from tests/cris/check_movdelsr1.s
rename to tests/tcg/cris/check_movdelsr1.s
diff --git a/tests/cris/check_movecr.s b/tests/tcg/cris/check_movecr.s
similarity index 100%
rename from tests/cris/check_movecr.s
rename to tests/tcg/cris/check_movecr.s
diff --git a/tests/cris/check_movei.s b/tests/tcg/cris/check_movei.s
similarity index 100%
rename from tests/cris/check_movei.s
rename to tests/tcg/cris/check_movei.s
diff --git a/tests/cris/check_movemr.s b/tests/tcg/cris/check_movemr.s
similarity index 100%
rename from tests/cris/check_movemr.s
rename to tests/tcg/cris/check_movemr.s
diff --git a/tests/cris/check_movemrv32.s b/tests/tcg/cris/check_movemrv32.s
similarity index 100%
rename from tests/cris/check_movemrv32.s
rename to tests/tcg/cris/check_movemrv32.s
diff --git a/tests/cris/check_moveq.c b/tests/tcg/cris/check_moveq.c
similarity index 100%
rename from tests/cris/check_moveq.c
rename to tests/tcg/cris/check_moveq.c
diff --git a/tests/cris/check_mover.s b/tests/tcg/cris/check_mover.s
similarity index 100%
rename from tests/cris/check_mover.s
rename to tests/tcg/cris/check_mover.s
diff --git a/tests/cris/check_moverm.s b/tests/tcg/cris/check_moverm.s
similarity index 100%
rename from tests/cris/check_moverm.s
rename to tests/tcg/cris/check_moverm.s
diff --git a/tests/cris/check_movmp.s b/tests/tcg/cris/check_movmp.s
similarity index 100%
rename from tests/cris/check_movmp.s
rename to tests/tcg/cris/check_movmp.s
diff --git a/tests/cris/check_movpmv32.s b/tests/tcg/cris/check_movpmv32.s
similarity index 100%
rename from tests/cris/check_movpmv32.s
rename to tests/tcg/cris/check_movpmv32.s
diff --git a/tests/cris/check_movpr.s b/tests/tcg/cris/check_movpr.s
similarity index 100%
rename from tests/cris/check_movpr.s
rename to tests/tcg/cris/check_movpr.s
diff --git a/tests/cris/check_movprv32.s b/tests/tcg/cris/check_movprv32.s
similarity index 100%
rename from tests/cris/check_movprv32.s
rename to tests/tcg/cris/check_movprv32.s
diff --git a/tests/cris/check_movscr.s b/tests/tcg/cris/check_movscr.s
similarity index 100%
rename from tests/cris/check_movscr.s
rename to tests/tcg/cris/check_movscr.s
diff --git a/tests/cris/check_movsm.s b/tests/tcg/cris/check_movsm.s
similarity index 100%
rename from tests/cris/check_movsm.s
rename to tests/tcg/cris/check_movsm.s
diff --git a/tests/cris/check_movsr.s b/tests/tcg/cris/check_movsr.s
similarity index 100%
rename from tests/cris/check_movsr.s
rename to tests/tcg/cris/check_movsr.s
diff --git a/tests/cris/check_movucr.s b/tests/tcg/cris/check_movucr.s
similarity index 100%
rename from tests/cris/check_movucr.s
rename to tests/tcg/cris/check_movucr.s
diff --git a/tests/cris/check_movum.s b/tests/tcg/cris/check_movum.s
similarity index 100%
rename from tests/cris/check_movum.s
rename to tests/tcg/cris/check_movum.s
diff --git a/tests/cris/check_movur.s b/tests/tcg/cris/check_movur.s
similarity index 100%
rename from tests/cris/check_movur.s
rename to tests/tcg/cris/check_movur.s
diff --git a/tests/cris/check_mulv32.s b/tests/tcg/cris/check_mulv32.s
similarity index 100%
rename from tests/cris/check_mulv32.s
rename to tests/tcg/cris/check_mulv32.s
diff --git a/tests/cris/check_mulx.s b/tests/tcg/cris/check_mulx.s
similarity index 100%
rename from tests/cris/check_mulx.s
rename to tests/tcg/cris/check_mulx.s
diff --git a/tests/cris/check_neg.s b/tests/tcg/cris/check_neg.s
similarity index 100%
rename from tests/cris/check_neg.s
rename to tests/tcg/cris/check_neg.s
diff --git a/tests/cris/check_not.s b/tests/tcg/cris/check_not.s
similarity index 100%
rename from tests/cris/check_not.s
rename to tests/tcg/cris/check_not.s
diff --git a/tests/cris/check_openpf1.c b/tests/tcg/cris/check_openpf1.c
similarity index 100%
rename from tests/cris/check_openpf1.c
rename to tests/tcg/cris/check_openpf1.c
diff --git a/tests/cris/check_openpf2.c b/tests/tcg/cris/check_openpf2.c
similarity index 100%
rename from tests/cris/check_openpf2.c
rename to tests/tcg/cris/check_openpf2.c
diff --git a/tests/cris/check_openpf3.c b/tests/tcg/cris/check_openpf3.c
similarity index 100%
rename from tests/cris/check_openpf3.c
rename to tests/tcg/cris/check_openpf3.c
diff --git a/tests/cris/check_openpf4.c b/tests/tcg/cris/check_openpf4.c
similarity index 100%
rename from tests/cris/check_openpf4.c
rename to tests/tcg/cris/check_openpf4.c
diff --git a/tests/cris/check_openpf5.c b/tests/tcg/cris/check_openpf5.c
similarity index 100%
rename from tests/cris/check_openpf5.c
rename to tests/tcg/cris/check_openpf5.c
diff --git a/tests/cris/check_orc.s b/tests/tcg/cris/check_orc.s
similarity index 100%
rename from tests/cris/check_orc.s
rename to tests/tcg/cris/check_orc.s
diff --git a/tests/cris/check_orm.s b/tests/tcg/cris/check_orm.s
similarity index 100%
rename from tests/cris/check_orm.s
rename to tests/tcg/cris/check_orm.s
diff --git a/tests/cris/check_orq.s b/tests/tcg/cris/check_orq.s
similarity index 100%
rename from tests/cris/check_orq.s
rename to tests/tcg/cris/check_orq.s
diff --git a/tests/cris/check_orr.s b/tests/tcg/cris/check_orr.s
similarity index 100%
rename from tests/cris/check_orr.s
rename to tests/tcg/cris/check_orr.s
diff --git a/tests/cris/check_ret.s b/tests/tcg/cris/check_ret.s
similarity index 100%
rename from tests/cris/check_ret.s
rename to tests/tcg/cris/check_ret.s
diff --git a/tests/cris/check_scc.s b/tests/tcg/cris/check_scc.s
similarity index 100%
rename from tests/cris/check_scc.s
rename to tests/tcg/cris/check_scc.s
diff --git a/tests/cris/check_settls1.c b/tests/tcg/cris/check_settls1.c
similarity index 100%
rename from tests/cris/check_settls1.c
rename to tests/tcg/cris/check_settls1.c
diff --git a/tests/cris/check_sigalrm.c b/tests/tcg/cris/check_sigalrm.c
similarity index 100%
rename from tests/cris/check_sigalrm.c
rename to tests/tcg/cris/check_sigalrm.c
diff --git a/tests/cris/check_stat1.c b/tests/tcg/cris/check_stat1.c
similarity index 100%
rename from tests/cris/check_stat1.c
rename to tests/tcg/cris/check_stat1.c
diff --git a/tests/cris/check_stat2.c b/tests/tcg/cris/check_stat2.c
similarity index 100%
rename from tests/cris/check_stat2.c
rename to tests/tcg/cris/check_stat2.c
diff --git a/tests/cris/check_stat3.c b/tests/tcg/cris/check_stat3.c
similarity index 100%
rename from tests/cris/check_stat3.c
rename to tests/tcg/cris/check_stat3.c
diff --git a/tests/cris/check_stat4.c b/tests/tcg/cris/check_stat4.c
similarity index 100%
rename from tests/cris/check_stat4.c
rename to tests/tcg/cris/check_stat4.c
diff --git a/tests/cris/check_subc.s b/tests/tcg/cris/check_subc.s
similarity index 100%
rename from tests/cris/check_subc.s
rename to tests/tcg/cris/check_subc.s
diff --git a/tests/cris/check_subm.s b/tests/tcg/cris/check_subm.s
similarity index 100%
rename from tests/cris/check_subm.s
rename to tests/tcg/cris/check_subm.s
diff --git a/tests/cris/check_subq.s b/tests/tcg/cris/check_subq.s
similarity index 100%
rename from tests/cris/check_subq.s
rename to tests/tcg/cris/check_subq.s
diff --git a/tests/cris/check_subr.s b/tests/tcg/cris/check_subr.s
similarity index 100%
rename from tests/cris/check_subr.s
rename to tests/tcg/cris/check_subr.s
diff --git a/tests/cris/check_swap.c b/tests/tcg/cris/check_swap.c
similarity index 100%
rename from tests/cris/check_swap.c
rename to tests/tcg/cris/check_swap.c
diff --git a/tests/cris/check_time1.c b/tests/tcg/cris/check_time1.c
similarity index 100%
rename from tests/cris/check_time1.c
rename to tests/tcg/cris/check_time1.c
diff --git a/tests/cris/check_time2.c b/tests/tcg/cris/check_time2.c
similarity index 100%
rename from tests/cris/check_time2.c
rename to tests/tcg/cris/check_time2.c
diff --git a/tests/cris/check_xarith.s b/tests/tcg/cris/check_xarith.s
similarity index 100%
rename from tests/cris/check_xarith.s
rename to tests/tcg/cris/check_xarith.s
diff --git a/tests/cris/crisutils.h b/tests/tcg/cris/crisutils.h
similarity index 100%
rename from tests/cris/crisutils.h
rename to tests/tcg/cris/crisutils.h
diff --git a/tests/cris/crt.s b/tests/tcg/cris/crt.s
similarity index 100%
rename from tests/cris/crt.s
rename to tests/tcg/cris/crt.s
diff --git a/tests/cris/sys.c b/tests/tcg/cris/sys.c
similarity index 100%
rename from tests/cris/sys.c
rename to tests/tcg/cris/sys.c
diff --git a/tests/cris/sys.h b/tests/tcg/cris/sys.h
similarity index 100%
rename from tests/cris/sys.h
rename to tests/tcg/cris/sys.h
diff --git a/tests/cris/testutils.inc b/tests/tcg/cris/testutils.inc
similarity index 100%
rename from tests/cris/testutils.inc
rename to tests/tcg/cris/testutils.inc
diff --git a/tests/hello-arm.c b/tests/tcg/hello-arm.c
similarity index 100%
rename from tests/hello-arm.c
rename to tests/tcg/hello-arm.c
diff --git a/tests/hello-i386.c b/tests/tcg/hello-i386.c
similarity index 100%
rename from tests/hello-i386.c
rename to tests/tcg/hello-i386.c
diff --git a/tests/hello-mips.c b/tests/tcg/hello-mips.c
similarity index 100%
rename from tests/hello-mips.c
rename to tests/tcg/hello-mips.c
diff --git a/tests/linux-test.c b/tests/tcg/linux-test.c
similarity index 100%
rename from tests/linux-test.c
rename to tests/tcg/linux-test.c
diff --git a/tests/lm32/Makefile b/tests/tcg/lm32/Makefile
similarity index 100%
rename from tests/lm32/Makefile
rename to tests/tcg/lm32/Makefile
diff --git a/tests/lm32/crt.S b/tests/tcg/lm32/crt.S
similarity index 100%
rename from tests/lm32/crt.S
rename to tests/tcg/lm32/crt.S
diff --git a/tests/lm32/linker.ld b/tests/tcg/lm32/linker.ld
similarity index 100%
rename from tests/lm32/linker.ld
rename to tests/tcg/lm32/linker.ld
diff --git a/tests/lm32/macros.inc b/tests/tcg/lm32/macros.inc
similarity index 100%
rename from tests/lm32/macros.inc
rename to tests/tcg/lm32/macros.inc
diff --git a/tests/lm32/test_add.S b/tests/tcg/lm32/test_add.S
similarity index 100%
rename from tests/lm32/test_add.S
rename to tests/tcg/lm32/test_add.S
diff --git a/tests/lm32/test_addi.S b/tests/tcg/lm32/test_addi.S
similarity index 100%
rename from tests/lm32/test_addi.S
rename to tests/tcg/lm32/test_addi.S
diff --git a/tests/lm32/test_and.S b/tests/tcg/lm32/test_and.S
similarity index 100%
rename from tests/lm32/test_and.S
rename to tests/tcg/lm32/test_and.S
diff --git a/tests/lm32/test_andhi.S b/tests/tcg/lm32/test_andhi.S
similarity index 100%
rename from tests/lm32/test_andhi.S
rename to tests/tcg/lm32/test_andhi.S
diff --git a/tests/lm32/test_andi.S b/tests/tcg/lm32/test_andi.S
similarity index 100%
rename from tests/lm32/test_andi.S
rename to tests/tcg/lm32/test_andi.S
diff --git a/tests/lm32/test_b.S b/tests/tcg/lm32/test_b.S
similarity index 100%
rename from tests/lm32/test_b.S
rename to tests/tcg/lm32/test_b.S
diff --git a/tests/lm32/test_be.S b/tests/tcg/lm32/test_be.S
similarity index 100%
rename from tests/lm32/test_be.S
rename to tests/tcg/lm32/test_be.S
diff --git a/tests/lm32/test_bg.S b/tests/tcg/lm32/test_bg.S
similarity index 100%
rename from tests/lm32/test_bg.S
rename to tests/tcg/lm32/test_bg.S
diff --git a/tests/lm32/test_bge.S b/tests/tcg/lm32/test_bge.S
similarity index 100%
rename from tests/lm32/test_bge.S
rename to tests/tcg/lm32/test_bge.S
diff --git a/tests/lm32/test_bgeu.S b/tests/tcg/lm32/test_bgeu.S
similarity index 100%
rename from tests/lm32/test_bgeu.S
rename to tests/tcg/lm32/test_bgeu.S
diff --git a/tests/lm32/test_bgu.S b/tests/tcg/lm32/test_bgu.S
similarity index 100%
rename from tests/lm32/test_bgu.S
rename to tests/tcg/lm32/test_bgu.S
diff --git a/tests/lm32/test_bi.S b/tests/tcg/lm32/test_bi.S
similarity index 100%
rename from tests/lm32/test_bi.S
rename to tests/tcg/lm32/test_bi.S
diff --git a/tests/lm32/test_bne.S b/tests/tcg/lm32/test_bne.S
similarity index 100%
rename from tests/lm32/test_bne.S
rename to tests/tcg/lm32/test_bne.S
diff --git a/tests/lm32/test_break.S b/tests/tcg/lm32/test_break.S
similarity index 100%
rename from tests/lm32/test_break.S
rename to tests/tcg/lm32/test_break.S
diff --git a/tests/lm32/test_bret.S b/tests/tcg/lm32/test_bret.S
similarity index 100%
rename from tests/lm32/test_bret.S
rename to tests/tcg/lm32/test_bret.S
diff --git a/tests/lm32/test_call.S b/tests/tcg/lm32/test_call.S
similarity index 100%
rename from tests/lm32/test_call.S
rename to tests/tcg/lm32/test_call.S
diff --git a/tests/lm32/test_calli.S b/tests/tcg/lm32/test_calli.S
similarity index 100%
rename from tests/lm32/test_calli.S
rename to tests/tcg/lm32/test_calli.S
diff --git a/tests/lm32/test_cmpe.S b/tests/tcg/lm32/test_cmpe.S
similarity index 100%
rename from tests/lm32/test_cmpe.S
rename to tests/tcg/lm32/test_cmpe.S
diff --git a/tests/lm32/test_cmpei.S b/tests/tcg/lm32/test_cmpei.S
similarity index 100%
rename from tests/lm32/test_cmpei.S
rename to tests/tcg/lm32/test_cmpei.S
diff --git a/tests/lm32/test_cmpg.S b/tests/tcg/lm32/test_cmpg.S
similarity index 100%
rename from tests/lm32/test_cmpg.S
rename to tests/tcg/lm32/test_cmpg.S
diff --git a/tests/lm32/test_cmpge.S b/tests/tcg/lm32/test_cmpge.S
similarity index 100%
rename from tests/lm32/test_cmpge.S
rename to tests/tcg/lm32/test_cmpge.S
diff --git a/tests/lm32/test_cmpgei.S b/tests/tcg/lm32/test_cmpgei.S
similarity index 100%
rename from tests/lm32/test_cmpgei.S
rename to tests/tcg/lm32/test_cmpgei.S
diff --git a/tests/lm32/test_cmpgeu.S b/tests/tcg/lm32/test_cmpgeu.S
similarity index 100%
rename from tests/lm32/test_cmpgeu.S
rename to tests/tcg/lm32/test_cmpgeu.S
diff --git a/tests/lm32/test_cmpgeui.S b/tests/tcg/lm32/test_cmpgeui.S
similarity index 100%
rename from tests/lm32/test_cmpgeui.S
rename to tests/tcg/lm32/test_cmpgeui.S
diff --git a/tests/lm32/test_cmpgi.S b/tests/tcg/lm32/test_cmpgi.S
similarity index 100%
rename from tests/lm32/test_cmpgi.S
rename to tests/tcg/lm32/test_cmpgi.S
diff --git a/tests/lm32/test_cmpgu.S b/tests/tcg/lm32/test_cmpgu.S
similarity index 100%
rename from tests/lm32/test_cmpgu.S
rename to tests/tcg/lm32/test_cmpgu.S
diff --git a/tests/lm32/test_cmpgui.S b/tests/tcg/lm32/test_cmpgui.S
similarity index 100%
rename from tests/lm32/test_cmpgui.S
rename to tests/tcg/lm32/test_cmpgui.S
diff --git a/tests/lm32/test_cmpne.S b/tests/tcg/lm32/test_cmpne.S
similarity index 100%
rename from tests/lm32/test_cmpne.S
rename to tests/tcg/lm32/test_cmpne.S
diff --git a/tests/lm32/test_cmpnei.S b/tests/tcg/lm32/test_cmpnei.S
similarity index 100%
rename from tests/lm32/test_cmpnei.S
rename to tests/tcg/lm32/test_cmpnei.S
diff --git a/tests/lm32/test_divu.S b/tests/tcg/lm32/test_divu.S
similarity index 100%
rename from tests/lm32/test_divu.S
rename to tests/tcg/lm32/test_divu.S
diff --git a/tests/lm32/test_eret.S b/tests/tcg/lm32/test_eret.S
similarity index 100%
rename from tests/lm32/test_eret.S
rename to tests/tcg/lm32/test_eret.S
diff --git a/tests/lm32/test_lb.S b/tests/tcg/lm32/test_lb.S
similarity index 100%
rename from tests/lm32/test_lb.S
rename to tests/tcg/lm32/test_lb.S
diff --git a/tests/lm32/test_lbu.S b/tests/tcg/lm32/test_lbu.S
similarity index 100%
rename from tests/lm32/test_lbu.S
rename to tests/tcg/lm32/test_lbu.S
diff --git a/tests/lm32/test_lh.S b/tests/tcg/lm32/test_lh.S
similarity index 100%
rename from tests/lm32/test_lh.S
rename to tests/tcg/lm32/test_lh.S
diff --git a/tests/lm32/test_lhu.S b/tests/tcg/lm32/test_lhu.S
similarity index 100%
rename from tests/lm32/test_lhu.S
rename to tests/tcg/lm32/test_lhu.S
diff --git a/tests/lm32/test_lw.S b/tests/tcg/lm32/test_lw.S
similarity index 100%
rename from tests/lm32/test_lw.S
rename to tests/tcg/lm32/test_lw.S
diff --git a/tests/lm32/test_modu.S b/tests/tcg/lm32/test_modu.S
similarity index 100%
rename from tests/lm32/test_modu.S
rename to tests/tcg/lm32/test_modu.S
diff --git a/tests/lm32/test_mul.S b/tests/tcg/lm32/test_mul.S
similarity index 100%
rename from tests/lm32/test_mul.S
rename to tests/tcg/lm32/test_mul.S
diff --git a/tests/lm32/test_muli.S b/tests/tcg/lm32/test_muli.S
similarity index 100%
rename from tests/lm32/test_muli.S
rename to tests/tcg/lm32/test_muli.S
diff --git a/tests/lm32/test_nor.S b/tests/tcg/lm32/test_nor.S
similarity index 100%
rename from tests/lm32/test_nor.S
rename to tests/tcg/lm32/test_nor.S
diff --git a/tests/lm32/test_nori.S b/tests/tcg/lm32/test_nori.S
similarity index 100%
rename from tests/lm32/test_nori.S
rename to tests/tcg/lm32/test_nori.S
diff --git a/tests/lm32/test_or.S b/tests/tcg/lm32/test_or.S
similarity index 100%
rename from tests/lm32/test_or.S
rename to tests/tcg/lm32/test_or.S
diff --git a/tests/lm32/test_orhi.S b/tests/tcg/lm32/test_orhi.S
similarity index 100%
rename from tests/lm32/test_orhi.S
rename to tests/tcg/lm32/test_orhi.S
diff --git a/tests/lm32/test_ori.S b/tests/tcg/lm32/test_ori.S
similarity index 100%
rename from tests/lm32/test_ori.S
rename to tests/tcg/lm32/test_ori.S
diff --git a/tests/lm32/test_ret.S b/tests/tcg/lm32/test_ret.S
similarity index 100%
rename from tests/lm32/test_ret.S
rename to tests/tcg/lm32/test_ret.S
diff --git a/tests/lm32/test_sb.S b/tests/tcg/lm32/test_sb.S
similarity index 100%
rename from tests/lm32/test_sb.S
rename to tests/tcg/lm32/test_sb.S
diff --git a/tests/lm32/test_scall.S b/tests/tcg/lm32/test_scall.S
similarity index 100%
rename from tests/lm32/test_scall.S
rename to tests/tcg/lm32/test_scall.S
diff --git a/tests/lm32/test_sextb.S b/tests/tcg/lm32/test_sextb.S
similarity index 100%
rename from tests/lm32/test_sextb.S
rename to tests/tcg/lm32/test_sextb.S
diff --git a/tests/lm32/test_sexth.S b/tests/tcg/lm32/test_sexth.S
similarity index 100%
rename from tests/lm32/test_sexth.S
rename to tests/tcg/lm32/test_sexth.S
diff --git a/tests/lm32/test_sh.S b/tests/tcg/lm32/test_sh.S
similarity index 100%
rename from tests/lm32/test_sh.S
rename to tests/tcg/lm32/test_sh.S
diff --git a/tests/lm32/test_sl.S b/tests/tcg/lm32/test_sl.S
similarity index 100%
rename from tests/lm32/test_sl.S
rename to tests/tcg/lm32/test_sl.S
diff --git a/tests/lm32/test_sli.S b/tests/tcg/lm32/test_sli.S
similarity index 100%
rename from tests/lm32/test_sli.S
rename to tests/tcg/lm32/test_sli.S
diff --git a/tests/lm32/test_sr.S b/tests/tcg/lm32/test_sr.S
similarity index 100%
rename from tests/lm32/test_sr.S
rename to tests/tcg/lm32/test_sr.S
diff --git a/tests/lm32/test_sri.S b/tests/tcg/lm32/test_sri.S
similarity index 100%
rename from tests/lm32/test_sri.S
rename to tests/tcg/lm32/test_sri.S
diff --git a/tests/lm32/test_sru.S b/tests/tcg/lm32/test_sru.S
similarity index 100%
rename from tests/lm32/test_sru.S
rename to tests/tcg/lm32/test_sru.S
diff --git a/tests/lm32/test_srui.S b/tests/tcg/lm32/test_srui.S
similarity index 100%
rename from tests/lm32/test_srui.S
rename to tests/tcg/lm32/test_srui.S
diff --git a/tests/lm32/test_sub.S b/tests/tcg/lm32/test_sub.S
similarity index 100%
rename from tests/lm32/test_sub.S
rename to tests/tcg/lm32/test_sub.S
diff --git a/tests/lm32/test_sw.S b/tests/tcg/lm32/test_sw.S
similarity index 100%
rename from tests/lm32/test_sw.S
rename to tests/tcg/lm32/test_sw.S
diff --git a/tests/lm32/test_xnor.S b/tests/tcg/lm32/test_xnor.S
similarity index 100%
rename from tests/lm32/test_xnor.S
rename to tests/tcg/lm32/test_xnor.S
diff --git a/tests/lm32/test_xnori.S b/tests/tcg/lm32/test_xnori.S
similarity index 100%
rename from tests/lm32/test_xnori.S
rename to tests/tcg/lm32/test_xnori.S
diff --git a/tests/lm32/test_xor.S b/tests/tcg/lm32/test_xor.S
similarity index 100%
rename from tests/lm32/test_xor.S
rename to tests/tcg/lm32/test_xor.S
diff --git a/tests/lm32/test_xori.S b/tests/tcg/lm32/test_xori.S
similarity index 100%
rename from tests/lm32/test_xori.S
rename to tests/tcg/lm32/test_xori.S
diff --git a/tests/pi_10.com b/tests/tcg/pi_10.com
similarity index 100%
rename from tests/pi_10.com
rename to tests/tcg/pi_10.com
diff --git a/tests/runcom.c b/tests/tcg/runcom.c
similarity index 100%
rename from tests/runcom.c
rename to tests/tcg/runcom.c
diff --git a/tests/sha1.c b/tests/tcg/sha1.c
similarity index 100%
rename from tests/sha1.c
rename to tests/tcg/sha1.c
diff --git a/tests/test-arm-iwmmxt.s b/tests/tcg/test-arm-iwmmxt.s
similarity index 100%
rename from tests/test-arm-iwmmxt.s
rename to tests/tcg/test-arm-iwmmxt.s
diff --git a/tests/test-i386-code16.S b/tests/tcg/test-i386-code16.S
similarity index 100%
rename from tests/test-i386-code16.S
rename to tests/tcg/test-i386-code16.S
diff --git a/tests/test-i386-muldiv.h b/tests/tcg/test-i386-muldiv.h
similarity index 100%
rename from tests/test-i386-muldiv.h
rename to tests/tcg/test-i386-muldiv.h
diff --git a/tests/test-i386-shift.h b/tests/tcg/test-i386-shift.h
similarity index 100%
rename from tests/test-i386-shift.h
rename to tests/tcg/test-i386-shift.h
diff --git a/tests/test-i386-ssse3.c b/tests/tcg/test-i386-ssse3.c
similarity index 100%
rename from tests/test-i386-ssse3.c
rename to tests/tcg/test-i386-ssse3.c
diff --git a/tests/test-i386-vm86.S b/tests/tcg/test-i386-vm86.S
similarity index 100%
rename from tests/test-i386-vm86.S
rename to tests/tcg/test-i386-vm86.S
diff --git a/tests/test-i386.c b/tests/tcg/test-i386.c
similarity index 100%
rename from tests/test-i386.c
rename to tests/tcg/test-i386.c
diff --git a/tests/test-i386.h b/tests/tcg/test-i386.h
similarity index 100%
rename from tests/test-i386.h
rename to tests/tcg/test-i386.h
diff --git a/tests/test-mmap.c b/tests/tcg/test-mmap.c
similarity index 100%
rename from tests/test-mmap.c
rename to tests/tcg/test-mmap.c
diff --git a/tests/test_path.c b/tests/tcg/test_path.c
similarity index 100%
rename from tests/test_path.c
rename to tests/tcg/test_path.c
diff --git a/tests/testthread.c b/tests/tcg/testthread.c
similarity index 100%
rename from tests/testthread.c
rename to tests/tcg/testthread.c
diff --git a/tests/xtensa/Makefile b/tests/tcg/xtensa/Makefile
similarity index 100%
rename from tests/xtensa/Makefile
rename to tests/tcg/xtensa/Makefile
diff --git a/tests/xtensa/crt.S b/tests/tcg/xtensa/crt.S
similarity index 100%
rename from tests/xtensa/crt.S
rename to tests/tcg/xtensa/crt.S
diff --git a/tests/xtensa/linker.ld b/tests/tcg/xtensa/linker.ld
similarity index 100%
rename from tests/xtensa/linker.ld
rename to tests/tcg/xtensa/linker.ld
diff --git a/tests/xtensa/macros.inc b/tests/tcg/xtensa/macros.inc
similarity index 100%
rename from tests/xtensa/macros.inc
rename to tests/tcg/xtensa/macros.inc
diff --git a/tests/xtensa/test_b.S b/tests/tcg/xtensa/test_b.S
similarity index 100%
rename from tests/xtensa/test_b.S
rename to tests/tcg/xtensa/test_b.S
diff --git a/tests/xtensa/test_bi.S b/tests/tcg/xtensa/test_bi.S
similarity index 100%
rename from tests/xtensa/test_bi.S
rename to tests/tcg/xtensa/test_bi.S
diff --git a/tests/xtensa/test_boolean.S b/tests/tcg/xtensa/test_boolean.S
similarity index 100%
rename from tests/xtensa/test_boolean.S
rename to tests/tcg/xtensa/test_boolean.S
diff --git a/tests/xtensa/test_bz.S b/tests/tcg/xtensa/test_bz.S
similarity index 100%
rename from tests/xtensa/test_bz.S
rename to tests/tcg/xtensa/test_bz.S
diff --git a/tests/xtensa/test_clamps.S b/tests/tcg/xtensa/test_clamps.S
similarity index 100%
rename from tests/xtensa/test_clamps.S
rename to tests/tcg/xtensa/test_clamps.S
diff --git a/tests/xtensa/test_fail.S b/tests/tcg/xtensa/test_fail.S
similarity index 100%
rename from tests/xtensa/test_fail.S
rename to tests/tcg/xtensa/test_fail.S
diff --git a/tests/xtensa/test_interrupt.S b/tests/tcg/xtensa/test_interrupt.S
similarity index 100%
rename from tests/xtensa/test_interrupt.S
rename to tests/tcg/xtensa/test_interrupt.S
diff --git a/tests/xtensa/test_loop.S b/tests/tcg/xtensa/test_loop.S
similarity index 100%
rename from tests/xtensa/test_loop.S
rename to tests/tcg/xtensa/test_loop.S
diff --git a/tests/xtensa/test_mac16.S b/tests/tcg/xtensa/test_mac16.S
similarity index 100%
rename from tests/xtensa/test_mac16.S
rename to tests/tcg/xtensa/test_mac16.S
diff --git a/tests/xtensa/test_max.S b/tests/tcg/xtensa/test_max.S
similarity index 100%
rename from tests/xtensa/test_max.S
rename to tests/tcg/xtensa/test_max.S
diff --git a/tests/xtensa/test_min.S b/tests/tcg/xtensa/test_min.S
similarity index 100%
rename from tests/xtensa/test_min.S
rename to tests/tcg/xtensa/test_min.S
diff --git a/tests/xtensa/test_mmu.S b/tests/tcg/xtensa/test_mmu.S
similarity index 100%
rename from tests/xtensa/test_mmu.S
rename to tests/tcg/xtensa/test_mmu.S
diff --git a/tests/xtensa/test_mul16.S b/tests/tcg/xtensa/test_mul16.S
similarity index 100%
rename from tests/xtensa/test_mul16.S
rename to tests/tcg/xtensa/test_mul16.S
diff --git a/tests/xtensa/test_mul32.S b/tests/tcg/xtensa/test_mul32.S
similarity index 100%
rename from tests/xtensa/test_mul32.S
rename to tests/tcg/xtensa/test_mul32.S
diff --git a/tests/xtensa/test_nsa.S b/tests/tcg/xtensa/test_nsa.S
similarity index 100%
rename from tests/xtensa/test_nsa.S
rename to tests/tcg/xtensa/test_nsa.S
diff --git a/tests/xtensa/test_pipeline.S b/tests/tcg/xtensa/test_pipeline.S
similarity index 100%
rename from tests/xtensa/test_pipeline.S
rename to tests/tcg/xtensa/test_pipeline.S
diff --git a/tests/xtensa/test_quo.S b/tests/tcg/xtensa/test_quo.S
similarity index 100%
rename from tests/xtensa/test_quo.S
rename to tests/tcg/xtensa/test_quo.S
diff --git a/tests/xtensa/test_rem.S b/tests/tcg/xtensa/test_rem.S
similarity index 100%
rename from tests/xtensa/test_rem.S
rename to tests/tcg/xtensa/test_rem.S
diff --git a/tests/xtensa/test_rst0.S b/tests/tcg/xtensa/test_rst0.S
similarity index 100%
rename from tests/xtensa/test_rst0.S
rename to tests/tcg/xtensa/test_rst0.S
diff --git a/tests/xtensa/test_sar.S b/tests/tcg/xtensa/test_sar.S
similarity index 100%
rename from tests/xtensa/test_sar.S
rename to tests/tcg/xtensa/test_sar.S
diff --git a/tests/xtensa/test_sext.S b/tests/tcg/xtensa/test_sext.S
similarity index 100%
rename from tests/xtensa/test_sext.S
rename to tests/tcg/xtensa/test_sext.S
diff --git a/tests/xtensa/test_shift.S b/tests/tcg/xtensa/test_shift.S
similarity index 100%
rename from tests/xtensa/test_shift.S
rename to tests/tcg/xtensa/test_shift.S
diff --git a/tests/xtensa/test_timer.S b/tests/tcg/xtensa/test_timer.S
similarity index 100%
rename from tests/xtensa/test_timer.S
rename to tests/tcg/xtensa/test_timer.S
diff --git a/tests/xtensa/test_windowed.S b/tests/tcg/xtensa/test_windowed.S
similarity index 100%
rename from tests/xtensa/test_windowed.S
rename to tests/tcg/xtensa/test_windowed.S
diff --git a/tests/xtensa/vectors.S b/tests/tcg/xtensa/vectors.S
similarity index 100%
rename from tests/xtensa/vectors.S
rename to tests/tcg/xtensa/vectors.S
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [Qemu-devel] [PATCH 02/15] build: split unit test builds to a separate makefile fragment
  2012-01-10 19:10 [Qemu-devel] [PATCH 01/15] tests: mv tests/* -> tests/tcg Anthony Liguori
@ 2012-01-10 19:10 ` Anthony Liguori
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 03/15] check-qdict: convert to gtest Anthony Liguori
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 25+ messages in thread
From: Anthony Liguori @ 2012-01-10 19:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 Makefile       |   37 ++-----------------------------------
 tests/Makefile |   37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 35 deletions(-)
 create mode 100644 tests/Makefile

diff --git a/Makefile b/Makefile
index 0cbe7c2..4823144 100644
--- a/Makefile
+++ b/Makefile
@@ -162,32 +162,14 @@ fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap
 qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx
 	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"  GEN   $@")
 
-check-qint.o check-qstring.o check-qdict.o check-qlist.o check-qfloat.o check-qjson.o test-coroutine.o: $(GENERATED_HEADERS)
-
-check-qint: check-qint.o qint.o $(tools-obj-y)
-check-qstring: check-qstring.o qstring.o $(tools-obj-y)
-check-qdict: check-qdict.o qdict.o qfloat.o qint.o qstring.o qbool.o qlist.o $(tools-obj-y)
-check-qlist: check-qlist.o qlist.o qint.o $(tools-obj-y)
-check-qfloat: check-qfloat.o qfloat.o $(tools-obj-y)
-check-qjson: check-qjson.o $(qobject-obj-y) $(tools-obj-y)
-test-coroutine: test-coroutine.o qemu-timer-common.o async.o $(coroutine-obj-y) $(tools-obj-y)
-
 $(qapi-obj-y): $(GENERATED_HEADERS)
 qapi-dir := $(BUILD_DIR)/qapi-generated
-test-qmp-input-visitor.o test-qmp-output-visitor.o test-qmp-commands.o qemu-ga$(EXESUF): QEMU_CFLAGS += -I $(qapi-dir)
+
 qemu-ga$(EXESUF): LIBS = $(LIBS_QGA)
 
 gen-out-type = $(subst .,-,$@)
 
-$(qapi-dir)/test-qapi-types.c $(qapi-dir)/test-qapi-types.h :\
-$(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-types.py
-	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o "$(qapi-dir)" -p "test-" < $<, "  GEN   $@")
-$(qapi-dir)/test-qapi-visit.c $(qapi-dir)/test-qapi-visit.h :\
-$(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-visit.py
-	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o "$(qapi-dir)" -p "test-" < $<, "  GEN   $@")
-$(qapi-dir)/test-qmp-commands.h $(qapi-dir)/test-qmp-marshal.c :\
-$(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-commands.py
-	    $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -o "$(qapi-dir)" -p "test-" < $<, "  GEN   $@")
+include $(SRC_PATH)/tests/Makefile
 
 $(qapi-dir)/qga-qapi-types.c $(qapi-dir)/qga-qapi-types.h :\
 $(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-types.py
@@ -209,15 +191,6 @@ qmp-commands.h qmp-marshal.c :\
 $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py
 	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -m -o "." < $<, "  GEN   $@")
 
-test-qmp-output-visitor.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h) $(qapi-obj-y)
-test-qmp-output-visitor: test-qmp-output-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o
-
-test-qmp-input-visitor.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h) $(qapi-obj-y)
-test-qmp-input-visitor: test-qmp-input-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o
-
-test-qmp-commands.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h test-qmp-marshal.c test-qmp-commands.h) $(qapi-obj-y)
-test-qmp-commands: test-qmp-commands.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o $(qapi-dir)/test-qmp-marshal.o module.o
-
 QGALIB_OBJ=$(addprefix $(qapi-dir)/, qga-qapi-types.o qga-qapi-visit.o qga-qmp-marshal.o)
 QGALIB_GEN=$(addprefix $(qapi-dir)/, qga-qapi-types.h qga-qapi-visit.h qga-qmp-commands.h)
 $(QGALIB_OBJ): $(QGALIB_GEN) $(GENERATED_HEADERS)
@@ -321,12 +294,6 @@ endif
 test speed: all
 	$(MAKE) -C tests/tcg $@
 
-.PHONY: check
-check: $(patsubst %,run-check-%,$(CHECKS))
-
-run-check-%: %
-	./$<
-
 .PHONY: TAGS
 TAGS:
 	find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags
diff --git a/tests/Makefile b/tests/Makefile
new file mode 100644
index 0000000..cff9ff3
--- /dev/null
+++ b/tests/Makefile
@@ -0,0 +1,37 @@
+check-qint.o check-qstring.o check-qdict.o check-qlist.o check-qfloat.o check-qjson.o test-coroutine.o: $(GENERATED_HEADERS)
+
+check-qint: check-qint.o qint.o $(tools-obj-y)
+check-qstring: check-qstring.o qstring.o $(tools-obj-y)
+check-qdict: check-qdict.o qdict.o qfloat.o qint.o qstring.o qbool.o qlist.o $(tools-obj-y)
+check-qlist: check-qlist.o qlist.o qint.o $(tools-obj-y)
+check-qfloat: check-qfloat.o qfloat.o $(tools-obj-y)
+check-qjson: check-qjson.o $(qobject-obj-y) $(tools-obj-y)
+test-coroutine: test-coroutine.o qemu-timer-common.o async.o $(coroutine-obj-y) $(tools-obj-y)
+
+test-qmp-input-visitor.o test-qmp-output-visitor.o test-qmp-commands.o qemu-ga$(EXESUF): QEMU_CFLAGS += -I $(qapi-dir)
+
+$(qapi-dir)/test-qapi-types.c $(qapi-dir)/test-qapi-types.h :\
+$(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-types.py
+	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o "$(qapi-dir)" -p "test-" < $<, "  GEN   $@")
+$(qapi-dir)/test-qapi-visit.c $(qapi-dir)/test-qapi-visit.h :\
+$(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-visit.py
+	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o "$(qapi-dir)" -p "test-" < $<, "  GEN   $@")
+$(qapi-dir)/test-qmp-commands.h $(qapi-dir)/test-qmp-marshal.c :\
+$(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-commands.py
+	    $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -o "$(qapi-dir)" -p "test-" < $<, "  GEN   $@")
+
+test-qmp-output-visitor.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h) $(qapi-obj-y)
+test-qmp-output-visitor: test-qmp-output-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o
+
+test-qmp-input-visitor.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h) $(qapi-obj-y)
+test-qmp-input-visitor: test-qmp-input-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o
+
+test-qmp-commands.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h test-qmp-marshal.c test-qmp-commands.h) $(qapi-obj-y)
+test-qmp-commands: test-qmp-commands.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o $(qapi-dir)/test-qmp-marshal.o module.o
+
+.PHONY: check
+check: $(patsubst %,run-check-%,$(CHECKS))
+
+run-check-%: %
+	./$<
+
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [Qemu-devel] [PATCH 03/15] check-qdict: convert to gtest
  2012-01-10 19:10 [Qemu-devel] [PATCH 01/15] tests: mv tests/* -> tests/tcg Anthony Liguori
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 02/15] build: split unit test builds to a separate makefile fragment Anthony Liguori
@ 2012-01-10 19:10 ` Anthony Liguori
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 04/15] check-qfloat: " Anthony Liguori
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 25+ messages in thread
From: Anthony Liguori @ 2012-01-10 19:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 check-qdict.c |  246 ++++++++++++++++++++++++++-------------------------------
 configure     |    4 +-
 2 files changed, 113 insertions(+), 137 deletions(-)

diff --git a/check-qdict.c b/check-qdict.c
index 5515773..fc0d276 100644
--- a/check-qdict.c
+++ b/check-qdict.c
@@ -9,7 +9,7 @@
  * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
  * See the COPYING.LIB file in the top-level directory.
  */
-#include <check.h>
+#include <glib.h>
 
 #include "qint.h"
 #include "qdict.h"
@@ -22,22 +22,21 @@
  * (with some violations to access 'private' data)
  */
 
-START_TEST(qdict_new_test)
+static void qdict_new_test(void)
 {
     QDict *qdict;
 
     qdict = qdict_new();
-    fail_unless(qdict != NULL);
-    fail_unless(qdict_size(qdict) == 0);
-    fail_unless(qdict->base.refcnt == 1);
-    fail_unless(qobject_type(QOBJECT(qdict)) == QTYPE_QDICT);
+    g_assert(qdict != NULL);
+    g_assert(qdict_size(qdict) == 0);
+    g_assert(qdict->base.refcnt == 1);
+    g_assert(qobject_type(QOBJECT(qdict)) == QTYPE_QDICT);
 
     // destroy doesn't exit yet
-    free(qdict);
+    g_free(qdict);
 }
-END_TEST
 
-START_TEST(qdict_put_obj_test)
+static void qdict_put_obj_test(void)
 {
     QInt *qi;
     QDict *qdict;
@@ -49,10 +48,10 @@ START_TEST(qdict_put_obj_test)
     // key "" will have tdb hash 12345
     qdict_put_obj(qdict, "", QOBJECT(qint_from_int(num)));
 
-    fail_unless(qdict_size(qdict) == 1);
+    g_assert(qdict_size(qdict) == 1);
     ent = QLIST_FIRST(&qdict->table[12345 % QDICT_BUCKET_MAX]);
     qi = qobject_to_qint(ent->value);
-    fail_unless(qint_get_int(qi) == num);
+    g_assert(qint_get_int(qi) == num);
 
     // destroy doesn't exit yet
     QDECREF(qi);
@@ -60,9 +59,8 @@ START_TEST(qdict_put_obj_test)
     g_free(ent);
     g_free(qdict);
 }
-END_TEST
 
-START_TEST(qdict_destroy_simple_test)
+static void qdict_destroy_simple_test(void)
 {
     QDict *qdict;
 
@@ -72,134 +70,138 @@ START_TEST(qdict_destroy_simple_test)
 
     QDECREF(qdict);
 }
-END_TEST
-
-static QDict *tests_dict = NULL;
-
-static void qdict_setup(void)
-{
-    tests_dict = qdict_new();
-    fail_unless(tests_dict != NULL);
-}
 
-static void qdict_teardown(void)
-{
-    QDECREF(tests_dict);
-    tests_dict = NULL;
-}
-
-START_TEST(qdict_get_test)
+static void qdict_get_test(void)
 {
     QInt *qi;
     QObject *obj;
     const int value = -42;
     const char *key = "test";
+    QDict *tests_dict = qdict_new();
 
     qdict_put(tests_dict, key, qint_from_int(value));
 
     obj = qdict_get(tests_dict, key);
-    fail_unless(obj != NULL);
+    g_assert(obj != NULL);
 
     qi = qobject_to_qint(obj);
-    fail_unless(qint_get_int(qi) == value);
+    g_assert(qint_get_int(qi) == value);
+
+    QDECREF(tests_dict);
 }
-END_TEST
 
-START_TEST(qdict_get_int_test)
+static void qdict_get_int_test(void)
 {
     int ret;
     const int value = 100;
     const char *key = "int";
+    QDict *tests_dict = qdict_new();
 
     qdict_put(tests_dict, key, qint_from_int(value));
 
     ret = qdict_get_int(tests_dict, key);
-    fail_unless(ret == value);
+    g_assert(ret == value);
+
+    QDECREF(tests_dict);
 }
-END_TEST
 
-START_TEST(qdict_get_try_int_test)
+static void qdict_get_try_int_test(void)
 {
     int ret;
     const int value = 100;
     const char *key = "int";
+    QDict *tests_dict = qdict_new();
 
     qdict_put(tests_dict, key, qint_from_int(value));
 
     ret = qdict_get_try_int(tests_dict, key, 0);
-    fail_unless(ret == value);
+    g_assert(ret == value);
+
+    QDECREF(tests_dict);
 }
-END_TEST
 
-START_TEST(qdict_get_str_test)
+static void qdict_get_str_test(void)
 {
     const char *p;
     const char *key = "key";
     const char *str = "string";
+    QDict *tests_dict = qdict_new();
 
     qdict_put(tests_dict, key, qstring_from_str(str));
 
     p = qdict_get_str(tests_dict, key);
-    fail_unless(p != NULL);
-    fail_unless(strcmp(p, str) == 0);
+    g_assert(p != NULL);
+    g_assert(strcmp(p, str) == 0);
+
+    QDECREF(tests_dict);
 }
-END_TEST
 
-START_TEST(qdict_get_try_str_test)
+static void qdict_get_try_str_test(void)
 {
     const char *p;
     const char *key = "key";
     const char *str = "string";
+    QDict *tests_dict = qdict_new();
 
     qdict_put(tests_dict, key, qstring_from_str(str));
 
     p = qdict_get_try_str(tests_dict, key);
-    fail_unless(p != NULL);
-    fail_unless(strcmp(p, str) == 0);
+    g_assert(p != NULL);
+    g_assert(strcmp(p, str) == 0);
+
+    QDECREF(tests_dict);
 }
-END_TEST
 
-START_TEST(qdict_haskey_not_test)
+static void qdict_haskey_not_test(void)
 {
-    fail_unless(qdict_haskey(tests_dict, "test") == 0);
+    QDict *tests_dict = qdict_new();
+    g_assert(qdict_haskey(tests_dict, "test") == 0);
+
+    QDECREF(tests_dict);
 }
-END_TEST
 
-START_TEST(qdict_haskey_test)
+static void qdict_haskey_test(void)
 {
     const char *key = "test";
+    QDict *tests_dict = qdict_new();
 
     qdict_put(tests_dict, key, qint_from_int(0));
-    fail_unless(qdict_haskey(tests_dict, key) == 1);
+    g_assert(qdict_haskey(tests_dict, key) == 1);
+
+    QDECREF(tests_dict);
 }
-END_TEST
 
-START_TEST(qdict_del_test)
+static void qdict_del_test(void)
 {
     const char *key = "key test";
+    QDict *tests_dict = qdict_new();
 
     qdict_put(tests_dict, key, qstring_from_str("foo"));
-    fail_unless(qdict_size(tests_dict) == 1);
+    g_assert(qdict_size(tests_dict) == 1);
 
     qdict_del(tests_dict, key);
 
-    fail_unless(qdict_size(tests_dict) == 0);
-    fail_unless(qdict_haskey(tests_dict, key) == 0);
+    g_assert(qdict_size(tests_dict) == 0);
+    g_assert(qdict_haskey(tests_dict, key) == 0);
+
+    QDECREF(tests_dict);
 }
-END_TEST
 
-START_TEST(qobject_to_qdict_test)
+static void qobject_to_qdict_test(void)
 {
-    fail_unless(qobject_to_qdict(QOBJECT(tests_dict)) == tests_dict);
+    QDict *tests_dict = qdict_new();
+    g_assert(qobject_to_qdict(QOBJECT(tests_dict)) == tests_dict);
+
+    QDECREF(tests_dict);
 }
-END_TEST
 
-START_TEST(qdict_iterapi_test)
+static void qdict_iterapi_test(void)
 {
     int count;
     const QDictEntry *ent;
+    QDict *tests_dict = qdict_new();
 
-    fail_unless(qdict_first(tests_dict) == NULL);
+    g_assert(qdict_first(tests_dict) == NULL);
 
     qdict_put(tests_dict, "key1", qint_from_int(1));
     qdict_put(tests_dict, "key2", qint_from_int(2));
@@ -207,47 +209,52 @@ START_TEST(qdict_iterapi_test)
 
     count = 0;
     for (ent = qdict_first(tests_dict); ent; ent = qdict_next(tests_dict, ent)){
-        fail_unless(qdict_haskey(tests_dict, qdict_entry_key(ent)) == 1);
+        g_assert(qdict_haskey(tests_dict, qdict_entry_key(ent)) == 1);
         count++;
     }
 
-    fail_unless(count == qdict_size(tests_dict));
+    g_assert(count == qdict_size(tests_dict));
 
     /* Do it again to test restarting */
     count = 0;
     for (ent = qdict_first(tests_dict); ent; ent = qdict_next(tests_dict, ent)){
-        fail_unless(qdict_haskey(tests_dict, qdict_entry_key(ent)) == 1);
+        g_assert(qdict_haskey(tests_dict, qdict_entry_key(ent)) == 1);
         count++;
     }
 
-    fail_unless(count == qdict_size(tests_dict));
+    g_assert(count == qdict_size(tests_dict));
+
+    QDECREF(tests_dict);
 }
-END_TEST
 
 /*
  * Errors test-cases
  */
 
-START_TEST(qdict_put_exists_test)
+static void qdict_put_exists_test(void)
 {
     int value;
     const char *key = "exists";
+    QDict *tests_dict = qdict_new();
 
     qdict_put(tests_dict, key, qint_from_int(1));
     qdict_put(tests_dict, key, qint_from_int(2));
 
     value = qdict_get_int(tests_dict, key);
-    fail_unless(value == 2);
+    g_assert(value == 2);
 
-    fail_unless(qdict_size(tests_dict) == 1);
+    g_assert(qdict_size(tests_dict) == 1);
+
+    QDECREF(tests_dict);
 }
-END_TEST
 
-START_TEST(qdict_get_not_exists_test)
+static void qdict_get_not_exists_test(void)
 {
-    fail_unless(qdict_get(tests_dict, "foo") == NULL);
+    QDict *tests_dict = qdict_new();
+    g_assert(qdict_get(tests_dict, "foo") == NULL);
+
+    QDECREF(tests_dict);
 }
-END_TEST
 
 /*
  * Stress test-case
@@ -276,7 +283,7 @@ static QString *read_line(FILE *file, char *key)
 
 #define reset_file(file)    fseek(file, 0L, SEEK_SET)
 
-START_TEST(qdict_stress_test)
+static void qdict_stress_test(void)
 {
     size_t lines;
     char key[128];
@@ -286,11 +293,11 @@ START_TEST(qdict_stress_test)
     const char *test_file_path = "qdict-test-data.txt";
 
     test_file = fopen(test_file_path, "r");
-    fail_unless(test_file != NULL);
+    g_assert(test_file != NULL);
 
     // Create the dict
     qdict = qdict_new();
-    fail_unless(qdict != NULL);
+    g_assert(qdict != NULL);
 
     // Add everything from the test file
     for (lines = 0;; lines++) {
@@ -300,7 +307,7 @@ START_TEST(qdict_stress_test)
 
         qdict_put(qdict, key, value);
     }
-    fail_unless(qdict_size(qdict) == lines);
+    g_assert(qdict_size(qdict) == lines);
 
     // Check if everything is really in there
     reset_file(test_file);
@@ -314,9 +321,9 @@ START_TEST(qdict_stress_test)
         str1 = qstring_get_str(value);
 
         str2 = qdict_get_str(qdict, key);
-        fail_unless(str2 != NULL);
+        g_assert(str2 != NULL);
 
-        fail_unless(strcmp(str1, str2) == 0);
+        g_assert(strcmp(str1, str2) == 0);
 
         QDECREF(value);
     }
@@ -331,72 +338,41 @@ START_TEST(qdict_stress_test)
         qdict_del(qdict, key);
         QDECREF(value);
 
-        fail_unless(qdict_haskey(qdict, key) == 0);
+        g_assert(qdict_haskey(qdict, key) == 0);
     }
     fclose(test_file);
 
-    fail_unless(qdict_size(qdict) == 0);
+    g_assert(qdict_size(qdict) == 0);
     QDECREF(qdict);
 }
-END_TEST
 
-static Suite *qdict_suite(void)
+int main(int argc, char **argv)
 {
-    Suite *s;
-    TCase *qdict_public_tcase;
-    TCase *qdict_public2_tcase;
-    TCase *qdict_stress_tcase;
-    TCase *qdict_errors_tcase;
-
-    s = suite_create("QDict test-suite");
+    g_test_init(&argc, &argv, NULL);
 
-    qdict_public_tcase = tcase_create("Public Interface");
-    suite_add_tcase(s, qdict_public_tcase);
-    tcase_add_test(qdict_public_tcase, qdict_new_test);
-    tcase_add_test(qdict_public_tcase, qdict_put_obj_test);
-    tcase_add_test(qdict_public_tcase, qdict_destroy_simple_test);
+    g_test_add_func("/public/new", qdict_new_test);
+    g_test_add_func("/public/put_obj", qdict_put_obj_test);
+    g_test_add_func("/public/destroy_simple", qdict_destroy_simple_test);
 
     /* Continue, but now with fixtures */
-    qdict_public2_tcase = tcase_create("Public Interface (2)");
-    suite_add_tcase(s, qdict_public2_tcase);
-    tcase_add_checked_fixture(qdict_public2_tcase, qdict_setup, qdict_teardown);
-    tcase_add_test(qdict_public2_tcase, qdict_get_test);
-    tcase_add_test(qdict_public2_tcase, qdict_get_int_test);
-    tcase_add_test(qdict_public2_tcase, qdict_get_try_int_test);
-    tcase_add_test(qdict_public2_tcase, qdict_get_str_test);
-    tcase_add_test(qdict_public2_tcase, qdict_get_try_str_test);
-    tcase_add_test(qdict_public2_tcase, qdict_haskey_not_test);
-    tcase_add_test(qdict_public2_tcase, qdict_haskey_test);
-    tcase_add_test(qdict_public2_tcase, qdict_del_test);
-    tcase_add_test(qdict_public2_tcase, qobject_to_qdict_test);
-    tcase_add_test(qdict_public2_tcase, qdict_iterapi_test);
-
-    qdict_errors_tcase = tcase_create("Errors");
-    suite_add_tcase(s, qdict_errors_tcase);
-    tcase_add_checked_fixture(qdict_errors_tcase, qdict_setup, qdict_teardown);
-    tcase_add_test(qdict_errors_tcase, qdict_put_exists_test);
-    tcase_add_test(qdict_errors_tcase, qdict_get_not_exists_test);
+    g_test_add_func("/public/get", qdict_get_test);
+    g_test_add_func("/public/get_int", qdict_get_int_test);
+    g_test_add_func("/public/get_try_int", qdict_get_try_int_test);
+    g_test_add_func("/public/get_str", qdict_get_str_test);
+    g_test_add_func("/public/get_try_str", qdict_get_try_str_test);
+    g_test_add_func("/public/haskey_not", qdict_haskey_not_test);
+    g_test_add_func("/public/haskey", qdict_haskey_test);
+    g_test_add_func("/public/del", qdict_del_test);
+    g_test_add_func("/public/to_qdict", qobject_to_qdict_test);
+    g_test_add_func("/public/iterapi", qdict_iterapi_test);
+
+    g_test_add_func("/errors/put_exists", qdict_put_exists_test);
+    g_test_add_func("/errors/get_not_exists", qdict_get_not_exists_test);
 
     /* The Big one */
-    qdict_stress_tcase = tcase_create("Stress Test");
-    suite_add_tcase(s, qdict_stress_tcase);
-    tcase_add_test(qdict_stress_tcase, qdict_stress_test);
-
-    return s;
-}
-
-int main(void)
-{
-	int nf;
-	Suite *s;
-	SRunner *sr;
-
-	s = qdict_suite();
-	sr = srunner_create(s);
-
-	srunner_run_all(sr, CK_NORMAL);
-	nf = srunner_ntests_failed(sr);
-	srunner_free(sr);
+    if (g_test_slow()) {
+        g_test_add_func("/stress/test", qdict_stress_test);
+    }
 
-	return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+    return g_test_run();
 }
diff --git a/configure b/configure
index 79790b3..7e3f28f 100755
--- a/configure
+++ b/configure
@@ -2800,10 +2800,10 @@ if test "$softmmu" = yes ; then
       tools="qemu-ga\$(EXESUF) $tools"
     fi
     if [ "$check_utests" = "yes" ]; then
-      checks="check-qint check-qstring check-qdict check-qlist"
+      checks="check-qint check-qstring check-qlist"
       checks="check-qfloat check-qjson $checks"
     fi
-    test_progs="$checks test-coroutine test-qmp-output-visitor test-qmp-input-visitor"
+    test_progs="$checks check-qdict test-coroutine test-qmp-output-visitor test-qmp-input-visitor"
   fi
 fi
 
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [Qemu-devel] [PATCH 04/15] check-qfloat: convert to gtest
  2012-01-10 19:10 [Qemu-devel] [PATCH 01/15] tests: mv tests/* -> tests/tcg Anthony Liguori
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 02/15] build: split unit test builds to a separate makefile fragment Anthony Liguori
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 03/15] check-qdict: convert to gtest Anthony Liguori
@ 2012-01-10 19:10 ` Anthony Liguori
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 05/15] check-qint: " Anthony Liguori
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 25+ messages in thread
From: Anthony Liguori @ 2012-01-10 19:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 check-qfloat.c |   47 ++++++++++++-----------------------------------
 configure      |    4 ++--
 2 files changed, 14 insertions(+), 37 deletions(-)

diff --git a/check-qfloat.c b/check-qfloat.c
index 3344057..cdc66ea 100644
--- a/check-qfloat.c
+++ b/check-qfloat.c
@@ -10,7 +10,7 @@
  * See the COPYING.LIB file in the top-level directory.
  *
  */
-#include <check.h>
+#include <glib.h>
 
 #include "qfloat.h"
 #include "qemu-common.h"
@@ -21,56 +21,33 @@
  * (with some violations to access 'private' data)
  */
 
-START_TEST(qfloat_from_double_test)
+static void qfloat_from_double_test(void)
 {
     QFloat *qf;
     const double value = -42.23423;
 
     qf = qfloat_from_double(value);
-    fail_unless(qf != NULL);
-    fail_unless(qf->value == value);
-    fail_unless(qf->base.refcnt == 1);
-    fail_unless(qobject_type(QOBJECT(qf)) == QTYPE_QFLOAT);
+    g_assert(qf != NULL);
+    g_assert(qf->value == value);
+    g_assert(qf->base.refcnt == 1);
+    g_assert(qobject_type(QOBJECT(qf)) == QTYPE_QFLOAT);
 
     // destroy doesn't exit yet
     g_free(qf);
 }
-END_TEST
 
-START_TEST(qfloat_destroy_test)
+static void qfloat_destroy_test(void)
 {
     QFloat *qf = qfloat_from_double(0.0);
     QDECREF(qf);
 }
-END_TEST
 
-static Suite *qfloat_suite(void)
+int main(int argc, char **argv)
 {
-    Suite *s;
-    TCase *qfloat_public_tcase;
+    g_test_init(&argc, &argv, NULL);
 
-    s = suite_create("QFloat test-suite");
+    g_test_add_func("/public/from_double", qfloat_from_double_test);
+    g_test_add_func("/public/destroy", qfloat_destroy_test);
 
-    qfloat_public_tcase = tcase_create("Public Interface");
-    suite_add_tcase(s, qfloat_public_tcase);
-    tcase_add_test(qfloat_public_tcase, qfloat_from_double_test);
-    tcase_add_test(qfloat_public_tcase, qfloat_destroy_test);
-
-    return s;
-}
-
-int main(void)
-{
-    int nf;
-    Suite *s;
-    SRunner *sr;
-
-    s = qfloat_suite();
-    sr = srunner_create(s);
-
-    srunner_run_all(sr, CK_NORMAL);
-    nf = srunner_ntests_failed(sr);
-    srunner_free(sr);
-
-    return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+    return g_test_run();
 }
diff --git a/configure b/configure
index 7e3f28f..a7a6758 100755
--- a/configure
+++ b/configure
@@ -2801,9 +2801,9 @@ if test "$softmmu" = yes ; then
     fi
     if [ "$check_utests" = "yes" ]; then
       checks="check-qint check-qstring check-qlist"
-      checks="check-qfloat check-qjson $checks"
+      checks="check-qjson $checks"
     fi
-    test_progs="$checks check-qdict test-coroutine test-qmp-output-visitor test-qmp-input-visitor"
+    test_progs="$checks check-qdict check-qfloat test-coroutine test-qmp-output-visitor test-qmp-input-visitor"
   fi
 fi
 
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [Qemu-devel] [PATCH 05/15] check-qint: convert to gtest
  2012-01-10 19:10 [Qemu-devel] [PATCH 01/15] tests: mv tests/* -> tests/tcg Anthony Liguori
                   ` (2 preceding siblings ...)
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 04/15] check-qfloat: " Anthony Liguori
@ 2012-01-10 19:10 ` Anthony Liguori
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 06/15] check-qstring: " Anthony Liguori
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 25+ messages in thread
From: Anthony Liguori @ 2012-01-10 19:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 check-qint.c |   68 ++++++++++++++++++----------------------------------------
 configure    |    4 +-
 2 files changed, 23 insertions(+), 49 deletions(-)

diff --git a/check-qint.c b/check-qint.c
index 3af51f2..5a27119 100644
--- a/check-qint.c
+++ b/check-qint.c
@@ -9,7 +9,7 @@
  * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
  * See the COPYING.LIB file in the top-level directory.
  */
-#include <check.h>
+#include <glib.h>
 
 #include "qint.h"
 #include "qemu-common.h"
@@ -20,94 +20,68 @@
  * (with some violations to access 'private' data)
  */
 
-START_TEST(qint_from_int_test)
+static void qint_from_int_test(void)
 {
     QInt *qi;
     const int value = -42;
 
     qi = qint_from_int(value);
-    fail_unless(qi != NULL);
-    fail_unless(qi->value == value);
-    fail_unless(qi->base.refcnt == 1);
-    fail_unless(qobject_type(QOBJECT(qi)) == QTYPE_QINT);
+    g_assert(qi != NULL);
+    g_assert(qi->value == value);
+    g_assert(qi->base.refcnt == 1);
+    g_assert(qobject_type(QOBJECT(qi)) == QTYPE_QINT);
 
     // destroy doesn't exit yet
     g_free(qi);
 }
-END_TEST
 
-START_TEST(qint_destroy_test)
+static void qint_destroy_test(void)
 {
     QInt *qi = qint_from_int(0);
     QDECREF(qi);
 }
-END_TEST
 
-START_TEST(qint_from_int64_test)
+static void qint_from_int64_test(void)
 {
     QInt *qi;
     const int64_t value = 0x1234567890abcdefLL;
 
     qi = qint_from_int(value);
-    fail_unless((int64_t) qi->value == value);
+    g_assert((int64_t) qi->value == value);
 
     QDECREF(qi);
 }
-END_TEST
 
-START_TEST(qint_get_int_test)
+static void qint_get_int_test(void)
 {
     QInt *qi;
     const int value = 123456;
 
     qi = qint_from_int(value);
-    fail_unless(qint_get_int(qi) == value);
+    g_assert(qint_get_int(qi) == value);
 
     QDECREF(qi);
 }
-END_TEST
 
-START_TEST(qobject_to_qint_test)
+static void qobject_to_qint_test(void)
 {
     QInt *qi;
 
     qi = qint_from_int(0);
-    fail_unless(qobject_to_qint(QOBJECT(qi)) == qi);
+    g_assert(qobject_to_qint(QOBJECT(qi)) == qi);
 
     QDECREF(qi);
 }
-END_TEST
 
-static Suite *qint_suite(void)
+int main(int argc, char **argv)
 {
-    Suite *s;
-    TCase *qint_public_tcase;
+    g_test_init(&argc, &argv, NULL);
 
-    s = suite_create("QInt test-suite");
+    g_test_add_func("/public/from_int", qint_from_int_test);
+    g_test_add_func("/public/destroy", qint_destroy_test);
+    g_test_add_func("/public/from_int64", qint_from_int64_test);
+    g_test_add_func("/public/get_int", qint_get_int_test);
+    g_test_add_func("/public/to_qint", qobject_to_qint_test);
 
-    qint_public_tcase = tcase_create("Public Interface");
-    suite_add_tcase(s, qint_public_tcase);
-    tcase_add_test(qint_public_tcase, qint_from_int_test);
-    tcase_add_test(qint_public_tcase, qint_destroy_test);
-    tcase_add_test(qint_public_tcase, qint_from_int64_test);
-    tcase_add_test(qint_public_tcase, qint_get_int_test);
-    tcase_add_test(qint_public_tcase, qobject_to_qint_test);
-
-    return s;
-}
-
-int main(void)
-{
-	int nf;
-	Suite *s;
-	SRunner *sr;
-
-	s = qint_suite();
-	sr = srunner_create(s);
-
-	srunner_run_all(sr, CK_NORMAL);
-	nf = srunner_ntests_failed(sr);
-	srunner_free(sr);
-
-	return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+    return g_test_run();
 }
diff --git a/configure b/configure
index a7a6758..cea9cb6 100755
--- a/configure
+++ b/configure
@@ -2800,10 +2800,10 @@ if test "$softmmu" = yes ; then
       tools="qemu-ga\$(EXESUF) $tools"
     fi
     if [ "$check_utests" = "yes" ]; then
-      checks="check-qint check-qstring check-qlist"
+      checks="check-qstring check-qlist"
       checks="check-qjson $checks"
     fi
-    test_progs="$checks check-qdict check-qfloat test-coroutine test-qmp-output-visitor test-qmp-input-visitor"
+    test_progs="$checks check-qdict check-qfloat check-qint test-coroutine test-qmp-output-visitor test-qmp-input-visitor"
   fi
 fi
 
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [Qemu-devel] [PATCH 06/15] check-qstring: convert to gtest
  2012-01-10 19:10 [Qemu-devel] [PATCH 01/15] tests: mv tests/* -> tests/tcg Anthony Liguori
                   ` (3 preceding siblings ...)
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 05/15] check-qint: " Anthony Liguori
@ 2012-01-10 19:10 ` Anthony Liguori
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 07/15] check-qlist: " Anthony Liguori
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 25+ messages in thread
From: Anthony Liguori @ 2012-01-10 19:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 check-qstring.c |   75 +++++++++++++++++-------------------------------------
 configure       |    4 +-
 2 files changed, 26 insertions(+), 53 deletions(-)

diff --git a/check-qstring.c b/check-qstring.c
index 93bd475..681bb68 100644
--- a/check-qstring.c
+++ b/check-qstring.c
@@ -20,31 +20,29 @@
  * (with some violations to access 'private' data)
  */
 
-START_TEST(qstring_from_str_test)
+static void qstring_from_str_test(void)
 {
     QString *qstring;
     const char *str = "QEMU";
 
     qstring = qstring_from_str(str);
-    fail_unless(qstring != NULL);
-    fail_unless(qstring->base.refcnt == 1);
-    fail_unless(strcmp(str, qstring->string) == 0);
-    fail_unless(qobject_type(QOBJECT(qstring)) == QTYPE_QSTRING);
+    g_assert(qstring != NULL);
+    g_assert(qstring->base.refcnt == 1);
+    g_assert(strcmp(str, qstring->string) == 0);
+    g_assert(qobject_type(QOBJECT(qstring)) == QTYPE_QSTRING);
 
     // destroy doesn't exit yet
     g_free(qstring->string);
     g_free(qstring);
 }
-END_TEST
 
-START_TEST(qstring_destroy_test)
+static void qstring_destroy_test(void)
 {
     QString *qstring = qstring_from_str("destroy test");
     QDECREF(qstring);
 }
-END_TEST
 
-START_TEST(qstring_get_str_test)
+static void qstring_get_str_test(void)
 {
     QString *qstring;
     const char *ret_str;
@@ -52,13 +50,12 @@ START_TEST(qstring_get_str_test)
 
     qstring = qstring_from_str(str);
     ret_str = qstring_get_str(qstring);
-    fail_unless(strcmp(ret_str, str) == 0);
+    g_assert(strcmp(ret_str, str) == 0);
 
     QDECREF(qstring);
 }
-END_TEST
 
-START_TEST(qstring_append_chr_test)
+static void qstring_append_chr_test(void)
 {
     int i;
     QString *qstring;
@@ -69,66 +66,42 @@ START_TEST(qstring_append_chr_test)
     for (i = 0; str[i]; i++)
         qstring_append_chr(qstring, str[i]);
 
-    fail_unless(strcmp(str, qstring_get_str(qstring)) == 0);
+    g_assert(strcmp(str, qstring_get_str(qstring)) == 0);
     QDECREF(qstring);
 }
-END_TEST
 
-START_TEST(qstring_from_substr_test)
+static void qstring_from_substr_test(void)
 {
     QString *qs;
 
     qs = qstring_from_substr("virtualization", 3, 9);
-    fail_unless(qs != NULL);
-    fail_unless(strcmp(qstring_get_str(qs), "tualiza") == 0);
+    g_assert(qs != NULL);
+    g_assert(strcmp(qstring_get_str(qs), "tualiza") == 0);
 
     QDECREF(qs);
 }
-END_TEST
 
 
-START_TEST(qobject_to_qstring_test)
+static void qobject_to_qstring_test(void)
 {
     QString *qstring;
 
     qstring = qstring_from_str("foo");
-    fail_unless(qobject_to_qstring(QOBJECT(qstring)) == qstring);
+    g_assert(qobject_to_qstring(QOBJECT(qstring)) == qstring);
 
     QDECREF(qstring);
 }
-END_TEST
 
-static Suite *qstring_suite(void)
+int main(int argc, char **argv)
 {
-    Suite *s;
-    TCase *qstring_public_tcase;
+    g_test_init(&argc, &argv, NULL);
 
-    s = suite_create("QString test-suite");
+    g_test_add_func("/public/from_str", qstring_from_str_test);
+    g_test_add_func("/public/destroy", qstring_destroy_test);
+    g_test_add_func("/public/get_str", qstring_get_str_test);
+    g_test_add_func("/public/append_chr", qstring_append_chr_test);
+    g_test_add_func("/public/from_substr", qstring_from_substr_test);
+    g_test_add_func("/public/to_qstring", qobject_to_qstring_test);
 
-    qstring_public_tcase = tcase_create("Public Interface");
-    suite_add_tcase(s, qstring_public_tcase);
-    tcase_add_test(qstring_public_tcase, qstring_from_str_test);
-    tcase_add_test(qstring_public_tcase, qstring_destroy_test);
-    tcase_add_test(qstring_public_tcase, qstring_get_str_test);
-    tcase_add_test(qstring_public_tcase, qstring_append_chr_test);
-    tcase_add_test(qstring_public_tcase, qstring_from_substr_test);
-    tcase_add_test(qstring_public_tcase, qobject_to_qstring_test);
-
-    return s;
-}
-
-int main(void)
-{
-	int nf;
-	Suite *s;
-	SRunner *sr;
-
-	s = qstring_suite();
-	sr = srunner_create(s);
-
-	srunner_run_all(sr, CK_NORMAL);
-	nf = srunner_ntests_failed(sr);
-	srunner_free(sr);
-
-	return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+    return g_test_run();
 }
diff --git a/configure b/configure
index cea9cb6..18f06ba 100755
--- a/configure
+++ b/configure
@@ -2800,10 +2800,10 @@ if test "$softmmu" = yes ; then
       tools="qemu-ga\$(EXESUF) $tools"
     fi
     if [ "$check_utests" = "yes" ]; then
-      checks="check-qstring check-qlist"
+      checks="check-qlist"
       checks="check-qjson $checks"
     fi
-    test_progs="$checks check-qdict check-qfloat check-qint test-coroutine test-qmp-output-visitor test-qmp-input-visitor"
+    test_progs="$checks check-qdict check-qfloat check-qint check-qstring test-coroutine test-qmp-output-visitor test-qmp-input-visitor"
   fi
 fi
 
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [Qemu-devel] [PATCH 07/15] check-qlist: convert to gtest
  2012-01-10 19:10 [Qemu-devel] [PATCH 01/15] tests: mv tests/* -> tests/tcg Anthony Liguori
                   ` (4 preceding siblings ...)
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 06/15] check-qstring: " Anthony Liguori
@ 2012-01-10 19:10 ` Anthony Liguori
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 08/15] check-qjson: " Anthony Liguori
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 25+ messages in thread
From: Anthony Liguori @ 2012-01-10 19:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 check-qlist.c |   74 ++++++++++++++++++--------------------------------------
 configure     |    3 +-
 2 files changed, 25 insertions(+), 52 deletions(-)

diff --git a/check-qlist.c b/check-qlist.c
index ee2454a..501ba26 100644
--- a/check-qlist.c
+++ b/check-qlist.c
@@ -9,7 +9,7 @@
  * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
  * See the COPYING.LIB file in the top-level directory.
  */
-#include <check.h>
+#include <glib.h>
 
 #include "qint.h"
 #include "qlist.h"
@@ -20,21 +20,20 @@
  * (with some violations to access 'private' data)
  */
 
-START_TEST(qlist_new_test)
+static void qlist_new_test(void)
 {
     QList *qlist;
 
     qlist = qlist_new();
-    fail_unless(qlist != NULL);
-    fail_unless(qlist->base.refcnt == 1);
-    fail_unless(qobject_type(QOBJECT(qlist)) == QTYPE_QLIST);
+    g_assert(qlist != NULL);
+    g_assert(qlist->base.refcnt == 1);
+    g_assert(qobject_type(QOBJECT(qlist)) == QTYPE_QLIST);
 
     // destroy doesn't exist yet
     g_free(qlist);
 }
-END_TEST
 
-START_TEST(qlist_append_test)
+static void qlist_append_test(void)
 {
     QInt *qi;
     QList *qlist;
@@ -46,30 +45,28 @@ START_TEST(qlist_append_test)
     qlist_append(qlist, qi);
 
     entry = QTAILQ_FIRST(&qlist->head);
-    fail_unless(entry != NULL);
-    fail_unless(entry->value == QOBJECT(qi));
+    g_assert(entry != NULL);
+    g_assert(entry->value == QOBJECT(qi));
 
     // destroy doesn't exist yet
     QDECREF(qi);
     g_free(entry);
     g_free(qlist);
 }
-END_TEST
 
-START_TEST(qobject_to_qlist_test)
+static void qobject_to_qlist_test(void)
 {
     QList *qlist;
 
     qlist = qlist_new();
 
-    fail_unless(qobject_to_qlist(QOBJECT(qlist)) == qlist);
+    g_assert(qobject_to_qlist(QOBJECT(qlist)) == qlist);
 
     // destroy doesn't exist yet
     g_free(qlist);
 }
-END_TEST
 
-START_TEST(qlist_destroy_test)
+static void qlist_destroy_test(void)
 {
     int i;
     QList *qlist;
@@ -81,7 +78,6 @@ START_TEST(qlist_destroy_test)
 
     QDECREF(qlist);
 }
-END_TEST
 
 static int iter_called;
 static const int iter_max = 42;
@@ -90,16 +86,16 @@ static void iter_func(QObject *obj, void *opaque)
 {
     QInt *qi;
 
-    fail_unless(opaque == NULL);
+    g_assert(opaque == NULL);
 
     qi = qobject_to_qint(obj);
-    fail_unless(qi != NULL);
-    fail_unless((qint_get_int(qi) >= 0) && (qint_get_int(qi) <= iter_max));
+    g_assert(qi != NULL);
+    g_assert((qint_get_int(qi) >= 0) && (qint_get_int(qi) <= iter_max));
 
     iter_called++;
 }
 
-START_TEST(qlist_iter_test)
+static void qlist_iter_test(void)
 {
     int i;
     QList *qlist;
@@ -112,42 +108,20 @@ START_TEST(qlist_iter_test)
     iter_called = 0;
     qlist_iter(qlist, iter_func, NULL);
 
-    fail_unless(iter_called == iter_max);
+    g_assert(iter_called == iter_max);
 
     QDECREF(qlist);
 }
-END_TEST
 
-static Suite *QList_suite(void)
+int main(int argc, char **argv)
 {
-    Suite *s;
-    TCase *qlist_public_tcase;
+    g_test_init(&argc, &argv, NULL);
 
-    s = suite_create("QList suite");
+    g_test_add_func("/public/new", qlist_new_test);
+    g_test_add_func("/public/append", qlist_append_test);
+    g_test_add_func("/public/to_qlist", qobject_to_qlist_test);
+    g_test_add_func("/public/destroy", qlist_destroy_test);
+    g_test_add_func("/public/iter", qlist_iter_test);
 
-    qlist_public_tcase = tcase_create("Public Interface");
-    suite_add_tcase(s, qlist_public_tcase);
-    tcase_add_test(qlist_public_tcase, qlist_new_test);
-    tcase_add_test(qlist_public_tcase, qlist_append_test);
-    tcase_add_test(qlist_public_tcase, qobject_to_qlist_test);
-    tcase_add_test(qlist_public_tcase, qlist_destroy_test);
-    tcase_add_test(qlist_public_tcase, qlist_iter_test);
-
-    return s;
-}
-
-int main(void)
-{
-	int nf;
-	Suite *s;
-	SRunner *sr;
-
-	s = QList_suite();
-	sr = srunner_create(s);
-
-	srunner_run_all(sr, CK_NORMAL);
-	nf = srunner_ntests_failed(sr);
-	srunner_free(sr);
-
-	return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+    return g_test_run();
 }
diff --git a/configure b/configure
index 18f06ba..2ab7d6f 100755
--- a/configure
+++ b/configure
@@ -2800,10 +2800,9 @@ if test "$softmmu" = yes ; then
       tools="qemu-ga\$(EXESUF) $tools"
     fi
     if [ "$check_utests" = "yes" ]; then
-      checks="check-qlist"
       checks="check-qjson $checks"
     fi
-    test_progs="$checks check-qdict check-qfloat check-qint check-qstring test-coroutine test-qmp-output-visitor test-qmp-input-visitor"
+    test_progs="$checks check-qdict check-qfloat check-qint check-qstring check-qlist test-coroutine test-qmp-output-visitor test-qmp-input-visitor"
   fi
 fi
 
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [Qemu-devel] [PATCH 08/15] check-qjson: convert to gtest
  2012-01-10 19:10 [Qemu-devel] [PATCH 01/15] tests: mv tests/* -> tests/tcg Anthony Liguori
                   ` (5 preceding siblings ...)
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 07/15] check-qlist: " Anthony Liguori
@ 2012-01-10 19:10 ` Anthony Liguori
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 09/15] check-qjson: enable disabled tests Anthony Liguori
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 25+ messages in thread
From: Anthony Liguori @ 2012-01-10 19:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 check-qjson.c |  330 +++++++++++++++++++++++----------------------------------
 configure     |    4 +-
 2 files changed, 136 insertions(+), 198 deletions(-)

diff --git a/check-qjson.c b/check-qjson.c
index 36d4ac2..430f53b 100644
--- a/check-qjson.c
+++ b/check-qjson.c
@@ -8,7 +8,7 @@
  * See the COPYING.LIB file in the top-level directory.
  *
  */
-#include <check.h>
+#include <glib.h>
 
 #include "qstring.h"
 #include "qint.h"
@@ -20,7 +20,7 @@
 
 #include "qemu-common.h"
 
-START_TEST(escaped_string)
+static void escaped_string(void)
 {
     int i;
     struct {
@@ -52,28 +52,23 @@ START_TEST(escaped_string)
 
         obj = qobject_from_json(test_cases[i].encoded);
 
-        fail_unless(obj != NULL);
-        fail_unless(qobject_type(obj) == QTYPE_QSTRING);
+        g_assert(obj != NULL);
+        g_assert(qobject_type(obj) == QTYPE_QSTRING);
         
         str = qobject_to_qstring(obj);
-        fail_unless(strcmp(qstring_get_str(str), test_cases[i].decoded) == 0,
-                    "%s != %s\n", qstring_get_str(str), test_cases[i].decoded);
+        g_assert_cmpstr(qstring_get_str(str), ==, test_cases[i].decoded);
 
         if (test_cases[i].skip == 0) {
             str = qobject_to_json(obj);
-            fail_unless(strcmp(qstring_get_str(str),test_cases[i].encoded) == 0,
-                        "%s != %s\n", qstring_get_str(str),
-                                      test_cases[i].encoded);
-
+            g_assert_cmpstr(qstring_get_str(str), ==, test_cases[i].encoded);
             qobject_decref(obj);
         }
 
         QDECREF(str);
     }
 }
-END_TEST
 
-START_TEST(simple_string)
+static void simple_string(void)
 {
     int i;
     struct {
@@ -92,23 +87,22 @@ START_TEST(simple_string)
 
         obj = qobject_from_json(test_cases[i].encoded);
 
-        fail_unless(obj != NULL);
-        fail_unless(qobject_type(obj) == QTYPE_QSTRING);
+        g_assert(obj != NULL);
+        g_assert(qobject_type(obj) == QTYPE_QSTRING);
         
         str = qobject_to_qstring(obj);
-        fail_unless(strcmp(qstring_get_str(str), test_cases[i].decoded) == 0);
+        g_assert(strcmp(qstring_get_str(str), test_cases[i].decoded) == 0);
 
         str = qobject_to_json(obj);
-        fail_unless(strcmp(qstring_get_str(str), test_cases[i].encoded) == 0);
+        g_assert(strcmp(qstring_get_str(str), test_cases[i].encoded) == 0);
 
         qobject_decref(obj);
         
         QDECREF(str);
     }
 }
-END_TEST
 
-START_TEST(single_quote_string)
+static void single_quote_string(void)
 {
     int i;
     struct {
@@ -127,18 +121,17 @@ START_TEST(single_quote_string)
 
         obj = qobject_from_json(test_cases[i].encoded);
 
-        fail_unless(obj != NULL);
-        fail_unless(qobject_type(obj) == QTYPE_QSTRING);
+        g_assert(obj != NULL);
+        g_assert(qobject_type(obj) == QTYPE_QSTRING);
         
         str = qobject_to_qstring(obj);
-        fail_unless(strcmp(qstring_get_str(str), test_cases[i].decoded) == 0);
+        g_assert(strcmp(qstring_get_str(str), test_cases[i].decoded) == 0);
 
         QDECREF(str);
     }
 }
-END_TEST
 
-START_TEST(vararg_string)
+static void vararg_string(void)
 {
     int i;
     struct {
@@ -155,18 +148,17 @@ START_TEST(vararg_string)
 
         obj = qobject_from_jsonf("%s", test_cases[i].decoded);
 
-        fail_unless(obj != NULL);
-        fail_unless(qobject_type(obj) == QTYPE_QSTRING);
+        g_assert(obj != NULL);
+        g_assert(qobject_type(obj) == QTYPE_QSTRING);
         
         str = qobject_to_qstring(obj);
-        fail_unless(strcmp(qstring_get_str(str), test_cases[i].decoded) == 0);
+        g_assert(strcmp(qstring_get_str(str), test_cases[i].decoded) == 0);
 
         QDECREF(str);
     }
 }
-END_TEST
 
-START_TEST(simple_number)
+static void simple_number(void)
 {
     int i;
     struct {
@@ -187,25 +179,24 @@ START_TEST(simple_number)
         QInt *qint;
 
         obj = qobject_from_json(test_cases[i].encoded);
-        fail_unless(obj != NULL);
-        fail_unless(qobject_type(obj) == QTYPE_QINT);
+        g_assert(obj != NULL);
+        g_assert(qobject_type(obj) == QTYPE_QINT);
 
         qint = qobject_to_qint(obj);
-        fail_unless(qint_get_int(qint) == test_cases[i].decoded);
+        g_assert(qint_get_int(qint) == test_cases[i].decoded);
         if (test_cases[i].skip == 0) {
             QString *str;
 
             str = qobject_to_json(obj);
-            fail_unless(strcmp(qstring_get_str(str), test_cases[i].encoded) == 0);
+            g_assert(strcmp(qstring_get_str(str), test_cases[i].encoded) == 0);
             QDECREF(str);
         }
 
         QDECREF(qint);
     }
 }
-END_TEST
 
-START_TEST(float_number)
+static void float_number(void)
 {
     int i;
     struct {
@@ -225,26 +216,25 @@ START_TEST(float_number)
         QFloat *qfloat;
 
         obj = qobject_from_json(test_cases[i].encoded);
-        fail_unless(obj != NULL);
-        fail_unless(qobject_type(obj) == QTYPE_QFLOAT);
+        g_assert(obj != NULL);
+        g_assert(qobject_type(obj) == QTYPE_QFLOAT);
 
         qfloat = qobject_to_qfloat(obj);
-        fail_unless(qfloat_get_double(qfloat) == test_cases[i].decoded);
+        g_assert(qfloat_get_double(qfloat) == test_cases[i].decoded);
 
         if (test_cases[i].skip == 0) {
             QString *str;
 
             str = qobject_to_json(obj);
-            fail_unless(strcmp(qstring_get_str(str), test_cases[i].encoded) == 0);
+            g_assert(strcmp(qstring_get_str(str), test_cases[i].encoded) == 0);
             QDECREF(str);
         }
 
         QDECREF(qfloat);
     }
 }
-END_TEST
 
-START_TEST(vararg_number)
+static void vararg_number(void)
 {
     QObject *obj;
     QInt *qint;
@@ -254,85 +244,83 @@ START_TEST(vararg_number)
     double valuef = 2.323423423;
 
     obj = qobject_from_jsonf("%d", value);
-    fail_unless(obj != NULL);
-    fail_unless(qobject_type(obj) == QTYPE_QINT);
+    g_assert(obj != NULL);
+    g_assert(qobject_type(obj) == QTYPE_QINT);
 
     qint = qobject_to_qint(obj);
-    fail_unless(qint_get_int(qint) == value);
+    g_assert(qint_get_int(qint) == value);
 
     QDECREF(qint);
 
     obj = qobject_from_jsonf("%" PRId64, value64);
-    fail_unless(obj != NULL);
-    fail_unless(qobject_type(obj) == QTYPE_QINT);
+    g_assert(obj != NULL);
+    g_assert(qobject_type(obj) == QTYPE_QINT);
 
     qint = qobject_to_qint(obj);
-    fail_unless(qint_get_int(qint) == value64);
+    g_assert(qint_get_int(qint) == value64);
 
     QDECREF(qint);
 
     obj = qobject_from_jsonf("%f", valuef);
-    fail_unless(obj != NULL);
-    fail_unless(qobject_type(obj) == QTYPE_QFLOAT);
+    g_assert(obj != NULL);
+    g_assert(qobject_type(obj) == QTYPE_QFLOAT);
 
     qfloat = qobject_to_qfloat(obj);
-    fail_unless(qfloat_get_double(qfloat) == valuef);
+    g_assert(qfloat_get_double(qfloat) == valuef);
 
     QDECREF(qfloat);
 }
-END_TEST
 
-START_TEST(keyword_literal)
+static void keyword_literal(void)
 {
     QObject *obj;
     QBool *qbool;
     QString *str;
 
     obj = qobject_from_json("true");
-    fail_unless(obj != NULL);
-    fail_unless(qobject_type(obj) == QTYPE_QBOOL);
+    g_assert(obj != NULL);
+    g_assert(qobject_type(obj) == QTYPE_QBOOL);
 
     qbool = qobject_to_qbool(obj);
-    fail_unless(qbool_get_int(qbool) != 0);
+    g_assert(qbool_get_int(qbool) != 0);
 
     str = qobject_to_json(obj);
-    fail_unless(strcmp(qstring_get_str(str), "true") == 0);
+    g_assert(strcmp(qstring_get_str(str), "true") == 0);
     QDECREF(str);
 
     QDECREF(qbool);
 
     obj = qobject_from_json("false");
-    fail_unless(obj != NULL);
-    fail_unless(qobject_type(obj) == QTYPE_QBOOL);
+    g_assert(obj != NULL);
+    g_assert(qobject_type(obj) == QTYPE_QBOOL);
 
     qbool = qobject_to_qbool(obj);
-    fail_unless(qbool_get_int(qbool) == 0);
+    g_assert(qbool_get_int(qbool) == 0);
 
     str = qobject_to_json(obj);
-    fail_unless(strcmp(qstring_get_str(str), "false") == 0);
+    g_assert(strcmp(qstring_get_str(str), "false") == 0);
     QDECREF(str);
 
     QDECREF(qbool);
 
     obj = qobject_from_jsonf("%i", false);
-    fail_unless(obj != NULL);
-    fail_unless(qobject_type(obj) == QTYPE_QBOOL);
+    g_assert(obj != NULL);
+    g_assert(qobject_type(obj) == QTYPE_QBOOL);
 
     qbool = qobject_to_qbool(obj);
-    fail_unless(qbool_get_int(qbool) == 0);
+    g_assert(qbool_get_int(qbool) == 0);
 
     QDECREF(qbool);
     
     obj = qobject_from_jsonf("%i", true);
-    fail_unless(obj != NULL);
-    fail_unless(qobject_type(obj) == QTYPE_QBOOL);
+    g_assert(obj != NULL);
+    g_assert(qobject_type(obj) == QTYPE_QBOOL);
 
     qbool = qobject_to_qbool(obj);
-    fail_unless(qbool_get_int(qbool) != 0);
+    g_assert(qbool_get_int(qbool) != 0);
 
     QDECREF(qbool);
 }
-END_TEST
 
 typedef struct LiteralQDictEntry LiteralQDictEntry;
 typedef struct LiteralQObject LiteralQObject;
@@ -426,7 +414,7 @@ static int compare_litqobj_to_qobj(LiteralQObject *lhs, QObject *rhs)
     return 0;
 }
 
-START_TEST(simple_dict)
+static void simple_dict(void)
 {
     int i;
     struct {
@@ -460,26 +448,25 @@ START_TEST(simple_dict)
         QString *str;
 
         obj = qobject_from_json(test_cases[i].encoded);
-        fail_unless(obj != NULL);
-        fail_unless(qobject_type(obj) == QTYPE_QDICT);
+        g_assert(obj != NULL);
+        g_assert(qobject_type(obj) == QTYPE_QDICT);
 
-        fail_unless(compare_litqobj_to_qobj(&test_cases[i].decoded, obj) == 1);
+        g_assert(compare_litqobj_to_qobj(&test_cases[i].decoded, obj) == 1);
 
         str = qobject_to_json(obj);
         qobject_decref(obj);
 
         obj = qobject_from_json(qstring_get_str(str));
-        fail_unless(obj != NULL);
-        fail_unless(qobject_type(obj) == QTYPE_QDICT);
+        g_assert(obj != NULL);
+        g_assert(qobject_type(obj) == QTYPE_QDICT);
 
-        fail_unless(compare_litqobj_to_qobj(&test_cases[i].decoded, obj) == 1);
+        g_assert(compare_litqobj_to_qobj(&test_cases[i].decoded, obj) == 1);
         qobject_decref(obj);
         QDECREF(str);
     }
 }
-END_TEST
 
-START_TEST(simple_list)
+static void simple_list(void)
 {
     int i;
     struct {
@@ -524,26 +511,25 @@ START_TEST(simple_list)
         QString *str;
 
         obj = qobject_from_json(test_cases[i].encoded);
-        fail_unless(obj != NULL);
-        fail_unless(qobject_type(obj) == QTYPE_QLIST);
+        g_assert(obj != NULL);
+        g_assert(qobject_type(obj) == QTYPE_QLIST);
 
-        fail_unless(compare_litqobj_to_qobj(&test_cases[i].decoded, obj) == 1);
+        g_assert(compare_litqobj_to_qobj(&test_cases[i].decoded, obj) == 1);
 
         str = qobject_to_json(obj);
         qobject_decref(obj);
 
         obj = qobject_from_json(qstring_get_str(str));
-        fail_unless(obj != NULL);
-        fail_unless(qobject_type(obj) == QTYPE_QLIST);
+        g_assert(obj != NULL);
+        g_assert(qobject_type(obj) == QTYPE_QLIST);
 
-        fail_unless(compare_litqobj_to_qobj(&test_cases[i].decoded, obj) == 1);
+        g_assert(compare_litqobj_to_qobj(&test_cases[i].decoded, obj) == 1);
         qobject_decref(obj);
         QDECREF(str);
     }
 }
-END_TEST
 
-START_TEST(simple_whitespace)
+static void simple_whitespace(void)
 {
     int i;
     struct {
@@ -593,27 +579,26 @@ START_TEST(simple_whitespace)
         QString *str;
 
         obj = qobject_from_json(test_cases[i].encoded);
-        fail_unless(obj != NULL);
-        fail_unless(qobject_type(obj) == QTYPE_QLIST);
+        g_assert(obj != NULL);
+        g_assert(qobject_type(obj) == QTYPE_QLIST);
 
-        fail_unless(compare_litqobj_to_qobj(&test_cases[i].decoded, obj) == 1);
+        g_assert(compare_litqobj_to_qobj(&test_cases[i].decoded, obj) == 1);
 
         str = qobject_to_json(obj);
         qobject_decref(obj);
 
         obj = qobject_from_json(qstring_get_str(str));
-        fail_unless(obj != NULL);
-        fail_unless(qobject_type(obj) == QTYPE_QLIST);
+        g_assert(obj != NULL);
+        g_assert(qobject_type(obj) == QTYPE_QLIST);
 
-        fail_unless(compare_litqobj_to_qobj(&test_cases[i].decoded, obj) == 1);
+        g_assert(compare_litqobj_to_qobj(&test_cases[i].decoded, obj) == 1);
 
         qobject_decref(obj);
         QDECREF(str);
     }
 }
-END_TEST
 
-START_TEST(simple_varargs)
+static void simple_varargs(void)
 {
     QObject *embedded_obj;
     QObject *obj;
@@ -627,169 +612,122 @@ START_TEST(simple_varargs)
             {}}));
 
     embedded_obj = qobject_from_json("[32, 42]");
-    fail_unless(embedded_obj != NULL);
+    g_assert(embedded_obj != NULL);
 
     obj = qobject_from_jsonf("[%d, 2, %p]", 1, embedded_obj);
-    fail_unless(obj != NULL);
+    g_assert(obj != NULL);
 
-    fail_unless(compare_litqobj_to_qobj(&decoded, obj) == 1);
+    g_assert(compare_litqobj_to_qobj(&decoded, obj) == 1);
 
     qobject_decref(obj);
 }
-END_TEST
 
-START_TEST(empty_input)
+static void empty_input(void)
 {
     const char *empty = "";
 
     QObject *obj = qobject_from_json(empty);
-    fail_unless(obj == NULL);
+    g_assert(obj == NULL);
 }
-END_TEST
 
-START_TEST(unterminated_string)
+static void unterminated_string(void)
 {
     QObject *obj = qobject_from_json("\"abc");
-    fail_unless(obj == NULL);
+    g_assert(obj == NULL);
 }
-END_TEST
 
-START_TEST(unterminated_sq_string)
+static void unterminated_sq_string(void)
 {
     QObject *obj = qobject_from_json("'abc");
-    fail_unless(obj == NULL);
+    g_assert(obj == NULL);
 }
-END_TEST
 
-START_TEST(unterminated_escape)
+static void unterminated_escape(void)
 {
     QObject *obj = qobject_from_json("\"abc\\\"");
-    fail_unless(obj == NULL);
+    g_assert(obj == NULL);
 }
-END_TEST
 
-START_TEST(unterminated_array)
+static void unterminated_array(void)
 {
     QObject *obj = qobject_from_json("[32");
-    fail_unless(obj == NULL);
+    g_assert(obj == NULL);
 }
-END_TEST
 
-START_TEST(unterminated_array_comma)
+static void unterminated_array_comma(void)
 {
     QObject *obj = qobject_from_json("[32,");
-    fail_unless(obj == NULL);
+    g_assert(obj == NULL);
 }
-END_TEST
 
-START_TEST(invalid_array_comma)
+static void invalid_array_comma(void)
 {
     QObject *obj = qobject_from_json("[32,}");
-    fail_unless(obj == NULL);
+    g_assert(obj == NULL);
 }
-END_TEST
 
-START_TEST(unterminated_dict)
+static void unterminated_dict(void)
 {
     QObject *obj = qobject_from_json("{'abc':32");
-    fail_unless(obj == NULL);
+    g_assert(obj == NULL);
 }
-END_TEST
 
-START_TEST(unterminated_dict_comma)
+static void unterminated_dict_comma(void)
 {
     QObject *obj = qobject_from_json("{'abc':32,");
-    fail_unless(obj == NULL);
+    g_assert(obj == NULL);
 }
-END_TEST
 
 #if 0
-START_TEST(invalid_dict_comma)
+static void invalid_dict_comma(void)
 {
     QObject *obj = qobject_from_json("{'abc':32,}");
-    fail_unless(obj == NULL);
+    g_assert(obj == NULL);
 }
-END_TEST
 
-START_TEST(unterminated_literal)
+static void unterminated_literal(void)
 {
     QObject *obj = qobject_from_json("nul");
-    fail_unless(obj == NULL);
+    g_assert(obj == NULL);
 }
-END_TEST
 #endif
 
-static Suite *qjson_suite(void)
+int main(int argc, char **argv)
 {
-    Suite *suite;
-    TCase *string_literals, *number_literals, *keyword_literals;
-    TCase *dicts, *lists, *whitespace, *varargs, *errors;
-
-    string_literals = tcase_create("String Literals");
-    tcase_add_test(string_literals, simple_string);
-    tcase_add_test(string_literals, escaped_string);
-    tcase_add_test(string_literals, single_quote_string);
-    tcase_add_test(string_literals, vararg_string);
-
-    number_literals = tcase_create("Number Literals");
-    tcase_add_test(number_literals, simple_number);
-    tcase_add_test(number_literals, float_number);
-    tcase_add_test(number_literals, vararg_number);
-
-    keyword_literals = tcase_create("Keywords");
-    tcase_add_test(keyword_literals, keyword_literal);
-    dicts = tcase_create("Objects");
-    tcase_add_test(dicts, simple_dict);
-    lists = tcase_create("Lists");
-    tcase_add_test(lists, simple_list);
-
-    whitespace = tcase_create("Whitespace");
-    tcase_add_test(whitespace, simple_whitespace);
-
-    varargs = tcase_create("Varargs");
-    tcase_add_test(varargs, simple_varargs);
-
-    errors = tcase_create("Invalid JSON");
-    tcase_add_test(errors, empty_input);
-    tcase_add_test(errors, unterminated_string);
-    tcase_add_test(errors, unterminated_escape);
-    tcase_add_test(errors, unterminated_sq_string);
-    tcase_add_test(errors, unterminated_array);
-    tcase_add_test(errors, unterminated_array_comma);
-    tcase_add_test(errors, invalid_array_comma);
-    tcase_add_test(errors, unterminated_dict);
-    tcase_add_test(errors, unterminated_dict_comma);
+    g_test_init(&argc, &argv, NULL);
+
+    g_test_add_func("/literals/string/simple", simple_string);
+    g_test_add_func("/literals/string/escaped", escaped_string);
+    g_test_add_func("/literals/string/single_quote", single_quote_string);
+    g_test_add_func("/literals/string/vararg", vararg_string);
+
+    g_test_add_func("/literals/number/simple", simple_number);
+    g_test_add_func("/literals/number/float", float_number);
+    g_test_add_func("/literals/number/vararg", vararg_number);
+
+    g_test_add_func("/literals/keyword", keyword_literal);
+
+    g_test_add_func("/dicts/simple_dict", simple_dict);
+    g_test_add_func("/lists/simple_list", simple_list);
+
+    g_test_add_func("/whitespace/simple_whitespace", simple_whitespace);
+
+    g_test_add_func("/varargs/simple_varargs", simple_varargs);
+
+    g_test_add_func("/errors/empty_input", empty_input);
+    g_test_add_func("/errors/unterminated/string", unterminated_string);
+    g_test_add_func("/errors/unterminated/escape", unterminated_escape);
+    g_test_add_func("/errors/unterminated/sq_string", unterminated_sq_string);
+    g_test_add_func("/errors/unterminated/array", unterminated_array);
+    g_test_add_func("/errors/unterminated/array_comma", unterminated_array_comma);
+    g_test_add_func("/errors/unterminated/dict", unterminated_dict);
+    g_test_add_func("/errors/unterminated/dict_comma", unterminated_dict_comma);
+    g_test_add_func("/errors/invalid_array_comma", invalid_array_comma);
 #if 0
     /* FIXME: this print parse error messages on stderr.  */
-    tcase_add_test(errors, invalid_dict_comma);
-    tcase_add_test(errors, unterminated_literal);
+    g_test_add_func("/errors/invalid_dict_comma", invalid_dict_comma);
+    g_test_add_func("/errors/unterminated/literal", unterminated_literal);
 #endif
 
-    suite = suite_create("QJSON test-suite");
-    suite_add_tcase(suite, string_literals);
-    suite_add_tcase(suite, number_literals);
-    suite_add_tcase(suite, keyword_literals);
-    suite_add_tcase(suite, dicts);
-    suite_add_tcase(suite, lists);
-    suite_add_tcase(suite, whitespace);
-    suite_add_tcase(suite, varargs);
-    suite_add_tcase(suite, errors);
-
-    return suite;
-}
-
-int main(void)
-{
-    int nf;
-    Suite *s;
-    SRunner *sr;
-
-    s = qjson_suite();
-    sr = srunner_create(s);
-        
-    srunner_run_all(sr, CK_NORMAL);
-    nf = srunner_ntests_failed(sr);
-    srunner_free(sr);
-    
-    return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+    return g_test_run();
 }
diff --git a/configure b/configure
index 2ab7d6f..b2e622c 100755
--- a/configure
+++ b/configure
@@ -2800,9 +2800,9 @@ if test "$softmmu" = yes ; then
       tools="qemu-ga\$(EXESUF) $tools"
     fi
     if [ "$check_utests" = "yes" ]; then
-      checks="check-qjson $checks"
+      checks="$checks"
     fi
-    test_progs="$checks check-qdict check-qfloat check-qint check-qstring check-qlist test-coroutine test-qmp-output-visitor test-qmp-input-visitor"
+    test_progs="$checks check-qdict check-qfloat check-qint check-qstring check-qlist check-qjson test-coroutine test-qmp-output-visitor test-qmp-input-visitor"
   fi
 fi
 
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [Qemu-devel] [PATCH 09/15] check-qjson: enable disabled tests
  2012-01-10 19:10 [Qemu-devel] [PATCH 01/15] tests: mv tests/* -> tests/tcg Anthony Liguori
                   ` (6 preceding siblings ...)
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 08/15] check-qjson: " Anthony Liguori
@ 2012-01-10 19:10 ` Anthony Liguori
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 10/15] test: eliminate libcheck tests and have make check use gtester Anthony Liguori
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 25+ messages in thread
From: Anthony Liguori @ 2012-01-10 19:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori

gtest does the right thing here so there's no need to comment these tests out.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 check-qjson.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/check-qjson.c b/check-qjson.c
index 430f53b..526e25e 100644
--- a/check-qjson.c
+++ b/check-qjson.c
@@ -678,7 +678,6 @@ static void unterminated_dict_comma(void)
     g_assert(obj == NULL);
 }
 
-#if 0
 static void invalid_dict_comma(void)
 {
     QObject *obj = qobject_from_json("{'abc':32,}");
@@ -690,7 +689,6 @@ static void unterminated_literal(void)
     QObject *obj = qobject_from_json("nul");
     g_assert(obj == NULL);
 }
-#endif
 
 int main(int argc, char **argv)
 {
@@ -723,11 +721,8 @@ int main(int argc, char **argv)
     g_test_add_func("/errors/unterminated/dict", unterminated_dict);
     g_test_add_func("/errors/unterminated/dict_comma", unterminated_dict_comma);
     g_test_add_func("/errors/invalid_array_comma", invalid_array_comma);
-#if 0
-    /* FIXME: this print parse error messages on stderr.  */
     g_test_add_func("/errors/invalid_dict_comma", invalid_dict_comma);
     g_test_add_func("/errors/unterminated/literal", unterminated_literal);
-#endif
 
     return g_test_run();
 }
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [Qemu-devel] [PATCH 10/15] test: eliminate libcheck tests and have make check use gtester
  2012-01-10 19:10 [Qemu-devel] [PATCH 01/15] tests: mv tests/* -> tests/tcg Anthony Liguori
                   ` (7 preceding siblings ...)
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 09/15] check-qjson: enable disabled tests Anthony Liguori
@ 2012-01-10 19:10 ` Anthony Liguori
  2012-01-12 12:17   ` Eduardo Habkost
  2012-01-13 10:58   ` [Qemu-devel] --enable-check-utests gone, you may have to re-run configure (was: [PATCH 10/15] test: eliminate libcheck tests and have make check use gtester) Markus Armbruster
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 11/15] qtest: add test framework Anthony Liguori
                   ` (6 subsequent siblings)
  15 siblings, 2 replies; 25+ messages in thread
From: Anthony Liguori @ 2012-01-10 19:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 Makefile       |    4 ++--
 configure      |   32 --------------------------------
 tests/Makefile |   11 ++++++-----
 3 files changed, 8 insertions(+), 39 deletions(-)

diff --git a/Makefile b/Makefile
index 4823144..e2ec3d6 100644
--- a/Makefile
+++ b/Makefile
@@ -77,7 +77,7 @@ defconfig:
 
 -include config-all-devices.mak
 
-build-all: $(DOCS) $(TOOLS) $(CHECKS) recurse-all
+build-all: $(DOCS) $(TOOLS) recurse-all
 
 config-host.h: config-host.h-timestamp
 config-host.h-timestamp: config-host.mak
@@ -204,7 +204,7 @@ clean:
 # avoid old build problems by removing potentially incorrect old files
 	rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
 	rm -f qemu-options.def
-	rm -f *.o *.d *.a *.lo $(TOOLS) $(CHECKS) qemu-ga TAGS cscope.* *.pod *~ */*~
+	rm -f *.o *.d *.a *.lo $(TOOLS) qemu-ga TAGS cscope.* *.pod *~ */*~
 	rm -Rf .libs
 	rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d fsdev/*.o fsdev/*.d ui/*.o ui/*.d qapi/*.o qapi/*.d qga/*.o qga/*.d
 	rm -f qemu-img-cmds.h
diff --git a/configure b/configure
index b2e622c..b79289c 100755
--- a/configure
+++ b/configure
@@ -176,7 +176,6 @@ mixemu="no"
 aix="no"
 blobs="yes"
 pkgversion=""
-check_utests=""
 pie=""
 zero_malloc=""
 trace_backend="nop"
@@ -733,10 +732,6 @@ for opt do
   ;;
   --enable-fdt) fdt="yes"
   ;;
-  --disable-check-utests) check_utests="no"
-  ;;
-  --enable-check-utests) check_utests="yes"
-  ;;
   --disable-nptl) nptl="no"
   ;;
   --enable-nptl) nptl="yes"
@@ -1014,8 +1009,6 @@ echo "  --disable-curl           disable curl connectivity"
 echo "  --enable-curl            enable curl connectivity"
 echo "  --disable-fdt            disable fdt device tree"
 echo "  --enable-fdt             enable fdt device tree"
-echo "  --disable-check-utests   disable check unit-tests"
-echo "  --enable-check-utests    enable check unit-tests"
 echo "  --disable-bluez          disable bluez stack connectivity"
 echo "  --enable-bluez           enable bluez stack connectivity"
 echo "  --disable-slirp          disable SLIRP userspace network connectivity"
@@ -1923,26 +1916,6 @@ EOF
 fi # test "$curl"
 
 ##########################################
-# check framework probe
-
-if test "$check_utests" != "no" ; then
-  cat > $TMPC << EOF
-#include <check.h>
-int main(void) { suite_create("qemu test"); return 0; }
-EOF
-  check_libs=`$pkg_config --libs check 2>/dev/null`
-  if compile_prog "" $check_libs ; then
-    check_utests=yes
-    libs_tools="$check_libs $libs_tools"
-  else
-    if test "$check_utests" = "yes" ; then
-      feature_not_found "check"
-    fi
-    check_utests=no
-  fi
-fi # test "$check_utests"
-
-##########################################
 # bluez support probe
 if test "$bluez" != "no" ; then
   cat > $TMPC << EOF
@@ -2799,10 +2772,6 @@ if test "$softmmu" = yes ; then
     if [ "$guest_agent" = "yes" ]; then
       tools="qemu-ga\$(EXESUF) $tools"
     fi
-    if [ "$check_utests" = "yes" ]; then
-      checks="$checks"
-    fi
-    test_progs="$checks check-qdict check-qfloat check-qint check-qstring check-qlist check-qjson test-coroutine test-qmp-output-visitor test-qmp-input-visitor"
   fi
 fi
 
@@ -3274,7 +3243,6 @@ if test "$trace_default" = "yes"; then
 fi
 
 echo "TOOLS=$tools" >> $config_host_mak
-echo "CHECKS=$test_progs" >> $config_host_mak
 echo "ROMS=$roms" >> $config_host_mak
 echo "MAKE=$make" >> $config_host_mak
 echo "INSTALL=$install" >> $config_host_mak
diff --git a/tests/Makefile b/tests/Makefile
index cff9ff3..1105004 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,3 +1,7 @@
+CHECKS = check-qdict check-qfloat check-qint check-qstring check-qlist
+CHECKS += check-qjson test-qmp-output-visitor test-qmp-input-visitor
+CHECKS += test-coroutine
+
 check-qint.o check-qstring.o check-qdict.o check-qlist.o check-qfloat.o check-qjson.o test-coroutine.o: $(GENERATED_HEADERS)
 
 check-qint: check-qint.o qint.o $(tools-obj-y)
@@ -30,8 +34,5 @@ test-qmp-commands.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types
 test-qmp-commands: test-qmp-commands.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o $(qapi-dir)/test-qmp-marshal.o module.o
 
 .PHONY: check
-check: $(patsubst %,run-check-%,$(CHECKS))
-
-run-check-%: %
-	./$<
-
+check: $(CHECKS)
+	gtester $(CHECKS)
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [Qemu-devel] [PATCH 11/15] qtest: add test framework
  2012-01-10 19:10 [Qemu-devel] [PATCH 01/15] tests: mv tests/* -> tests/tcg Anthony Liguori
                   ` (8 preceding siblings ...)
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 10/15] test: eliminate libcheck tests and have make check use gtester Anthony Liguori
@ 2012-01-10 19:10 ` Anthony Liguori
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 12/15] qtest: add support for target-i386 -M pc Anthony Liguori
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 25+ messages in thread
From: Anthony Liguori @ 2012-01-10 19:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori

The idea behind qtest is pretty simple.  Instead of executing a CPU via TCG or
KVM, rely on an external process to send events to the device model that the CPU
would normally generate.

qtest presents itself as an accelerator.  In addition, a new option is added to
establish a qtest server (-qtest) that takes a character device.  This is what
allows the external process to send CPU events to the device model.

This is currently modelled after Xen since the Xen device model does something
very similar.  Instead of hooking cpu_exec, Xen sticks the CPU in the halted
state making sure it never gets to execute.  In addition, Xen replaces the LAPIC
with a dummy interrupt controller that forwards interrupt requests.

qtest does the exact same thing and uses a simple line based protocol to send
the events.  Documentation of that protocol is in qtest.c.

I considered reusing the monitor for this job.  Adding interrupts would be a bit
difficult.  In addition, logging would also be difficult.

qtest has extensive logging support.  All protocol commands are logged with
time stamps using a new command line option (-qtest-log).  Logging is important
since ultimately, this is a feature for debugging.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 Makefile.objs   |    2 +
 qemu-options.hx |    8 ++
 qtest.c         |  357 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 qtest.h         |   37 ++++++
 vl.c            |    8 ++
 5 files changed, 412 insertions(+), 0 deletions(-)
 create mode 100644 qtest.c
 create mode 100644 qtest.h

diff --git a/Makefile.objs b/Makefile.objs
index 4f6d26c..52b2faf 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -292,6 +292,8 @@ hw-obj-$(CONFIG_DP8393X) += dp8393x.o
 hw-obj-$(CONFIG_DS1225Y) += ds1225y.o
 hw-obj-$(CONFIG_MIPSNET) += mipsnet.o
 
+hw-obj-y += qtest.o
+
 # Sound
 sound-obj-y =
 sound-obj-$(CONFIG_SB16) += sb16.o
diff --git a/qemu-options.hx b/qemu-options.hx
index 7903e5c..3728e0d 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -2620,6 +2620,14 @@ the @var{simple} tracing backend.
 @end table
 ETEXI
 
+DEF("qtest", HAS_ARG, QEMU_OPTION_qtest,
+    "-qtest CHR      specify tracing options\n",
+    QEMU_ARCH_ALL)
+
+DEF("qtest-log", HAS_ARG, QEMU_OPTION_qtest_log,
+    "-qtest-log LOG  specify tracing options\n",
+    QEMU_ARCH_ALL)
+
 HXCOMM This is the last statement. Insert new options before this line!
 STEXI
 @end table
diff --git a/qtest.c b/qtest.c
new file mode 100644
index 0000000..f41a9c3
--- /dev/null
+++ b/qtest.c
@@ -0,0 +1,357 @@
+/*
+ * Test Server
+ *
+ * Copyright IBM, Corp. 2011
+ *
+ * Authors:
+ *  Anthony Liguori   <aliguori@us.ibm.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ *
+ */
+
+#include "qtest.h"
+#include "qemu-char.h"
+#include "ioport.h"
+#include "memory.h"
+#include "hw/irq.h"
+#include "sysemu.h"
+
+#define MAX_IRQ 256
+
+const char *qtest_chrdev;
+const char *qtest_log;
+int qtest_allowed = 0;
+
+static FILE *qtest_log_fp;
+static CharDriverState *qtest_chr;
+static GString *inbuf;
+static int irq_levels[MAX_IRQ];
+static struct timeval start_time;
+static bool qtest_opened;
+
+#define FMT_timeval "%" PRId64 ".%06" PRId64
+
+/**
+ * QTest Protocol
+ *
+ * Line based protocol, request/response based.  Server can send async messages
+ * so clients should always handle many async messages before the response
+ * comes in.
+ *
+ * Valid requests
+ *
+ *  > outb ADDR VALUE
+ *  < OK
+ *
+ *  > outw ADDR VALUE
+ *  < OK
+ *
+ *  > outl ADDR VALUE
+ *  < OK
+ *
+ *  > inb ADDR
+ *  < OK VALUE
+ *
+ *  > inw ADDR
+ *  < OK VALUE
+ *
+ *  > inl ADDR
+ *  < OK VALUE
+ *
+ *  > read ADDR SIZE
+ *  < OK DATA
+ *
+ *  > write ADDR SIZE DATA
+ *  < OK
+ *
+ * Valid async messages:
+ *
+ *  IRQ raise NUM
+ *  IRQ lower NUM
+ *
+ * ADDR, SIZE, VALUE are all integers parsed with strtoul() with a base of 0.
+ *
+ * DATA is an arbitrarily long hex number prefixed with '0x'.  If it's smaller
+ * than the expected size, the value will be zero filled at the end of the data
+ * sequence.
+ *
+ * NUM is an IRQ number.
+ */
+
+static int hex2nib(char ch)
+{
+    if (ch >= '0' && ch <= '9') {
+        return ch - '0';
+    } else if (ch >= 'a' && ch <= 'f') {
+        return 10 + (ch - 'a');
+    } else if (ch >= 'A' && ch <= 'F') {
+        return 10 + (ch - 'a');
+    } else {
+        return -1;
+    }
+}
+
+static void qtest_get_time(struct timeval *tv)
+{
+    gettimeofday(tv, NULL);
+    tv->tv_sec -= start_time.tv_sec;
+    tv->tv_usec -= start_time.tv_usec;
+    if (tv->tv_usec < 0) {
+        tv->tv_usec += 1000000;
+        tv->tv_sec -= 1;
+    }
+}
+
+static void qtest_send_prefix(CharDriverState *chr)
+{
+    struct timeval tv;
+
+    if (!qtest_log_fp || !qtest_opened) {
+        return;
+    }
+
+    qtest_get_time(&tv);
+    fprintf(qtest_log_fp, "[S +" FMT_timeval "] ",
+            tv.tv_sec, tv.tv_usec);
+}
+
+static void qtest_send(CharDriverState *chr, const char *fmt, ...)
+{
+    va_list ap;
+    char buffer[1024];
+    size_t len;
+
+    va_start(ap, fmt);
+    len = vsnprintf(buffer, sizeof(buffer), fmt, ap);
+    va_end(ap);
+
+    qemu_chr_fe_write(chr, (uint8_t *)buffer, len);
+    if (qtest_log_fp && qtest_opened) {
+        fprintf(qtest_log_fp, "%s", buffer);
+    }
+}
+
+static void qtest_process_command(CharDriverState *chr, gchar **words)
+{
+    const gchar *command;
+
+    g_assert(words);
+
+    command = words[0];
+
+    if (qtest_log_fp) {
+        struct timeval tv;
+        int i;
+
+        qtest_get_time(&tv);
+        fprintf(qtest_log_fp, "[R +" FMT_timeval "]",
+                tv.tv_sec, tv.tv_usec);
+        for (i = 0; words[i]; i++) {
+            fprintf(qtest_log_fp, " %s", words[i]);
+        }
+        fprintf(qtest_log_fp, "\n");
+    }
+
+    g_assert(command);
+    if (strcmp(words[0], "outb") == 0 ||
+        strcmp(words[0], "outw") == 0 ||
+        strcmp(words[0], "outl") == 0) {
+        uint16_t addr;
+        uint32_t value;
+
+        g_assert(words[1] && words[2]);
+        addr = strtol(words[1], NULL, 0);
+        value = strtol(words[2], NULL, 0);
+
+        if (words[0][3] == 'b') {
+            cpu_outb(addr, value);
+        } else if (words[0][3] == 'w') {
+            cpu_outw(addr, value);
+        } else if (words[0][3] == 'l') {
+            cpu_outl(addr, value);
+        }
+        qtest_send_prefix(chr);
+        qtest_send(chr, "OK\n");
+    } else if (strcmp(words[0], "inb") == 0 ||
+        strcmp(words[0], "inw") == 0 ||
+        strcmp(words[0], "inl") == 0) {
+        uint16_t addr;
+        uint32_t value = -1U;
+
+        g_assert(words[1]);
+        addr = strtol(words[1], NULL, 0);
+
+        if (words[0][2] == 'b') {
+            value = cpu_inb(addr);
+        } else if (words[0][2] == 'w') {
+            value = cpu_inw(addr);
+        } else if (words[0][2] == 'l') {
+            value = cpu_inl(addr);
+        }
+        qtest_send_prefix(chr);
+        qtest_send(chr, "OK 0x%04x\n", value);
+    } else if (strcmp(words[0], "read") == 0) {
+        uint64_t addr, len, i;
+        uint8_t *data;
+
+        g_assert(words[1] && words[2]);
+        addr = strtoul(words[1], NULL, 0);
+        len = strtoul(words[2], NULL, 0);
+
+        data = g_malloc(len);
+        cpu_physical_memory_read(addr, data, len);
+
+        qtest_send_prefix(chr);
+        qtest_send(chr, "OK 0x");
+        for (i = 0; i < len; i++) {
+            qtest_send(chr, "%02x", data[i]);
+        }
+        qtest_send(chr, "\n");
+
+        g_free(data);
+    } else if (strcmp(words[0], "write") == 0) {
+        uint64_t addr, len, i;
+        uint8_t *data;
+        size_t data_len;
+
+        g_assert(words[1] && words[2] && words[3]);
+        addr = strtoul(words[1], NULL, 0);
+        len = strtoul(words[2], NULL, 0);
+
+        data_len = strlen(words[3]);
+        if (data_len < 3) {
+            qtest_send(chr, "ERR invalid argument size\n");
+            return;
+        }
+
+        data = g_malloc(len);
+        for (i = 0; i < len; i++) {
+            if ((i * 2 + 4) <= data_len) {
+                data[i] = hex2nib(words[3][i * 2 + 2]) << 4;
+                data[i] |= hex2nib(words[3][i * 2 + 3]);
+            } else {
+                data[i] = 0;
+            }
+        }
+        cpu_physical_memory_write(addr, data, len);
+        g_free(data);
+
+        qtest_send_prefix(chr);
+        qtest_send(chr, "OK\n");
+    } else {
+        fprintf(stderr, "Unknown command `%s'\n", words[0]);
+    }
+}
+
+static void qtest_process_inbuf(CharDriverState *chr, GString *inbuf)
+{
+    char *end;
+
+    while ((end = strchr(inbuf->str, '\n')) != NULL) {
+        size_t offset;
+        GString *cmd;
+        gchar **words;
+
+        offset = end - inbuf->str;
+
+        cmd = g_string_new_len(inbuf->str, offset);
+        g_string_erase(inbuf, 0, offset + 1);
+
+        words = g_strsplit(cmd->str, " ", 0);
+        qtest_process_command(chr, words);
+        g_strfreev(words);
+
+        g_string_free(cmd, TRUE);
+    }
+}
+
+static void qtest_read(void *opaque, const uint8_t *buf, int size)
+{
+    CharDriverState *chr = opaque;
+
+    g_string_append_len(inbuf, (const gchar *)buf, size);
+    qtest_process_inbuf(chr, inbuf);
+}
+
+static int qtest_can_read(void *opaque)
+{
+    return 1024;
+}
+
+static void qtest_event(void *opaque, int event)
+{
+    int i;
+
+    switch (event) {
+    case CHR_EVENT_OPENED:
+        qemu_system_reset(false);
+        for (i = 0; i < ARRAY_SIZE(irq_levels); i++) {
+            irq_levels[i] = 0;
+        }
+        gettimeofday(&start_time, NULL);
+        qtest_opened = true;
+        if (qtest_log_fp) {
+            fprintf(qtest_log_fp, "[I " FMT_timeval "] OPENED\n",
+                    start_time.tv_sec, start_time.tv_usec);
+        }
+        break;
+    case CHR_EVENT_CLOSED:
+        qtest_opened = false;
+        if (qtest_log_fp) {
+            struct timeval tv;
+            qtest_get_time(&tv);
+            fprintf(qtest_log_fp, "[I +" FMT_timeval "] CLOSED\n",
+                    tv.tv_sec, tv.tv_usec);
+        }
+        break;
+    default:
+        break;
+    }
+}
+
+static void qtest_set_irq(void *opaque, int irq, int level)
+{
+    CharDriverState *chr = qtest_chr;
+    bool changed;
+
+    changed = (irq_levels[irq] != level);
+    irq_levels[irq] = level;
+
+    if (changed) {
+        qtest_send_prefix(chr);
+        qtest_send(chr, "IRQ %s %d\n",
+                   level ? "raise" : "lower", irq);
+    }
+}
+
+qemu_irq *qtest_interrupt_controller_init(void)
+{
+    return qemu_allocate_irqs(qtest_set_irq, NULL, MAX_IRQ);
+}
+
+int qtest_init(void)
+{
+    CharDriverState *chr;
+
+    g_assert(qtest_chrdev != NULL);
+
+    chr = qemu_chr_new("qtest", qtest_chrdev, NULL);
+
+    qemu_chr_add_handlers(chr, qtest_can_read, qtest_read, qtest_event, chr);
+
+    inbuf = g_string_new("");
+
+    if (qtest_log) {
+        if (strcmp(qtest_log, "none") != 0) {
+            qtest_log_fp = fopen(qtest_log, "w+");
+        }
+    } else {
+        qtest_log_fp = stderr;
+    }
+
+    qtest_chr = chr;
+
+    return 0;
+}
diff --git a/qtest.h b/qtest.h
new file mode 100644
index 0000000..f0e1377
--- /dev/null
+++ b/qtest.h
@@ -0,0 +1,37 @@
+/*
+ * Test Server
+ *
+ * Copyright IBM, Corp. 2011
+ *
+ * Authors:
+ *  Anthony Liguori   <aliguori@us.ibm.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ *
+ */
+
+#ifndef QTEST_H
+#define QTEST_H
+
+#include "qemu-common.h"
+
+extern int qtest_allowed;
+extern const char *qtest_chrdev;
+extern const char *qtest_log;
+
+static inline bool qtest_enabled(void)
+{
+    return qtest_allowed;
+}
+
+static inline int qtest_available(void)
+{
+    return 1;
+}
+
+int qtest_init(void);
+
+qemu_irq *qtest_interrupt_controller_init(void);
+
+#endif
diff --git a/vl.c b/vl.c
index ba55b35..58fb5d9 100644
--- a/vl.c
+++ b/vl.c
@@ -152,6 +152,7 @@ int main(int argc, char **argv)
 #ifdef CONFIG_VIRTFS
 #include "fsdev/qemu-fsdev.h"
 #endif
+#include "qtest.h"
 
 #include "disas.h"
 
@@ -1988,6 +1989,7 @@ static struct {
     { "tcg", "tcg", tcg_available, tcg_init, &tcg_allowed },
     { "xen", "Xen", xen_available, xen_init, &xen_allowed },
     { "kvm", "KVM", kvm_available, kvm_init, &kvm_allowed },
+    { "qtest", "QTest", qtest_available, qtest_init, &qtest_allowed },
 };
 
 static int configure_accelerator(void)
@@ -3053,6 +3055,12 @@ int main(int argc, char **argv, char **envp)
                     fclose(fp);
                     break;
                 }
+            case QEMU_OPTION_qtest:
+                qtest_chrdev = optarg;
+                break;
+            case QEMU_OPTION_qtest_log:
+                qtest_log = optarg;
+                break;
             default:
                 os_parse_cmd_args(popt->index, optarg);
             }
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [Qemu-devel] [PATCH 12/15] qtest: add support for target-i386 -M pc
  2012-01-10 19:10 [Qemu-devel] [PATCH 01/15] tests: mv tests/* -> tests/tcg Anthony Liguori
                   ` (9 preceding siblings ...)
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 11/15] qtest: add test framework Anthony Liguori
@ 2012-01-10 19:10 ` Anthony Liguori
  2012-01-10 19:56   ` Paolo Bonzini
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 13/15] qtest: add C version of test infrastructure Anthony Liguori
                   ` (4 subsequent siblings)
  15 siblings, 1 reply; 25+ messages in thread
From: Anthony Liguori @ 2012-01-10 19:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori

This involves forcing the CPU into the halted state if qtest is enabled and
replacing the local APIC with the qtest interrupt controller.

It should be pretty straight forward to do the same for other machine types on
other architectures.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 hw/pc.c      |    7 ++++++-
 hw/pc_piix.c |    9 ++++++---
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/hw/pc.c b/hw/pc.c
index 85304cf..fac5098 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -43,6 +43,7 @@
 #include "ui/qemu-spice.h"
 #include "memory.h"
 #include "exec-memory.h"
+#include "qtest.h"
 
 /* output Bochs bios info messages */
 //#define DEBUG_BIOS
@@ -926,7 +927,11 @@ static void pc_cpu_reset(void *opaque)
     CPUState *env = opaque;
 
     cpu_reset(env);
-    env->halted = !cpu_is_bsp(env);
+    if (qtest_enabled()) {
+        env->halted = 1;
+    } else {
+        env->halted = !cpu_is_bsp(env);
+    }
 }
 
 static CPUState *pc_new_cpu(const char *cpu_model)
diff --git a/hw/pc_piix.c b/hw/pc_piix.c
index b70431f..2aba89c 100644
--- a/hw/pc_piix.c
+++ b/hw/pc_piix.c
@@ -46,6 +46,7 @@
 #ifdef CONFIG_XEN
 #  include <xen/hvm/hvm_info_table.h>
 #endif
+#include "qtest.h"
 
 #define MAX_IDE_BUS 2
 
@@ -154,11 +155,13 @@ static void pc_init1(MemoryRegion *system_memory,
     }
     isa_bus_irqs(isa_bus, gsi);
 
-    if (!xen_enabled()) {
+    if (xen_enabled()) {
+        i8259 = xen_interrupt_controller_init();
+    } else if (qtest_enabled()) {
+        i8259 = qtest_interrupt_controller_init();
+    } else {
         cpu_irq = pc_allocate_cpu_irq();
         i8259 = i8259_init(isa_bus, cpu_irq[0]);
-    } else {
-        i8259 = xen_interrupt_controller_init();
     }
 
     for (i = 0; i < ISA_NUM_IRQS; i++) {
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [Qemu-devel] [PATCH 13/15] qtest: add C version of test infrastructure
  2012-01-10 19:10 [Qemu-devel] [PATCH 01/15] tests: mv tests/* -> tests/tcg Anthony Liguori
                   ` (10 preceding siblings ...)
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 12/15] qtest: add support for target-i386 -M pc Anthony Liguori
@ 2012-01-10 19:10 ` Anthony Liguori
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 14/15] make: add check targets based on gtester Anthony Liguori
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 25+ messages in thread
From: Anthony Liguori @ 2012-01-10 19:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori

This also includes a qtest wrapper script to make it easier to launch qtest
tests directly.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 scripts/qtest    |    5 +
 tests/Makefile   |    2 +
 tests/libqtest.c |  330 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/libqtest.h |   63 ++++++++++
 4 files changed, 400 insertions(+), 0 deletions(-)
 create mode 100755 scripts/qtest
 create mode 100644 tests/libqtest.c
 create mode 100644 tests/libqtest.h

diff --git a/scripts/qtest b/scripts/qtest
new file mode 100755
index 0000000..5cff3d4
--- /dev/null
+++ b/scripts/qtest
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+export QTEST_QEMU_BINARY=$1
+shift
+eval "$@"
diff --git a/tests/Makefile b/tests/Makefile
index 1105004..0005764 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -33,6 +33,8 @@ test-qmp-input-visitor: test-qmp-input-visitor.o $(qobject-obj-y) $(qapi-obj-y)
 test-qmp-commands.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h test-qmp-marshal.c test-qmp-commands.h) $(qapi-obj-y)
 test-qmp-commands: test-qmp-commands.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o $(qapi-dir)/test-qmp-marshal.o module.o
 
+tests/rtc-test: tests/rtc-test.o tests/libqtest.o
+
 .PHONY: check
 check: $(CHECKS)
 	gtester $(CHECKS)
diff --git a/tests/libqtest.c b/tests/libqtest.c
new file mode 100644
index 0000000..3f57c29
--- /dev/null
+++ b/tests/libqtest.c
@@ -0,0 +1,330 @@
+/*
+ * QTest
+ *
+ * Copyright IBM, Corp. 2012
+ *
+ * Authors:
+ *  Anthony Liguori   <aliguori@us.ibm.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ *
+ */
+#include "libqtest.h"
+
+#include <glib.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/wait.h>
+#include <sys/un.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+
+#define MAX_IRQ 256
+
+QTestState *global_qtest;
+
+struct QTestState
+{
+    int fd;
+    bool irq_level[MAX_IRQ];
+    GString *rx;
+    gchar *pid_file;
+};
+
+#define g_assert_no_errno(ret) do { \
+    g_assert_cmpint(ret, !=, -1); \
+} while (0)
+
+QTestState *qtest_init(const char *extra_args)
+{
+    QTestState *s;
+    struct sockaddr_un addr;
+    int sock, ret, i;
+    gchar *socket_path;
+    gchar *pid_file;
+    gchar *command;
+    const char *qemu_binary;
+    pid_t pid;
+
+    qemu_binary = getenv("QTEST_QEMU_BINARY");
+    g_assert(qemu_binary != NULL);
+
+    socket_path = g_strdup_printf("/tmp/qtest-%d.sock", getpid());
+    pid_file = g_strdup_printf("/tmp/qtest-%d.pid", getpid());
+
+    s = g_malloc(sizeof(*s));
+
+    sock = socket(PF_UNIX, SOCK_STREAM, 0);
+    g_assert_no_errno(sock);
+
+    addr.sun_family = AF_UNIX;
+    snprintf(addr.sun_path, sizeof(addr.sun_path), "%s", socket_path);
+
+    pid = fork();
+    if (pid == 0) {
+        command = g_strdup_printf("%s "
+                                  "-qtest unix:%s,server,nowait "
+                                  "-pidfile %s "
+                                  "-machine accel=qtest "
+                                  "%s", qemu_binary, socket_path,
+                                  pid_file,
+                                  extra_args ?: "");
+
+        ret = system(command);
+        exit(ret);
+        g_free(command);
+    }
+
+    do {
+        sleep(1);
+        ret = connect(sock, (struct sockaddr *)&addr, sizeof(addr));
+    } while (ret == -1);
+    g_assert_no_errno(ret);
+
+    s->fd = sock;
+    s->rx = g_string_new("");
+    s->pid_file = pid_file;
+    for (i = 0; i < MAX_IRQ; i++) {
+        s->irq_level[i] = false;
+    }
+
+    g_free(socket_path);
+
+    return s;
+}
+
+void qtest_quit(QTestState *s)
+{
+    FILE *f;
+    char buffer[1024];
+
+    f = fopen(s->pid_file, "r");
+    if (f) {
+        if (fgets(buffer, sizeof(buffer), f)) {
+            pid_t pid = atoi(buffer);
+            int status = 0;
+
+            kill(pid, SIGTERM);
+            waitpid(pid, &status, 0);
+        }
+
+        fclose(f);
+    }
+}
+
+static void qtest_sendf(QTestState *s, const char *fmt, ...)
+{
+    va_list ap;
+    gchar *str;
+    size_t size, offset;
+
+    va_start(ap, fmt);
+    str = g_strdup_vprintf(fmt, ap);
+    va_end(ap);
+    size = strlen(str);
+
+    offset = 0;
+    while (offset < size) {
+        ssize_t len;
+
+        len = write(s->fd, str + offset, size - offset);
+        if (len == -1 && errno == EINTR) {
+            continue;
+        }
+
+        g_assert_no_errno(len);
+        g_assert_cmpint(len, >, 0);
+
+        offset += len;
+    }
+}
+
+static GString *qtest_recv_line(QTestState *s)
+{
+    GString *line;
+    size_t offset;
+    char *eol;
+
+    while ((eol = strchr(s->rx->str, '\n')) == NULL) {
+        ssize_t len;
+        char buffer[1024];
+
+        len = read(s->fd, buffer, sizeof(buffer));
+        if (len == -1 && errno == EINTR) {
+            continue;
+        }
+
+        if (len == -1 || len == 0) {
+            fprintf(stderr, "Broken pipe\n");
+            exit(1);
+        }
+
+        g_string_append_len(s->rx, buffer, len);
+    }
+
+    offset = eol - s->rx->str;
+    line = g_string_new_len(s->rx->str, offset);
+    g_string_erase(s->rx, 0, offset + 1);
+
+    return line;
+}
+
+static gchar **qtest_rsp(QTestState *s, int expected_args)
+{
+    GString *line;
+    gchar **words;
+    int i;
+
+redo:
+    line = qtest_recv_line(s);
+    words = g_strsplit(line->str, " ", 0);
+    g_string_free(line, TRUE);
+
+    if (strcmp(words[0], "IRQ") == 0) {
+        int irq;
+
+        g_assert(words[1] != NULL);
+        g_assert(words[2] != NULL);
+
+        irq = strtoul(words[2], NULL, 0);
+        g_assert_cmpint(irq, >=, 0);
+        g_assert_cmpint(irq, <, MAX_IRQ);
+
+        if (strcmp(words[1], "raise") == 0) {
+            s->irq_level[irq] = true;
+        } else {
+            s->irq_level[irq] = false;
+        }
+
+        g_strfreev(words);
+        goto redo;
+    }
+
+    g_assert(words[0] != NULL);
+    g_assert_cmpstr(words[0], ==, "OK");
+
+    if (expected_args) {
+        for (i = 0; i < expected_args; i++) {
+            g_assert(words[i] != NULL);
+        }
+    } else {
+        g_strfreev(words);
+    }
+    
+    return words;
+}
+
+const char *qtest_get_arch(void)
+{
+    const char *qemu = getenv("QTEST_QEMU_BINARY");
+    const char *end = strrchr(qemu, '/');
+
+    return end + strlen("/qemu-system-");
+}
+
+bool qtest_get_irq(QTestState *s, int num)
+{
+    return s->irq_level[num];
+}
+
+static void qtest_out(QTestState *s, const char *cmd, uint16_t addr, uint32_t value)
+{
+    qtest_sendf(s, "%s 0x%x 0x%x\n", cmd, addr, value);
+    qtest_rsp(s, 0);
+}
+
+void qtest_outb(QTestState *s, uint16_t addr, uint8_t value)
+{
+    qtest_out(s, "outb", addr, value);
+}
+
+void qtest_outw(QTestState *s, uint16_t addr, uint16_t value)
+{
+    qtest_out(s, "outw", addr, value);
+}
+
+void qtest_outl(QTestState *s, uint16_t addr, uint32_t value)
+{
+    qtest_out(s, "outl", addr, value);
+}
+
+static uint32_t qtest_in(QTestState *s, const char *cmd, uint16_t addr)
+{
+    gchar **args;
+    uint32_t value;
+
+    qtest_sendf(s, "%s 0x%x\n", cmd, addr);
+    args = qtest_rsp(s, 2);
+    value = strtoul(args[1], NULL, 0);
+    g_strfreev(args);
+
+    return value;
+}
+
+uint8_t qtest_inb(QTestState *s, uint16_t addr)
+{
+    return qtest_in(s, "inb", addr);
+}
+
+uint16_t qtest_inw(QTestState *s, uint16_t addr)
+{
+    return qtest_in(s, "inw", addr);
+}
+
+uint32_t qtest_inl(QTestState *s, uint16_t addr)
+{
+    return qtest_in(s, "inl", addr);
+}
+
+static int hex2nib(char ch)
+{
+    if (ch >= '0' && ch <= '9') {
+        return ch - '0';
+    } else if (ch >= 'a' && ch <= 'f') {
+        return 10 + (ch - 'a');
+    } else if (ch >= 'A' && ch <= 'F') {
+        return 10 + (ch - 'a');
+    } else {
+        return -1;
+    }
+}
+
+void qtest_memread(QTestState *s, uint64_t addr, void *data, size_t size)
+{
+    uint8_t *ptr = data;
+    gchar **args;
+    size_t i;
+
+    qtest_sendf(s, "read 0x%x 0x%x\n", addr, size);
+    args = qtest_rsp(s, 2);
+
+    for (i = 0; i < size; i++) {
+        ptr[i] = hex2nib(args[1][2 + (i * 2)]) << 4;
+        ptr[i] |= hex2nib(args[1][2 + (i * 2) + 1]);
+    }
+
+    g_strfreev(args);
+}
+
+void qtest_add_func(const char *str, void (*fn))
+{
+    gchar *path = g_strdup_printf("/%s/%s", qtest_get_arch(), str);
+    g_test_add_func(path, fn);
+}
+
+void qtest_memwrite(QTestState *s, uint64_t addr, const void *data, size_t size)
+{
+    const uint8_t *ptr = data;
+    size_t i;
+
+    qtest_sendf(s, "write 0x%x 0x%x 0x", addr, size);
+    for (i = 0; i < size; i++) {
+        qtest_sendf(s, "%02x", ptr[i]);
+    }
+    qtest_sendf(s, "\n");
+    qtest_rsp(s, 0);
+}
diff --git a/tests/libqtest.h b/tests/libqtest.h
new file mode 100644
index 0000000..dd82926
--- /dev/null
+++ b/tests/libqtest.h
@@ -0,0 +1,63 @@
+/*
+ * QTest
+ *
+ * Copyright IBM, Corp. 2012
+ *
+ * Authors:
+ *  Anthony Liguori   <aliguori@us.ibm.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ *
+ */
+#ifndef LIBQTEST_H
+#define LIBQTEST_H
+
+#include <stdint.h>
+#include <stdbool.h>
+#include <sys/types.h>
+
+typedef struct QTestState QTestState;
+
+extern QTestState *global_qtest;
+
+QTestState *qtest_init(const char *extra_args);
+void qtest_quit(QTestState *s);
+
+bool qtest_get_irq(QTestState *s, int num);
+
+void qtest_outb(QTestState *s, uint16_t addr, uint8_t value);
+
+void qtest_outw(QTestState *s, uint16_t addr, uint16_t value);
+
+void qtest_outl(QTestState *s, uint16_t addr, uint32_t value);
+
+uint8_t qtest_inb(QTestState *s, uint16_t addr);
+
+uint16_t qtest_inw(QTestState *s, uint16_t addr);
+
+uint32_t qtest_inl(QTestState *s, uint16_t addr);
+
+void qtest_memread(QTestState *s, uint64_t addr, void *data, size_t size);
+
+void qtest_memwrite(QTestState *s, uint64_t addr, const void *data, size_t size);
+
+const char *qtest_get_arch(void);
+
+void qtest_add_func(const char *str, void (*fn));
+
+#define qtest_start(args) (            \
+    global_qtest = qtest_init((args)) \
+        )
+
+#define get_irq(num) qtest_get_irq(global_qtest, (num))
+#define outb(addr, val) qtest_outb(global_qtest, (addr), (val))
+#define outw(addr, val) qtest_outw(global_qtest, (addr), (val))
+#define outl(addr, val) qtest_outl(global_qtest, (addr), (val))
+#define inb(addr) qtest_inb(global_qtest, (addr))
+#define inw(addr) qtest_inw(global_qtest, (addr))
+#define inl(addr) qtest_inl(global_qtest, (addr))
+#define memread(addr, data, size) qtest_memread(global_qtest, (addr), (data), (size))
+#define memwrite(addr, data, size) qtest_memwrite(global_qtest, (addr), (data), (size))
+
+#endif
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [Qemu-devel] [PATCH 14/15] make: add check targets based on gtester
  2012-01-10 19:10 [Qemu-devel] [PATCH 01/15] tests: mv tests/* -> tests/tcg Anthony Liguori
                   ` (11 preceding siblings ...)
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 13/15] qtest: add C version of test infrastructure Anthony Liguori
@ 2012-01-10 19:10 ` Anthony Liguori
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 15/15] qtest: add rtc-test test-case Anthony Liguori
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 25+ messages in thread
From: Anthony Liguori @ 2012-01-10 19:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori

This will run all tests through gtester.  The main targets are:

$ make check

Which will run each unit test and:

$ make check-report.html

Which will generate a nice HTML report of the test status.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 scripts/gtester-cat |   32 ++++++++++++++++++++++++++++
 tests/Makefile      |   58 ++++++++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 87 insertions(+), 3 deletions(-)
 create mode 100755 scripts/gtester-cat

diff --git a/scripts/gtester-cat b/scripts/gtester-cat
new file mode 100755
index 0000000..afd8c3e
--- /dev/null
+++ b/scripts/gtester-cat
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# Copyright IBM, Corp. 2012
+#
+# Authors:
+#  Anthony Liguori <aliguori@us.ibm.com>
+#
+# This work is licensed under the terms of the GNU GPLv2 or later.
+# See the COPYING file in the top-level directory.
+
+cat <<EOF
+<?xml version="1.0"?>
+<gtester>
+EOF
+
+for file in "$@"; do
+    first="yes"
+    cat $file | while read LINE; do
+	if test "$first" = "yes"; then
+	    first="no"
+	    continue
+	fi
+	if test "$LINE" = "<gtester>" -o "$LINE" = "</gtester>"; then
+	    continue
+	fi
+	echo $LINE
+    done
+done
+
+cat<<EOF
+</gtester>
+EOF
diff --git a/tests/Makefile b/tests/Makefile
index 0005764..63b835d 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -2,6 +2,10 @@ CHECKS = check-qdict check-qfloat check-qint check-qstring check-qlist
 CHECKS += check-qjson test-qmp-output-visitor test-qmp-input-visitor
 CHECKS += test-coroutine
 
+HW_TESTS=
+
+TARGETS=$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_DIRS)))
+
 check-qint.o check-qstring.o check-qdict.o check-qlist.o check-qfloat.o check-qjson.o test-coroutine.o: $(GENERATED_HEADERS)
 
 check-qint: check-qint.o qint.o $(tools-obj-y)
@@ -35,6 +39,54 @@ test-qmp-commands: test-qmp-commands.o $(qobject-obj-y) $(qapi-obj-y) $(tools-ob
 
 tests/rtc-test: tests/rtc-test.o tests/libqtest.o
 
-.PHONY: check
-check: $(CHECKS)
-	gtester $(CHECKS)
+check-help:
+	@echo "Regression targets:"
+	@echo
+	@echo " make check                Run all tests"
+	@echo " make check-qtest          Run qtest tests"
+	@echo " make check-unit           Run qobject tests"
+	@echo " make check-report.html    Generates an HTML test report"
+	@echo
+	@echo "Please note that HTML reports do not regenerate if the unit tests"
+	@echo "has not changed."
+	@echo
+	@echo "The variable SPEED can be set to control the gtester speed setting"
+
+.SECONDARY:
+
+SPEED ?= quick
+
+# Reports
+check-report-qtest-%.log: $(HW_TESTS)
+	$(call quiet-command,QTEST_QEMU_BINARY=`basename $@ .log | cut -f4 -d-`-softmmu/qemu-system-`basename $@ .log | cut -f4 -d-` \
+	  gtester -k -q -o $@ -m=$(SPEED) $(HW_TESTS),"  TEST   $^ (`basename $@ .log | cut -f4 -d-`)")
+
+check-report-unit.log: $(CHECKS)
+	$(call quiet-command,gtester -k -q -m=$(SPEED) -o $@ $^, "  TEST   $^")
+
+check-report.log: check-report-unit.log $(patsubst %,check-report-qtest-%.log, $(TARGETS))
+	$(call quiet-command,$(SRC_PATH)/scripts/gtester-cat $^ > $@, "  GEN    $@")
+
+check-report.html: check-report.log
+	$(call quiet-command,gtester-report $< > $@, "  GEN    $@")
+
+# Check tests
+
+check-qtest-%: $(HW_TESTS)
+	@for test in $^; do \
+	    arch=`echo $@ | cut -f3- -d-`; \
+	    echo "Running '$$test' with qemu-system-$$arch..."; \
+	    $(SRC_PATH)/scripts/qtest $$arch-softmmu/qemu-system-$$arch $$test || exit $?; \
+	done
+
+check-qtest: $(patsubst %,check-qtest-%, $(TARGETS))
+
+check-unit: $(CHECKS)
+	@for test in $^; do \
+	    echo "Running '$$test'..."; \
+	    ./$$test || exit $?; \
+	done
+
+check: check-unit check-qtest
+
+.PHONY: check-help check-qtest check-unit check
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [Qemu-devel] [PATCH 15/15] qtest: add rtc-test test-case
  2012-01-10 19:10 [Qemu-devel] [PATCH 01/15] tests: mv tests/* -> tests/tcg Anthony Liguori
                   ` (12 preceding siblings ...)
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 14/15] make: add check targets based on gtester Anthony Liguori
@ 2012-01-10 19:10 ` Anthony Liguori
  2012-01-10 19:59   ` Paolo Bonzini
  2012-01-10 22:35 ` [Qemu-devel] [PATCH 01/15] tests: mv tests/* -> tests/tcg Andreas Färber
  2012-01-12 16:53 ` Anthony Liguori
  15 siblings, 1 reply; 25+ messages in thread
From: Anthony Liguori @ 2012-01-10 19:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 tests/Makefile   |    2 +-
 tests/rtc-test.c |  222 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 223 insertions(+), 1 deletions(-)
 create mode 100644 tests/rtc-test.c

diff --git a/tests/Makefile b/tests/Makefile
index 63b835d..a90eaff 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -2,7 +2,7 @@ CHECKS = check-qdict check-qfloat check-qint check-qstring check-qlist
 CHECKS += check-qjson test-qmp-output-visitor test-qmp-input-visitor
 CHECKS += test-coroutine
 
-HW_TESTS=
+HW_TESTS=tests/rtc-test
 
 TARGETS=$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_DIRS)))
 
diff --git a/tests/rtc-test.c b/tests/rtc-test.c
new file mode 100644
index 0000000..ff67e56
--- /dev/null
+++ b/tests/rtc-test.c
@@ -0,0 +1,222 @@
+/*
+ * QTest
+ *
+ * Copyright IBM, Corp. 2012
+ *
+ * Authors:
+ *  Anthony Liguori   <aliguori@us.ibm.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ *
+ */
+#include "libqtest.h"
+
+#include <glib.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+static uint8_t base = 0x70;
+
+static int bcd2dec(int value)
+{
+    return (((value >> 4) & 0x0F) * 10) + (value & 0x0F);
+}
+
+#if 0
+static int dec2bcd(int value)
+{
+    return ((value / 10) << 4) | (value % 10);
+}
+#endif
+
+static uint8_t cmos_read(uint8_t reg)
+{
+    outb(base + 0, reg);
+    return inb(base + 1);
+}
+
+static void cmos_write(uint8_t reg, uint8_t val)
+{
+    outb(base + 0, reg);
+    outb(base + 1, val);
+}
+
+static int tm_cmp(struct tm *lhs, struct tm *rhs)
+{
+    time_t a, b;
+    struct tm d1, d2;
+
+    memcpy(&d1, lhs, sizeof(d1));
+    memcpy(&d2, rhs, sizeof(d2));
+
+    a = mktime(&d1);
+    b = mktime(&d2);
+
+    if (a < b) {
+        return -1;
+    } else if (a > b) {
+        return 1;
+    }
+
+    return 0;
+}
+
+#if 0
+static void print_tm(struct tm *tm)
+{
+    printf("%04d-%02d-%02d %02d:%02d:%02d\n",
+           tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, 
+           tm->tm_hour, tm->tm_min, tm->tm_sec, tm->tm_gmtoff);
+}
+#endif
+
+static void cmos_get_date_time(struct tm *date)
+{
+    int base_year = 2000, hour_offset;
+    int sec, min, hour, mday, mon, year;
+    time_t ts;
+    struct tm dummy;
+
+    sec = cmos_read(0x00);
+    min = cmos_read(0x02);
+    hour = cmos_read(0x04);
+    mday = cmos_read(0x07);
+    mon = cmos_read(0x08);
+    year = cmos_read(0x09);
+
+    if ((cmos_read(0x0B) & 4) == 0) {
+        sec = bcd2dec(sec);
+        min = bcd2dec(min);
+        hour = bcd2dec(hour);
+        mday = bcd2dec(mday);
+        mon = bcd2dec(mon);
+        year = bcd2dec(year);
+        hour_offset = 80;
+    } else {
+        hour_offset = 0x80;
+    }
+
+    if ((cmos_read(0x0B) & 2) == 0) {
+        if (hour >= hour_offset) {
+            hour -= hour_offset;
+            hour += 12;
+        }
+    }
+
+    ts = time(NULL);
+    localtime_r(&ts, &dummy);
+
+    date->tm_isdst = dummy.tm_isdst;
+    date->tm_sec = sec;
+    date->tm_min = min;
+    date->tm_hour = hour;
+    date->tm_mday = mday;
+    date->tm_mon = mon - 1;
+    date->tm_year = base_year + year - 1900;
+    date->tm_gmtoff = 0;
+
+    ts = mktime(date);
+}
+
+static void check_time(int wiggle)
+{
+    struct tm start, date[4], end;
+    struct tm *datep;
+    time_t ts;
+
+    /*
+     * This check assumes a few things.  First, we cannot guarantee that we get
+     * a consistent reading from the wall clock because we may hit an edge of
+     * the clock while reading.  To work around this, we read four clock readings
+     * such that at least two of them should match.  We need to assume that one
+     * reading is corrupt so we need four readings to ensure that we have at
+     * least two consecutive identical readings
+     *
+     * It's also possible that we'll cross an edge reading the host clock so
+     * simply check to make sure that the clock reading is within the period of
+     * when we expect it to be.
+     */
+
+    ts = time(NULL);
+    gmtime_r(&ts, &start);
+
+    cmos_get_date_time(&date[0]);
+    cmos_get_date_time(&date[1]);
+    cmos_get_date_time(&date[2]);
+    cmos_get_date_time(&date[3]);
+
+    ts = time(NULL);
+    gmtime_r(&ts, &end);
+
+    if (tm_cmp(&date[0], &date[1]) == 0) {
+        datep = &date[0];
+    } else if (tm_cmp(&date[1], &date[2]) == 0) {
+        datep = &date[1];
+    } else if (tm_cmp(&date[2], &date[3]) == 0) {
+        datep = &date[2];
+    } else {
+        g_assert_not_reached();
+    }
+
+    if (!(tm_cmp(&start, datep) <= 0 && tm_cmp(datep, &end) <= 0)) {
+        time_t t, s;
+
+        start.tm_isdst = datep->tm_isdst;
+
+        t = mktime(datep);
+        s = mktime(&start);
+        if (t < s) {
+            g_test_message("RTC is %ld second(s) behind wall-clock\n", (s - t));
+        } else {
+            g_test_message("RTC is %ld second(s) ahead of wall-clock\n", (t - s));
+        }
+
+        g_assert_cmpint(ABS(t - s), <=, wiggle);
+    }
+}
+
+static int wiggle = 2;
+
+static void bcd_check_time(void)
+{
+    /* Set BCD mode */
+    cmos_write(0x0B, cmos_read(0x0B) | 0x02);
+    check_time(wiggle);
+}
+
+static void dec_check_time(void)
+{
+    /* Set DEC mode */
+    cmos_write(0x0B, cmos_read(0x0B) & ~0x02);
+    check_time(wiggle);
+}
+
+int main(int argc, char **argv)
+{
+    const char *arch;
+    QTestState *s = NULL;
+    int ret;
+
+    g_test_init(&argc, &argv, NULL);
+
+    arch = qtest_get_arch();
+    /* These tests only work on i386 and x86_64 */
+    if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
+        s = qtest_start("-vnc none");
+
+        qtest_add_func("/rtc/bcd/check-time", bcd_check_time);
+        qtest_add_func("/rtc/dec/check-time", dec_check_time);
+    } else {
+        g_test_message("Skipping unsupported arch `%s'\n", arch);
+    }
+
+    ret = g_test_run();
+
+    if (s) {
+        qtest_quit(s);
+    }
+
+    return ret;
+}
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] [PATCH 12/15] qtest: add support for target-i386 -M pc
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 12/15] qtest: add support for target-i386 -M pc Anthony Liguori
@ 2012-01-10 19:56   ` Paolo Bonzini
  2012-01-11 19:44     ` Anthony Liguori
  0 siblings, 1 reply; 25+ messages in thread
From: Paolo Bonzini @ 2012-01-10 19:56 UTC (permalink / raw)
  To: qemu-devel

On 01/10/2012 08:10 PM, Anthony Liguori wrote:
> This involves forcing the CPU into the halted state if qtest is enabled and
> replacing the local APIC with the qtest interrupt controller.
>
> It should be pretty straight forward to do the same for other machine types on
> other architectures.
>
> Signed-off-by: Anthony Liguori<aliguori@us.ibm.com>
> ---
>   hw/pc.c      |    7 ++++++-
>   hw/pc_piix.c |    9 ++++++---
>   2 files changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/hw/pc.c b/hw/pc.c
> index 85304cf..fac5098 100644
> --- a/hw/pc.c
> +++ b/hw/pc.c
> @@ -43,6 +43,7 @@
>   #include "ui/qemu-spice.h"
>   #include "memory.h"
>   #include "exec-memory.h"
> +#include "qtest.h"
>
>   /* output Bochs bios info messages */
>   //#define DEBUG_BIOS
> @@ -926,7 +927,11 @@ static void pc_cpu_reset(void *opaque)
>       CPUState *env = opaque;
>
>       cpu_reset(env);
> -    env->halted = !cpu_is_bsp(env);
> +    if (qtest_enabled()) {
> +        env->halted = 1;
> +    } else {
> +        env->halted = !cpu_is_bsp(env);
> +    }

This is wrong.  qtest and Xen should simply not create the CPU threads 
at all.

Paolo

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] [PATCH 15/15] qtest: add rtc-test test-case
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 15/15] qtest: add rtc-test test-case Anthony Liguori
@ 2012-01-10 19:59   ` Paolo Bonzini
  2012-01-11 17:06     ` Anthony Liguori
  0 siblings, 1 reply; 25+ messages in thread
From: Paolo Bonzini @ 2012-01-10 19:59 UTC (permalink / raw)
  To: qemu-devel

On 01/10/2012 08:10 PM, Anthony Liguori wrote:
> +    sec = cmos_read(0x00);
> +    min = cmos_read(0x02);
> +    hour = cmos_read(0x04);
> +    mday = cmos_read(0x07);
> +    mon = cmos_read(0x08);
> +    year = cmos_read(0x09);

Please use identifiers for register numbers.

> +    /*
> +     * This check assumes a few things.  First, we cannot guarantee that we get
> +     * a consistent reading from the wall clock because we may hit an edge of
> +     * the clock while reading.  To work around this, we read four clock readings
> +     * such that at least two of them should match.  We need to assume that one
> +     * reading is corrupt so we need four readings to ensure that we have at
> +     * least two consecutive identical readings
> +     *
> +     * It's also possible that we'll cross an edge reading the host clock so
> +     * simply check to make sure that the clock reading is within the period of
> +     * when we expect it to be.
> +     */

This seems broken to me.  The right thing to do would be to run the test 
with vm_clock for the rtc_clock, add a way for the qtest machine to bump 
the vm_clock to the next event, and busy loop running that method using 
UIP like you would do on hardware.

Paolo

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] [PATCH 01/15] tests: mv tests/* -> tests/tcg
  2012-01-10 19:10 [Qemu-devel] [PATCH 01/15] tests: mv tests/* -> tests/tcg Anthony Liguori
                   ` (13 preceding siblings ...)
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 15/15] qtest: add rtc-test test-case Anthony Liguori
@ 2012-01-10 22:35 ` Andreas Färber
  2012-01-12 16:53 ` Anthony Liguori
  15 siblings, 0 replies; 25+ messages in thread
From: Andreas Färber @ 2012-01-10 22:35 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel

Am 10.01.2012 20:10, schrieb Anthony Liguori:
> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

Reviewed-by: Andreas Färber <afaerber@suse.de>

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] [PATCH 15/15] qtest: add rtc-test test-case
  2012-01-10 19:59   ` Paolo Bonzini
@ 2012-01-11 17:06     ` Anthony Liguori
  2012-01-11 19:27       ` Paolo Bonzini
  0 siblings, 1 reply; 25+ messages in thread
From: Anthony Liguori @ 2012-01-11 17:06 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On 01/10/2012 01:59 PM, Paolo Bonzini wrote:
> On 01/10/2012 08:10 PM, Anthony Liguori wrote:
>> + sec = cmos_read(0x00);
>> + min = cmos_read(0x02);
>> + hour = cmos_read(0x04);
>> + mday = cmos_read(0x07);
>> + mon = cmos_read(0x08);
>> + year = cmos_read(0x09);
>
> Please use identifiers for register numbers.
>
>> + /*
>> + * This check assumes a few things. First, we cannot guarantee that we get
>> + * a consistent reading from the wall clock because we may hit an edge of
>> + * the clock while reading. To work around this, we read four clock readings
>> + * such that at least two of them should match. We need to assume that one
>> + * reading is corrupt so we need four readings to ensure that we have at
>> + * least two consecutive identical readings
>> + *
>> + * It's also possible that we'll cross an edge reading the host clock so
>> + * simply check to make sure that the clock reading is within the period of
>> + * when we expect it to be.
>> + */
>
> This seems broken to me.

It's not broken, although it may be ugly.

> The right thing to do would be to run the test with
> vm_clock for the rtc_clock, add a way for the qtest machine to bump the vm_clock
> to the next event,

I actually was looking at this yesterday.  Just bumping to the next event is not 
enough, you want to be able to control how time progresses.  I was thinking of 
adding another qtest_clock and allowing the rtc to use the qtest_clock.

What's nice about that is that you can simulate long periods of time (2 years) 
in a short period of time and do long term drift testing.

I know the math in the rtc is broken right now because we assume that there's a 
rational conversion from RTC cycle frequency to nanoseconds which is not the 
case.  We need a more sophisticated approach that can maintain an irrational 
conversion factor (in the form of a fractional multiplier).

Regards,

Anthony Liguori

> and busy loop running that method using UIP like you would do
> on hardware.
>
> Paolo
>
>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] [PATCH 15/15] qtest: add rtc-test test-case
  2012-01-11 17:06     ` Anthony Liguori
@ 2012-01-11 19:27       ` Paolo Bonzini
  0 siblings, 0 replies; 25+ messages in thread
From: Paolo Bonzini @ 2012-01-11 19:27 UTC (permalink / raw)
  To: qemu-devel

On 01/11/2012 06:06 PM, Anthony Liguori wrote:
>
>> The right thing to do would be to run the test with
>> vm_clock for the rtc_clock, add a way for the qtest machine to bump
>> the vm_clock
>> to the next event,
>
> I actually was looking at this yesterday.  Just bumping to the next
> event is not enough, you want to be able to control how time
> progresses.  I was thinking of adding another qtest_clock and allowing
> the rtc to use the qtest_clock.

Yes, that's right.  Only remark, I think it makes sense to reuse the 
vm_clock, so that you can reuse the icount infrastructure in -icount 0. 
  qemu_icount is then simply your nanosecond count.

This requires you not to set env->halted, though.

Paolo

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] [PATCH 12/15] qtest: add support for target-i386 -M pc
  2012-01-10 19:56   ` Paolo Bonzini
@ 2012-01-11 19:44     ` Anthony Liguori
  2012-01-12  9:25       ` Paolo Bonzini
  0 siblings, 1 reply; 25+ messages in thread
From: Anthony Liguori @ 2012-01-11 19:44 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On 01/10/2012 01:56 PM, Paolo Bonzini wrote:
> On 01/10/2012 08:10 PM, Anthony Liguori wrote:
>> This involves forcing the CPU into the halted state if qtest is enabled and
>> replacing the local APIC with the qtest interrupt controller.
>>
>> It should be pretty straight forward to do the same for other machine types on
>> other architectures.
>>
>> Signed-off-by: Anthony Liguori<aliguori@us.ibm.com>
>> ---
>> hw/pc.c | 7 ++++++-
>> hw/pc_piix.c | 9 ++++++---
>> 2 files changed, 12 insertions(+), 4 deletions(-)
>>
>> diff --git a/hw/pc.c b/hw/pc.c
>> index 85304cf..fac5098 100644
>> --- a/hw/pc.c
>> +++ b/hw/pc.c
>> @@ -43,6 +43,7 @@
>> #include "ui/qemu-spice.h"
>> #include "memory.h"
>> #include "exec-memory.h"
>> +#include "qtest.h"
>>
>> /* output Bochs bios info messages */
>> //#define DEBUG_BIOS
>> @@ -926,7 +927,11 @@ static void pc_cpu_reset(void *opaque)
>> CPUState *env = opaque;
>>
>> cpu_reset(env);
>> - env->halted = !cpu_is_bsp(env);
>> + if (qtest_enabled()) {
>> + env->halted = 1;
>> + } else {
>> + env->halted = !cpu_is_bsp(env);
>> + }
>
> This is wrong. qtest and Xen should simply not create the CPU threads at all.

This is easier said than done.  I started down this road and there's a huge 
amount of code that assumes that first_cpu != NULL.

I agree it's where we want to go though.

Regards,

Anthony Liguori

>
> Paolo
>
>
>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] [PATCH 12/15] qtest: add support for target-i386 -M pc
  2012-01-11 19:44     ` Anthony Liguori
@ 2012-01-12  9:25       ` Paolo Bonzini
  0 siblings, 0 replies; 25+ messages in thread
From: Paolo Bonzini @ 2012-01-12  9:25 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel

On 01/11/2012 08:44 PM, Anthony Liguori wrote:
> This is easier said than done.  I started down this road and there's a
> huge amount of code that assumes that first_cpu != NULL.

That's why I said do not create the CPU _threads_. :)  But that wouldn't 
be a big step forward from halted = 1; for example, it would prevent 
using per-CPU work items.  Currently they're only used internally by 
KVM, but you never know.

So you can also create a CPU thread that does nothing.  Here is how it 
could look like, based on the KVM implementation:

static void *qemu_qtest_cpu_thread_fn(void *arg)
{
     CPUState *env = arg;
     int r;

     qemu_mutex_lock(&qemu_global_mutex);
     qemu_thread_get_self(env->thread);
     env->thread_id = qemu_get_thread_id();

     sigset_t waitset;
     sigemptyset(&waitset);
     sigaddset(&waitset, SIG_IPI);

     /* signal CPU creation */
     env->created = 1;
     qemu_cond_signal(&qemu_cpu_cond);

     cpu_single_env = env;
     while (1) {
         cpu_single_env = NULL;
         qemu_mutex_unlock_iothread();
         do {
             int sig;
             r = sigwait(&waitset, &sig);
         } while (r == -1 && (errno == EAGAIN || errno == EINTR));
         if (r == -1) {
             perror("sigtimedwait");
             exit(1);
         }
         qemu_mutex_lock_iothread();
         cpu_single_env = env;
         qemu_wait_io_event_common(env);
     }

     return NULL;
}

Paolo

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] [PATCH 10/15] test: eliminate libcheck tests and have make check use gtester
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 10/15] test: eliminate libcheck tests and have make check use gtester Anthony Liguori
@ 2012-01-12 12:17   ` Eduardo Habkost
  2012-01-13 10:58   ` [Qemu-devel] --enable-check-utests gone, you may have to re-run configure (was: [PATCH 10/15] test: eliminate libcheck tests and have make check use gtester) Markus Armbruster
  1 sibling, 0 replies; 25+ messages in thread
From: Eduardo Habkost @ 2012-01-12 12:17 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel

On Tue, Jan 10, 2012 at 01:10:51PM -0600, Anthony Liguori wrote:
[...]
> @@ -733,10 +732,6 @@ for opt do
>    ;;
>    --enable-fdt) fdt="yes"
>    ;;
> -  --disable-check-utests) check_utests="no"
> -  ;;
> -  --enable-check-utests) check_utests="yes"
> -  ;;
>    --disable-nptl) nptl="no"
>    ;;
>    --enable-nptl) nptl="yes"

You forgot to remove this:

@@ -2825,7 +2825,6 @@ fi
 echo "SDL support       $sdl"
 echo "curses support    $curses"
 echo "curl support      $curl"
-echo "check support     $check_utests"
 echo "mingw32 support   $mingw32"
 echo "Audio drivers     $audio_drv_list"
 echo "Extra audio cards $audio_card_list"

-- 
Eduardo

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] [PATCH 01/15] tests: mv tests/* -> tests/tcg
  2012-01-10 19:10 [Qemu-devel] [PATCH 01/15] tests: mv tests/* -> tests/tcg Anthony Liguori
                   ` (14 preceding siblings ...)
  2012-01-10 22:35 ` [Qemu-devel] [PATCH 01/15] tests: mv tests/* -> tests/tcg Andreas Färber
@ 2012-01-12 16:53 ` Anthony Liguori
  15 siblings, 0 replies; 25+ messages in thread
From: Anthony Liguori @ 2012-01-12 16:53 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel

On 01/10/2012 01:10 PM, Anthony Liguori wrote:
> Signed-off-by: Anthony Liguori<aliguori@us.ibm.com>

Applied 1-10.  I'll apply qtest after looking into Paolo's suggestions for an 
empty VCPU thread.

Regards,

Anthony Liguori

> ---
>   Makefile                                          |    4 ++--
>   configure                                         |    6 +++---
>   tests/{ =>  tcg}/Makefile                          |    0
>   tests/{ =>  tcg}/alpha/Makefile                    |    0
>   tests/{ =>  tcg}/alpha/crt.s                       |    0
>   tests/{ =>  tcg}/alpha/hello-alpha.c               |    0
>   tests/{ =>  tcg}/alpha/test-cond.c                 |    0
>   tests/{ =>  tcg}/alpha/test-ovf.c                  |    0
>   tests/{ =>  tcg}/cris/.gdbinit                     |    0
>   tests/{ =>  tcg}/cris/Makefile                     |    0
>   tests/{ =>  tcg}/cris/README                       |    0
>   tests/{ =>  tcg}/cris/check_abs.c                  |    0
>   tests/{ =>  tcg}/cris/check_addc.c                 |    0
>   tests/{ =>  tcg}/cris/check_addcm.c                |    0
>   tests/{ =>  tcg}/cris/check_addi.s                 |    0
>   tests/{ =>  tcg}/cris/check_addiv32.s              |    0
>   tests/{ =>  tcg}/cris/check_addm.s                 |    0
>   tests/{ =>  tcg}/cris/check_addo.c                 |    0
>   tests/{ =>  tcg}/cris/check_addoq.c                |    0
>   tests/{ =>  tcg}/cris/check_addq.s                 |    0
>   tests/{ =>  tcg}/cris/check_addr.s                 |    0
>   tests/{ =>  tcg}/cris/check_addxc.s                |    0
>   tests/{ =>  tcg}/cris/check_addxm.s                |    0
>   tests/{ =>  tcg}/cris/check_addxr.s                |    0
>   tests/{ =>  tcg}/cris/check_andc.s                 |    0
>   tests/{ =>  tcg}/cris/check_andm.s                 |    0
>   tests/{ =>  tcg}/cris/check_andq.s                 |    0
>   tests/{ =>  tcg}/cris/check_andr.s                 |    0
>   tests/{ =>  tcg}/cris/check_asr.s                  |    0
>   tests/{ =>  tcg}/cris/check_ba.s                   |    0
>   tests/{ =>  tcg}/cris/check_bas.s                  |    0
>   tests/{ =>  tcg}/cris/check_bcc.s                  |    0
>   tests/{ =>  tcg}/cris/check_bound.c                |    0
>   tests/{ =>  tcg}/cris/check_boundc.s               |    0
>   tests/{ =>  tcg}/cris/check_boundr.s               |    0
>   tests/{ =>  tcg}/cris/check_btst.s                 |    0
>   tests/{ =>  tcg}/cris/check_clearfv32.s            |    0
>   tests/{ =>  tcg}/cris/check_clrjmp1.s              |    0
>   tests/{ =>  tcg}/cris/check_cmp-2.s                |    0
>   tests/{ =>  tcg}/cris/check_cmpc.s                 |    0
>   tests/{ =>  tcg}/cris/check_cmpm.s                 |    0
>   tests/{ =>  tcg}/cris/check_cmpq.s                 |    0
>   tests/{ =>  tcg}/cris/check_cmpr.s                 |    0
>   tests/{ =>  tcg}/cris/check_cmpxc.s                |    0
>   tests/{ =>  tcg}/cris/check_cmpxm.s                |    0
>   tests/{ =>  tcg}/cris/check_dstep.s                |    0
>   tests/{ =>  tcg}/cris/check_ftag.c                 |    0
>   tests/{ =>  tcg}/cris/check_gcctorture_pr28634-1.c |    0
>   tests/{ =>  tcg}/cris/check_gcctorture_pr28634.c   |    0
>   tests/{ =>  tcg}/cris/check_glibc_kernelversion.c  |    0
>   tests/{ =>  tcg}/cris/check_hello.c                |    0
>   tests/{ =>  tcg}/cris/check_int64.c                |    0
>   tests/{ =>  tcg}/cris/check_jsr.s                  |    0
>   tests/{ =>  tcg}/cris/check_lapc.s                 |    0
>   tests/{ =>  tcg}/cris/check_lsl.s                  |    0
>   tests/{ =>  tcg}/cris/check_lsr.s                  |    0
>   tests/{ =>  tcg}/cris/check_lz.c                   |    0
>   tests/{ =>  tcg}/cris/check_mapbrk.c               |    0
>   tests/{ =>  tcg}/cris/check_mcp.s                  |    0
>   tests/{ =>  tcg}/cris/check_mmap1.c                |    0
>   tests/{ =>  tcg}/cris/check_mmap2.c                |    0
>   tests/{ =>  tcg}/cris/check_mmap3.c                |    0
>   tests/{ =>  tcg}/cris/check_movdelsr1.s            |    0
>   tests/{ =>  tcg}/cris/check_movecr.s               |    0
>   tests/{ =>  tcg}/cris/check_movei.s                |    0
>   tests/{ =>  tcg}/cris/check_movemr.s               |    0
>   tests/{ =>  tcg}/cris/check_movemrv32.s            |    0
>   tests/{ =>  tcg}/cris/check_moveq.c                |    0
>   tests/{ =>  tcg}/cris/check_mover.s                |    0
>   tests/{ =>  tcg}/cris/check_moverm.s               |    0
>   tests/{ =>  tcg}/cris/check_movmp.s                |    0
>   tests/{ =>  tcg}/cris/check_movpmv32.s             |    0
>   tests/{ =>  tcg}/cris/check_movpr.s                |    0
>   tests/{ =>  tcg}/cris/check_movprv32.s             |    0
>   tests/{ =>  tcg}/cris/check_movscr.s               |    0
>   tests/{ =>  tcg}/cris/check_movsm.s                |    0
>   tests/{ =>  tcg}/cris/check_movsr.s                |    0
>   tests/{ =>  tcg}/cris/check_movucr.s               |    0
>   tests/{ =>  tcg}/cris/check_movum.s                |    0
>   tests/{ =>  tcg}/cris/check_movur.s                |    0
>   tests/{ =>  tcg}/cris/check_mulv32.s               |    0
>   tests/{ =>  tcg}/cris/check_mulx.s                 |    0
>   tests/{ =>  tcg}/cris/check_neg.s                  |    0
>   tests/{ =>  tcg}/cris/check_not.s                  |    0
>   tests/{ =>  tcg}/cris/check_openpf1.c              |    0
>   tests/{ =>  tcg}/cris/check_openpf2.c              |    0
>   tests/{ =>  tcg}/cris/check_openpf3.c              |    0
>   tests/{ =>  tcg}/cris/check_openpf4.c              |    0
>   tests/{ =>  tcg}/cris/check_openpf5.c              |    0
>   tests/{ =>  tcg}/cris/check_orc.s                  |    0
>   tests/{ =>  tcg}/cris/check_orm.s                  |    0
>   tests/{ =>  tcg}/cris/check_orq.s                  |    0
>   tests/{ =>  tcg}/cris/check_orr.s                  |    0
>   tests/{ =>  tcg}/cris/check_ret.s                  |    0
>   tests/{ =>  tcg}/cris/check_scc.s                  |    0
>   tests/{ =>  tcg}/cris/check_settls1.c              |    0
>   tests/{ =>  tcg}/cris/check_sigalrm.c              |    0
>   tests/{ =>  tcg}/cris/check_stat1.c                |    0
>   tests/{ =>  tcg}/cris/check_stat2.c                |    0
>   tests/{ =>  tcg}/cris/check_stat3.c                |    0
>   tests/{ =>  tcg}/cris/check_stat4.c                |    0
>   tests/{ =>  tcg}/cris/check_subc.s                 |    0
>   tests/{ =>  tcg}/cris/check_subm.s                 |    0
>   tests/{ =>  tcg}/cris/check_subq.s                 |    0
>   tests/{ =>  tcg}/cris/check_subr.s                 |    0
>   tests/{ =>  tcg}/cris/check_swap.c                 |    0
>   tests/{ =>  tcg}/cris/check_time1.c                |    0
>   tests/{ =>  tcg}/cris/check_time2.c                |    0
>   tests/{ =>  tcg}/cris/check_xarith.s               |    0
>   tests/{ =>  tcg}/cris/crisutils.h                  |    0
>   tests/{ =>  tcg}/cris/crt.s                        |    0
>   tests/{ =>  tcg}/cris/sys.c                        |    0
>   tests/{ =>  tcg}/cris/sys.h                        |    0
>   tests/{ =>  tcg}/cris/testutils.inc                |    0
>   tests/{ =>  tcg}/hello-arm.c                       |    0
>   tests/{ =>  tcg}/hello-i386.c                      |    0
>   tests/{ =>  tcg}/hello-mips.c                      |    0
>   tests/{ =>  tcg}/linux-test.c                      |    0
>   tests/{ =>  tcg}/lm32/Makefile                     |    0
>   tests/{ =>  tcg}/lm32/crt.S                        |    0
>   tests/{ =>  tcg}/lm32/linker.ld                    |    0
>   tests/{ =>  tcg}/lm32/macros.inc                   |    0
>   tests/{ =>  tcg}/lm32/test_add.S                   |    0
>   tests/{ =>  tcg}/lm32/test_addi.S                  |    0
>   tests/{ =>  tcg}/lm32/test_and.S                   |    0
>   tests/{ =>  tcg}/lm32/test_andhi.S                 |    0
>   tests/{ =>  tcg}/lm32/test_andi.S                  |    0
>   tests/{ =>  tcg}/lm32/test_b.S                     |    0
>   tests/{ =>  tcg}/lm32/test_be.S                    |    0
>   tests/{ =>  tcg}/lm32/test_bg.S                    |    0
>   tests/{ =>  tcg}/lm32/test_bge.S                   |    0
>   tests/{ =>  tcg}/lm32/test_bgeu.S                  |    0
>   tests/{ =>  tcg}/lm32/test_bgu.S                   |    0
>   tests/{ =>  tcg}/lm32/test_bi.S                    |    0
>   tests/{ =>  tcg}/lm32/test_bne.S                   |    0
>   tests/{ =>  tcg}/lm32/test_break.S                 |    0
>   tests/{ =>  tcg}/lm32/test_bret.S                  |    0
>   tests/{ =>  tcg}/lm32/test_call.S                  |    0
>   tests/{ =>  tcg}/lm32/test_calli.S                 |    0
>   tests/{ =>  tcg}/lm32/test_cmpe.S                  |    0
>   tests/{ =>  tcg}/lm32/test_cmpei.S                 |    0
>   tests/{ =>  tcg}/lm32/test_cmpg.S                  |    0
>   tests/{ =>  tcg}/lm32/test_cmpge.S                 |    0
>   tests/{ =>  tcg}/lm32/test_cmpgei.S                |    0
>   tests/{ =>  tcg}/lm32/test_cmpgeu.S                |    0
>   tests/{ =>  tcg}/lm32/test_cmpgeui.S               |    0
>   tests/{ =>  tcg}/lm32/test_cmpgi.S                 |    0
>   tests/{ =>  tcg}/lm32/test_cmpgu.S                 |    0
>   tests/{ =>  tcg}/lm32/test_cmpgui.S                |    0
>   tests/{ =>  tcg}/lm32/test_cmpne.S                 |    0
>   tests/{ =>  tcg}/lm32/test_cmpnei.S                |    0
>   tests/{ =>  tcg}/lm32/test_divu.S                  |    0
>   tests/{ =>  tcg}/lm32/test_eret.S                  |    0
>   tests/{ =>  tcg}/lm32/test_lb.S                    |    0
>   tests/{ =>  tcg}/lm32/test_lbu.S                   |    0
>   tests/{ =>  tcg}/lm32/test_lh.S                    |    0
>   tests/{ =>  tcg}/lm32/test_lhu.S                   |    0
>   tests/{ =>  tcg}/lm32/test_lw.S                    |    0
>   tests/{ =>  tcg}/lm32/test_modu.S                  |    0
>   tests/{ =>  tcg}/lm32/test_mul.S                   |    0
>   tests/{ =>  tcg}/lm32/test_muli.S                  |    0
>   tests/{ =>  tcg}/lm32/test_nor.S                   |    0
>   tests/{ =>  tcg}/lm32/test_nori.S                  |    0
>   tests/{ =>  tcg}/lm32/test_or.S                    |    0
>   tests/{ =>  tcg}/lm32/test_orhi.S                  |    0
>   tests/{ =>  tcg}/lm32/test_ori.S                   |    0
>   tests/{ =>  tcg}/lm32/test_ret.S                   |    0
>   tests/{ =>  tcg}/lm32/test_sb.S                    |    0
>   tests/{ =>  tcg}/lm32/test_scall.S                 |    0
>   tests/{ =>  tcg}/lm32/test_sextb.S                 |    0
>   tests/{ =>  tcg}/lm32/test_sexth.S                 |    0
>   tests/{ =>  tcg}/lm32/test_sh.S                    |    0
>   tests/{ =>  tcg}/lm32/test_sl.S                    |    0
>   tests/{ =>  tcg}/lm32/test_sli.S                   |    0
>   tests/{ =>  tcg}/lm32/test_sr.S                    |    0
>   tests/{ =>  tcg}/lm32/test_sri.S                   |    0
>   tests/{ =>  tcg}/lm32/test_sru.S                   |    0
>   tests/{ =>  tcg}/lm32/test_srui.S                  |    0
>   tests/{ =>  tcg}/lm32/test_sub.S                   |    0
>   tests/{ =>  tcg}/lm32/test_sw.S                    |    0
>   tests/{ =>  tcg}/lm32/test_xnor.S                  |    0
>   tests/{ =>  tcg}/lm32/test_xnori.S                 |    0
>   tests/{ =>  tcg}/lm32/test_xor.S                   |    0
>   tests/{ =>  tcg}/lm32/test_xori.S                  |    0
>   tests/{ =>  tcg}/pi_10.com                         |  Bin 54 ->  54 bytes
>   tests/{ =>  tcg}/runcom.c                          |    0
>   tests/{ =>  tcg}/sha1.c                            |    0
>   tests/{ =>  tcg}/test-arm-iwmmxt.s                 |    0
>   tests/{ =>  tcg}/test-i386-code16.S                |    0
>   tests/{ =>  tcg}/test-i386-muldiv.h                |    0
>   tests/{ =>  tcg}/test-i386-shift.h                 |    0
>   tests/{ =>  tcg}/test-i386-ssse3.c                 |    0
>   tests/{ =>  tcg}/test-i386-vm86.S                  |    0
>   tests/{ =>  tcg}/test-i386.c                       |    0
>   tests/{ =>  tcg}/test-i386.h                       |    0
>   tests/{ =>  tcg}/test-mmap.c                       |    0
>   tests/{ =>  tcg}/test_path.c                       |    0
>   tests/{ =>  tcg}/testthread.c                      |    0
>   tests/{ =>  tcg}/xtensa/Makefile                   |    0
>   tests/{ =>  tcg}/xtensa/crt.S                      |    0
>   tests/{ =>  tcg}/xtensa/linker.ld                  |    0
>   tests/{ =>  tcg}/xtensa/macros.inc                 |    0
>   tests/{ =>  tcg}/xtensa/test_b.S                   |    0
>   tests/{ =>  tcg}/xtensa/test_bi.S                  |    0
>   tests/{ =>  tcg}/xtensa/test_boolean.S             |    0
>   tests/{ =>  tcg}/xtensa/test_bz.S                  |    0
>   tests/{ =>  tcg}/xtensa/test_clamps.S              |    0
>   tests/{ =>  tcg}/xtensa/test_fail.S                |    0
>   tests/{ =>  tcg}/xtensa/test_interrupt.S           |    0
>   tests/{ =>  tcg}/xtensa/test_loop.S                |    0
>   tests/{ =>  tcg}/xtensa/test_mac16.S               |    0
>   tests/{ =>  tcg}/xtensa/test_max.S                 |    0
>   tests/{ =>  tcg}/xtensa/test_min.S                 |    0
>   tests/{ =>  tcg}/xtensa/test_mmu.S                 |    0
>   tests/{ =>  tcg}/xtensa/test_mul16.S               |    0
>   tests/{ =>  tcg}/xtensa/test_mul32.S               |    0
>   tests/{ =>  tcg}/xtensa/test_nsa.S                 |    0
>   tests/{ =>  tcg}/xtensa/test_pipeline.S            |    0
>   tests/{ =>  tcg}/xtensa/test_quo.S                 |    0
>   tests/{ =>  tcg}/xtensa/test_rem.S                 |    0
>   tests/{ =>  tcg}/xtensa/test_rst0.S                |    0
>   tests/{ =>  tcg}/xtensa/test_sar.S                 |    0
>   tests/{ =>  tcg}/xtensa/test_sext.S                |    0
>   tests/{ =>  tcg}/xtensa/test_shift.S               |    0
>   tests/{ =>  tcg}/xtensa/test_timer.S               |    0
>   tests/{ =>  tcg}/xtensa/test_windowed.S            |    0
>   tests/{ =>  tcg}/xtensa/vectors.S                  |    0
>   227 files changed, 5 insertions(+), 5 deletions(-)
>   rename tests/{ =>  tcg}/Makefile (100%)
>   rename tests/{ =>  tcg}/alpha/Makefile (100%)
>   rename tests/{ =>  tcg}/alpha/crt.s (100%)
>   rename tests/{ =>  tcg}/alpha/hello-alpha.c (100%)
>   rename tests/{ =>  tcg}/alpha/test-cond.c (100%)
>   rename tests/{ =>  tcg}/alpha/test-ovf.c (100%)
>   rename tests/{ =>  tcg}/cris/.gdbinit (100%)
>   rename tests/{ =>  tcg}/cris/Makefile (100%)
>   rename tests/{ =>  tcg}/cris/README (100%)
>   rename tests/{ =>  tcg}/cris/check_abs.c (100%)
>   rename tests/{ =>  tcg}/cris/check_addc.c (100%)
>   rename tests/{ =>  tcg}/cris/check_addcm.c (100%)
>   rename tests/{ =>  tcg}/cris/check_addi.s (100%)
>   rename tests/{ =>  tcg}/cris/check_addiv32.s (100%)
>   rename tests/{ =>  tcg}/cris/check_addm.s (100%)
>   rename tests/{ =>  tcg}/cris/check_addo.c (100%)
>   rename tests/{ =>  tcg}/cris/check_addoq.c (100%)
>   rename tests/{ =>  tcg}/cris/check_addq.s (100%)
>   rename tests/{ =>  tcg}/cris/check_addr.s (100%)
>   rename tests/{ =>  tcg}/cris/check_addxc.s (100%)
>   rename tests/{ =>  tcg}/cris/check_addxm.s (100%)
>   rename tests/{ =>  tcg}/cris/check_addxr.s (100%)
>   rename tests/{ =>  tcg}/cris/check_andc.s (100%)
>   rename tests/{ =>  tcg}/cris/check_andm.s (100%)
>   rename tests/{ =>  tcg}/cris/check_andq.s (100%)
>   rename tests/{ =>  tcg}/cris/check_andr.s (100%)
>   rename tests/{ =>  tcg}/cris/check_asr.s (100%)
>   rename tests/{ =>  tcg}/cris/check_ba.s (100%)
>   rename tests/{ =>  tcg}/cris/check_bas.s (100%)
>   rename tests/{ =>  tcg}/cris/check_bcc.s (100%)
>   rename tests/{ =>  tcg}/cris/check_bound.c (100%)
>   rename tests/{ =>  tcg}/cris/check_boundc.s (100%)
>   rename tests/{ =>  tcg}/cris/check_boundr.s (100%)
>   rename tests/{ =>  tcg}/cris/check_btst.s (100%)
>   rename tests/{ =>  tcg}/cris/check_clearfv32.s (100%)
>   rename tests/{ =>  tcg}/cris/check_clrjmp1.s (100%)
>   rename tests/{ =>  tcg}/cris/check_cmp-2.s (100%)
>   rename tests/{ =>  tcg}/cris/check_cmpc.s (100%)
>   rename tests/{ =>  tcg}/cris/check_cmpm.s (100%)
>   rename tests/{ =>  tcg}/cris/check_cmpq.s (100%)
>   rename tests/{ =>  tcg}/cris/check_cmpr.s (100%)
>   rename tests/{ =>  tcg}/cris/check_cmpxc.s (100%)
>   rename tests/{ =>  tcg}/cris/check_cmpxm.s (100%)
>   rename tests/{ =>  tcg}/cris/check_dstep.s (100%)
>   rename tests/{ =>  tcg}/cris/check_ftag.c (100%)
>   rename tests/{ =>  tcg}/cris/check_gcctorture_pr28634-1.c (100%)
>   rename tests/{ =>  tcg}/cris/check_gcctorture_pr28634.c (100%)
>   rename tests/{ =>  tcg}/cris/check_glibc_kernelversion.c (100%)
>   rename tests/{ =>  tcg}/cris/check_hello.c (100%)
>   rename tests/{ =>  tcg}/cris/check_int64.c (100%)
>   rename tests/{ =>  tcg}/cris/check_jsr.s (100%)
>   rename tests/{ =>  tcg}/cris/check_lapc.s (100%)
>   rename tests/{ =>  tcg}/cris/check_lsl.s (100%)
>   rename tests/{ =>  tcg}/cris/check_lsr.s (100%)
>   rename tests/{ =>  tcg}/cris/check_lz.c (100%)
>   rename tests/{ =>  tcg}/cris/check_mapbrk.c (100%)
>   rename tests/{ =>  tcg}/cris/check_mcp.s (100%)
>   rename tests/{ =>  tcg}/cris/check_mmap1.c (100%)
>   rename tests/{ =>  tcg}/cris/check_mmap2.c (100%)
>   rename tests/{ =>  tcg}/cris/check_mmap3.c (100%)
>   rename tests/{ =>  tcg}/cris/check_movdelsr1.s (100%)
>   rename tests/{ =>  tcg}/cris/check_movecr.s (100%)
>   rename tests/{ =>  tcg}/cris/check_movei.s (100%)
>   rename tests/{ =>  tcg}/cris/check_movemr.s (100%)
>   rename tests/{ =>  tcg}/cris/check_movemrv32.s (100%)
>   rename tests/{ =>  tcg}/cris/check_moveq.c (100%)
>   rename tests/{ =>  tcg}/cris/check_mover.s (100%)
>   rename tests/{ =>  tcg}/cris/check_moverm.s (100%)
>   rename tests/{ =>  tcg}/cris/check_movmp.s (100%)
>   rename tests/{ =>  tcg}/cris/check_movpmv32.s (100%)
>   rename tests/{ =>  tcg}/cris/check_movpr.s (100%)
>   rename tests/{ =>  tcg}/cris/check_movprv32.s (100%)
>   rename tests/{ =>  tcg}/cris/check_movscr.s (100%)
>   rename tests/{ =>  tcg}/cris/check_movsm.s (100%)
>   rename tests/{ =>  tcg}/cris/check_movsr.s (100%)
>   rename tests/{ =>  tcg}/cris/check_movucr.s (100%)
>   rename tests/{ =>  tcg}/cris/check_movum.s (100%)
>   rename tests/{ =>  tcg}/cris/check_movur.s (100%)
>   rename tests/{ =>  tcg}/cris/check_mulv32.s (100%)
>   rename tests/{ =>  tcg}/cris/check_mulx.s (100%)
>   rename tests/{ =>  tcg}/cris/check_neg.s (100%)
>   rename tests/{ =>  tcg}/cris/check_not.s (100%)
>   rename tests/{ =>  tcg}/cris/check_openpf1.c (100%)
>   rename tests/{ =>  tcg}/cris/check_openpf2.c (100%)
>   rename tests/{ =>  tcg}/cris/check_openpf3.c (100%)
>   rename tests/{ =>  tcg}/cris/check_openpf4.c (100%)
>   rename tests/{ =>  tcg}/cris/check_openpf5.c (100%)
>   rename tests/{ =>  tcg}/cris/check_orc.s (100%)
>   rename tests/{ =>  tcg}/cris/check_orm.s (100%)
>   rename tests/{ =>  tcg}/cris/check_orq.s (100%)
>   rename tests/{ =>  tcg}/cris/check_orr.s (100%)
>   rename tests/{ =>  tcg}/cris/check_ret.s (100%)
>   rename tests/{ =>  tcg}/cris/check_scc.s (100%)
>   rename tests/{ =>  tcg}/cris/check_settls1.c (100%)
>   rename tests/{ =>  tcg}/cris/check_sigalrm.c (100%)
>   rename tests/{ =>  tcg}/cris/check_stat1.c (100%)
>   rename tests/{ =>  tcg}/cris/check_stat2.c (100%)
>   rename tests/{ =>  tcg}/cris/check_stat3.c (100%)
>   rename tests/{ =>  tcg}/cris/check_stat4.c (100%)
>   rename tests/{ =>  tcg}/cris/check_subc.s (100%)
>   rename tests/{ =>  tcg}/cris/check_subm.s (100%)
>   rename tests/{ =>  tcg}/cris/check_subq.s (100%)
>   rename tests/{ =>  tcg}/cris/check_subr.s (100%)
>   rename tests/{ =>  tcg}/cris/check_swap.c (100%)
>   rename tests/{ =>  tcg}/cris/check_time1.c (100%)
>   rename tests/{ =>  tcg}/cris/check_time2.c (100%)
>   rename tests/{ =>  tcg}/cris/check_xarith.s (100%)
>   rename tests/{ =>  tcg}/cris/crisutils.h (100%)
>   rename tests/{ =>  tcg}/cris/crt.s (100%)
>   rename tests/{ =>  tcg}/cris/sys.c (100%)
>   rename tests/{ =>  tcg}/cris/sys.h (100%)
>   rename tests/{ =>  tcg}/cris/testutils.inc (100%)
>   rename tests/{ =>  tcg}/hello-arm.c (100%)
>   rename tests/{ =>  tcg}/hello-i386.c (100%)
>   rename tests/{ =>  tcg}/hello-mips.c (100%)
>   rename tests/{ =>  tcg}/linux-test.c (100%)
>   rename tests/{ =>  tcg}/lm32/Makefile (100%)
>   rename tests/{ =>  tcg}/lm32/crt.S (100%)
>   rename tests/{ =>  tcg}/lm32/linker.ld (100%)
>   rename tests/{ =>  tcg}/lm32/macros.inc (100%)
>   rename tests/{ =>  tcg}/lm32/test_add.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_addi.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_and.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_andhi.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_andi.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_b.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_be.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_bg.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_bge.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_bgeu.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_bgu.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_bi.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_bne.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_break.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_bret.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_call.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_calli.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_cmpe.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_cmpei.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_cmpg.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_cmpge.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_cmpgei.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_cmpgeu.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_cmpgeui.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_cmpgi.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_cmpgu.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_cmpgui.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_cmpne.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_cmpnei.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_divu.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_eret.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_lb.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_lbu.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_lh.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_lhu.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_lw.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_modu.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_mul.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_muli.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_nor.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_nori.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_or.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_orhi.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_ori.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_ret.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_sb.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_scall.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_sextb.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_sexth.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_sh.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_sl.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_sli.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_sr.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_sri.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_sru.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_srui.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_sub.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_sw.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_xnor.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_xnori.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_xor.S (100%)
>   rename tests/{ =>  tcg}/lm32/test_xori.S (100%)
>   rename tests/{ =>  tcg}/pi_10.com (100%)
>   rename tests/{ =>  tcg}/runcom.c (100%)
>   rename tests/{ =>  tcg}/sha1.c (100%)
>   rename tests/{ =>  tcg}/test-arm-iwmmxt.s (100%)
>   rename tests/{ =>  tcg}/test-i386-code16.S (100%)
>   rename tests/{ =>  tcg}/test-i386-muldiv.h (100%)
>   rename tests/{ =>  tcg}/test-i386-shift.h (100%)
>   rename tests/{ =>  tcg}/test-i386-ssse3.c (100%)
>   rename tests/{ =>  tcg}/test-i386-vm86.S (100%)
>   rename tests/{ =>  tcg}/test-i386.c (100%)
>   rename tests/{ =>  tcg}/test-i386.h (100%)
>   rename tests/{ =>  tcg}/test-mmap.c (100%)
>   rename tests/{ =>  tcg}/test_path.c (100%)
>   rename tests/{ =>  tcg}/testthread.c (100%)
>   rename tests/{ =>  tcg}/xtensa/Makefile (100%)
>   rename tests/{ =>  tcg}/xtensa/crt.S (100%)
>   rename tests/{ =>  tcg}/xtensa/linker.ld (100%)
>   rename tests/{ =>  tcg}/xtensa/macros.inc (100%)
>   rename tests/{ =>  tcg}/xtensa/test_b.S (100%)
>   rename tests/{ =>  tcg}/xtensa/test_bi.S (100%)
>   rename tests/{ =>  tcg}/xtensa/test_boolean.S (100%)
>   rename tests/{ =>  tcg}/xtensa/test_bz.S (100%)
>   rename tests/{ =>  tcg}/xtensa/test_clamps.S (100%)
>   rename tests/{ =>  tcg}/xtensa/test_fail.S (100%)
>   rename tests/{ =>  tcg}/xtensa/test_interrupt.S (100%)
>   rename tests/{ =>  tcg}/xtensa/test_loop.S (100%)
>   rename tests/{ =>  tcg}/xtensa/test_mac16.S (100%)
>   rename tests/{ =>  tcg}/xtensa/test_max.S (100%)
>   rename tests/{ =>  tcg}/xtensa/test_min.S (100%)
>   rename tests/{ =>  tcg}/xtensa/test_mmu.S (100%)
>   rename tests/{ =>  tcg}/xtensa/test_mul16.S (100%)
>   rename tests/{ =>  tcg}/xtensa/test_mul32.S (100%)
>   rename tests/{ =>  tcg}/xtensa/test_nsa.S (100%)
>   rename tests/{ =>  tcg}/xtensa/test_pipeline.S (100%)
>   rename tests/{ =>  tcg}/xtensa/test_quo.S (100%)
>   rename tests/{ =>  tcg}/xtensa/test_rem.S (100%)
>   rename tests/{ =>  tcg}/xtensa/test_rst0.S (100%)
>   rename tests/{ =>  tcg}/xtensa/test_sar.S (100%)
>   rename tests/{ =>  tcg}/xtensa/test_sext.S (100%)
>   rename tests/{ =>  tcg}/xtensa/test_shift.S (100%)
>   rename tests/{ =>  tcg}/xtensa/test_timer.S (100%)
>   rename tests/{ =>  tcg}/xtensa/test_windowed.S (100%)
>   rename tests/{ =>  tcg}/xtensa/vectors.S (100%)
>
> diff --git a/Makefile b/Makefile
> index 9ce8768..0cbe7c2 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -241,7 +241,7 @@ clean:
>   	rm -f trace-dtrace.h trace-dtrace.h-timestamp
>   	rm -f $(GENERATED_SOURCES)
>   	rm -rf $(qapi-dir)
> -	$(MAKE) -C tests clean
> +	$(MAKE) -C tests/tcg clean
>   	for d in $(ALL_SUBDIRS) $(QEMULIBS) libcacard; do \
>   	if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \
>   	rm -f $$d/qemu-options.def; \
> @@ -319,7 +319,7 @@ endif
>
>   # various test targets
>   test speed: all
> -	$(MAKE) -C tests $@
> +	$(MAKE) -C tests/tcg $@
>
>   .PHONY: check
>   check: $(patsubst %,run-check-%,$(CHECKS))
> diff --git a/configure b/configure
> index 0309dad..79790b3 100755
> --- a/configure
> +++ b/configure
> @@ -3809,14 +3809,14 @@ echo "QEMU_INCLUDES+=$includes">>  $config_target_mak
>   done # for target in $targets
>
>   # build tree in object directory in case the source is not in the current directory
> -DIRS="tests tests/cris slirp audio block net pc-bios/optionrom"
> +DIRS="tests tests/tcg tests/tcg/cris slirp audio block net pc-bios/optionrom"
>   DIRS="$DIRS pc-bios/spapr-rtas"
>   DIRS="$DIRS roms/seabios roms/vgabios"
>   DIRS="$DIRS fsdev ui"
>   DIRS="$DIRS qapi qapi-generated"
>   DIRS="$DIRS qga trace"
> -FILES="Makefile tests/Makefile qdict-test-data.txt"
> -FILES="$FILES tests/cris/Makefile tests/cris/.gdbinit"
> +FILES="Makefile tests/tcg/Makefile qdict-test-data.txt"
> +FILES="$FILES tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit"
>   FILES="$FILES pc-bios/optionrom/Makefile pc-bios/keymaps"
>   FILES="$FILES pc-bios/spapr-rtas/Makefile"
>   FILES="$FILES roms/seabios/Makefile roms/vgabios/Makefile"
> diff --git a/tests/Makefile b/tests/tcg/Makefile
> similarity index 100%
> rename from tests/Makefile
> rename to tests/tcg/Makefile
> diff --git a/tests/alpha/Makefile b/tests/tcg/alpha/Makefile
> similarity index 100%
> rename from tests/alpha/Makefile
> rename to tests/tcg/alpha/Makefile
> diff --git a/tests/alpha/crt.s b/tests/tcg/alpha/crt.s
> similarity index 100%
> rename from tests/alpha/crt.s
> rename to tests/tcg/alpha/crt.s
> diff --git a/tests/alpha/hello-alpha.c b/tests/tcg/alpha/hello-alpha.c
> similarity index 100%
> rename from tests/alpha/hello-alpha.c
> rename to tests/tcg/alpha/hello-alpha.c
> diff --git a/tests/alpha/test-cond.c b/tests/tcg/alpha/test-cond.c
> similarity index 100%
> rename from tests/alpha/test-cond.c
> rename to tests/tcg/alpha/test-cond.c
> diff --git a/tests/alpha/test-ovf.c b/tests/tcg/alpha/test-ovf.c
> similarity index 100%
> rename from tests/alpha/test-ovf.c
> rename to tests/tcg/alpha/test-ovf.c
> diff --git a/tests/cris/.gdbinit b/tests/tcg/cris/.gdbinit
> similarity index 100%
> rename from tests/cris/.gdbinit
> rename to tests/tcg/cris/.gdbinit
> diff --git a/tests/cris/Makefile b/tests/tcg/cris/Makefile
> similarity index 100%
> rename from tests/cris/Makefile
> rename to tests/tcg/cris/Makefile
> diff --git a/tests/cris/README b/tests/tcg/cris/README
> similarity index 100%
> rename from tests/cris/README
> rename to tests/tcg/cris/README
> diff --git a/tests/cris/check_abs.c b/tests/tcg/cris/check_abs.c
> similarity index 100%
> rename from tests/cris/check_abs.c
> rename to tests/tcg/cris/check_abs.c
> diff --git a/tests/cris/check_addc.c b/tests/tcg/cris/check_addc.c
> similarity index 100%
> rename from tests/cris/check_addc.c
> rename to tests/tcg/cris/check_addc.c
> diff --git a/tests/cris/check_addcm.c b/tests/tcg/cris/check_addcm.c
> similarity index 100%
> rename from tests/cris/check_addcm.c
> rename to tests/tcg/cris/check_addcm.c
> diff --git a/tests/cris/check_addi.s b/tests/tcg/cris/check_addi.s
> similarity index 100%
> rename from tests/cris/check_addi.s
> rename to tests/tcg/cris/check_addi.s
> diff --git a/tests/cris/check_addiv32.s b/tests/tcg/cris/check_addiv32.s
> similarity index 100%
> rename from tests/cris/check_addiv32.s
> rename to tests/tcg/cris/check_addiv32.s
> diff --git a/tests/cris/check_addm.s b/tests/tcg/cris/check_addm.s
> similarity index 100%
> rename from tests/cris/check_addm.s
> rename to tests/tcg/cris/check_addm.s
> diff --git a/tests/cris/check_addo.c b/tests/tcg/cris/check_addo.c
> similarity index 100%
> rename from tests/cris/check_addo.c
> rename to tests/tcg/cris/check_addo.c
> diff --git a/tests/cris/check_addoq.c b/tests/tcg/cris/check_addoq.c
> similarity index 100%
> rename from tests/cris/check_addoq.c
> rename to tests/tcg/cris/check_addoq.c
> diff --git a/tests/cris/check_addq.s b/tests/tcg/cris/check_addq.s
> similarity index 100%
> rename from tests/cris/check_addq.s
> rename to tests/tcg/cris/check_addq.s
> diff --git a/tests/cris/check_addr.s b/tests/tcg/cris/check_addr.s
> similarity index 100%
> rename from tests/cris/check_addr.s
> rename to tests/tcg/cris/check_addr.s
> diff --git a/tests/cris/check_addxc.s b/tests/tcg/cris/check_addxc.s
> similarity index 100%
> rename from tests/cris/check_addxc.s
> rename to tests/tcg/cris/check_addxc.s
> diff --git a/tests/cris/check_addxm.s b/tests/tcg/cris/check_addxm.s
> similarity index 100%
> rename from tests/cris/check_addxm.s
> rename to tests/tcg/cris/check_addxm.s
> diff --git a/tests/cris/check_addxr.s b/tests/tcg/cris/check_addxr.s
> similarity index 100%
> rename from tests/cris/check_addxr.s
> rename to tests/tcg/cris/check_addxr.s
> diff --git a/tests/cris/check_andc.s b/tests/tcg/cris/check_andc.s
> similarity index 100%
> rename from tests/cris/check_andc.s
> rename to tests/tcg/cris/check_andc.s
> diff --git a/tests/cris/check_andm.s b/tests/tcg/cris/check_andm.s
> similarity index 100%
> rename from tests/cris/check_andm.s
> rename to tests/tcg/cris/check_andm.s
> diff --git a/tests/cris/check_andq.s b/tests/tcg/cris/check_andq.s
> similarity index 100%
> rename from tests/cris/check_andq.s
> rename to tests/tcg/cris/check_andq.s
> diff --git a/tests/cris/check_andr.s b/tests/tcg/cris/check_andr.s
> similarity index 100%
> rename from tests/cris/check_andr.s
> rename to tests/tcg/cris/check_andr.s
> diff --git a/tests/cris/check_asr.s b/tests/tcg/cris/check_asr.s
> similarity index 100%
> rename from tests/cris/check_asr.s
> rename to tests/tcg/cris/check_asr.s
> diff --git a/tests/cris/check_ba.s b/tests/tcg/cris/check_ba.s
> similarity index 100%
> rename from tests/cris/check_ba.s
> rename to tests/tcg/cris/check_ba.s
> diff --git a/tests/cris/check_bas.s b/tests/tcg/cris/check_bas.s
> similarity index 100%
> rename from tests/cris/check_bas.s
> rename to tests/tcg/cris/check_bas.s
> diff --git a/tests/cris/check_bcc.s b/tests/tcg/cris/check_bcc.s
> similarity index 100%
> rename from tests/cris/check_bcc.s
> rename to tests/tcg/cris/check_bcc.s
> diff --git a/tests/cris/check_bound.c b/tests/tcg/cris/check_bound.c
> similarity index 100%
> rename from tests/cris/check_bound.c
> rename to tests/tcg/cris/check_bound.c
> diff --git a/tests/cris/check_boundc.s b/tests/tcg/cris/check_boundc.s
> similarity index 100%
> rename from tests/cris/check_boundc.s
> rename to tests/tcg/cris/check_boundc.s
> diff --git a/tests/cris/check_boundr.s b/tests/tcg/cris/check_boundr.s
> similarity index 100%
> rename from tests/cris/check_boundr.s
> rename to tests/tcg/cris/check_boundr.s
> diff --git a/tests/cris/check_btst.s b/tests/tcg/cris/check_btst.s
> similarity index 100%
> rename from tests/cris/check_btst.s
> rename to tests/tcg/cris/check_btst.s
> diff --git a/tests/cris/check_clearfv32.s b/tests/tcg/cris/check_clearfv32.s
> similarity index 100%
> rename from tests/cris/check_clearfv32.s
> rename to tests/tcg/cris/check_clearfv32.s
> diff --git a/tests/cris/check_clrjmp1.s b/tests/tcg/cris/check_clrjmp1.s
> similarity index 100%
> rename from tests/cris/check_clrjmp1.s
> rename to tests/tcg/cris/check_clrjmp1.s
> diff --git a/tests/cris/check_cmp-2.s b/tests/tcg/cris/check_cmp-2.s
> similarity index 100%
> rename from tests/cris/check_cmp-2.s
> rename to tests/tcg/cris/check_cmp-2.s
> diff --git a/tests/cris/check_cmpc.s b/tests/tcg/cris/check_cmpc.s
> similarity index 100%
> rename from tests/cris/check_cmpc.s
> rename to tests/tcg/cris/check_cmpc.s
> diff --git a/tests/cris/check_cmpm.s b/tests/tcg/cris/check_cmpm.s
> similarity index 100%
> rename from tests/cris/check_cmpm.s
> rename to tests/tcg/cris/check_cmpm.s
> diff --git a/tests/cris/check_cmpq.s b/tests/tcg/cris/check_cmpq.s
> similarity index 100%
> rename from tests/cris/check_cmpq.s
> rename to tests/tcg/cris/check_cmpq.s
> diff --git a/tests/cris/check_cmpr.s b/tests/tcg/cris/check_cmpr.s
> similarity index 100%
> rename from tests/cris/check_cmpr.s
> rename to tests/tcg/cris/check_cmpr.s
> diff --git a/tests/cris/check_cmpxc.s b/tests/tcg/cris/check_cmpxc.s
> similarity index 100%
> rename from tests/cris/check_cmpxc.s
> rename to tests/tcg/cris/check_cmpxc.s
> diff --git a/tests/cris/check_cmpxm.s b/tests/tcg/cris/check_cmpxm.s
> similarity index 100%
> rename from tests/cris/check_cmpxm.s
> rename to tests/tcg/cris/check_cmpxm.s
> diff --git a/tests/cris/check_dstep.s b/tests/tcg/cris/check_dstep.s
> similarity index 100%
> rename from tests/cris/check_dstep.s
> rename to tests/tcg/cris/check_dstep.s
> diff --git a/tests/cris/check_ftag.c b/tests/tcg/cris/check_ftag.c
> similarity index 100%
> rename from tests/cris/check_ftag.c
> rename to tests/tcg/cris/check_ftag.c
> diff --git a/tests/cris/check_gcctorture_pr28634-1.c b/tests/tcg/cris/check_gcctorture_pr28634-1.c
> similarity index 100%
> rename from tests/cris/check_gcctorture_pr28634-1.c
> rename to tests/tcg/cris/check_gcctorture_pr28634-1.c
> diff --git a/tests/cris/check_gcctorture_pr28634.c b/tests/tcg/cris/check_gcctorture_pr28634.c
> similarity index 100%
> rename from tests/cris/check_gcctorture_pr28634.c
> rename to tests/tcg/cris/check_gcctorture_pr28634.c
> diff --git a/tests/cris/check_glibc_kernelversion.c b/tests/tcg/cris/check_glibc_kernelversion.c
> similarity index 100%
> rename from tests/cris/check_glibc_kernelversion.c
> rename to tests/tcg/cris/check_glibc_kernelversion.c
> diff --git a/tests/cris/check_hello.c b/tests/tcg/cris/check_hello.c
> similarity index 100%
> rename from tests/cris/check_hello.c
> rename to tests/tcg/cris/check_hello.c
> diff --git a/tests/cris/check_int64.c b/tests/tcg/cris/check_int64.c
> similarity index 100%
> rename from tests/cris/check_int64.c
> rename to tests/tcg/cris/check_int64.c
> diff --git a/tests/cris/check_jsr.s b/tests/tcg/cris/check_jsr.s
> similarity index 100%
> rename from tests/cris/check_jsr.s
> rename to tests/tcg/cris/check_jsr.s
> diff --git a/tests/cris/check_lapc.s b/tests/tcg/cris/check_lapc.s
> similarity index 100%
> rename from tests/cris/check_lapc.s
> rename to tests/tcg/cris/check_lapc.s
> diff --git a/tests/cris/check_lsl.s b/tests/tcg/cris/check_lsl.s
> similarity index 100%
> rename from tests/cris/check_lsl.s
> rename to tests/tcg/cris/check_lsl.s
> diff --git a/tests/cris/check_lsr.s b/tests/tcg/cris/check_lsr.s
> similarity index 100%
> rename from tests/cris/check_lsr.s
> rename to tests/tcg/cris/check_lsr.s
> diff --git a/tests/cris/check_lz.c b/tests/tcg/cris/check_lz.c
> similarity index 100%
> rename from tests/cris/check_lz.c
> rename to tests/tcg/cris/check_lz.c
> diff --git a/tests/cris/check_mapbrk.c b/tests/tcg/cris/check_mapbrk.c
> similarity index 100%
> rename from tests/cris/check_mapbrk.c
> rename to tests/tcg/cris/check_mapbrk.c
> diff --git a/tests/cris/check_mcp.s b/tests/tcg/cris/check_mcp.s
> similarity index 100%
> rename from tests/cris/check_mcp.s
> rename to tests/tcg/cris/check_mcp.s
> diff --git a/tests/cris/check_mmap1.c b/tests/tcg/cris/check_mmap1.c
> similarity index 100%
> rename from tests/cris/check_mmap1.c
> rename to tests/tcg/cris/check_mmap1.c
> diff --git a/tests/cris/check_mmap2.c b/tests/tcg/cris/check_mmap2.c
> similarity index 100%
> rename from tests/cris/check_mmap2.c
> rename to tests/tcg/cris/check_mmap2.c
> diff --git a/tests/cris/check_mmap3.c b/tests/tcg/cris/check_mmap3.c
> similarity index 100%
> rename from tests/cris/check_mmap3.c
> rename to tests/tcg/cris/check_mmap3.c
> diff --git a/tests/cris/check_movdelsr1.s b/tests/tcg/cris/check_movdelsr1.s
> similarity index 100%
> rename from tests/cris/check_movdelsr1.s
> rename to tests/tcg/cris/check_movdelsr1.s
> diff --git a/tests/cris/check_movecr.s b/tests/tcg/cris/check_movecr.s
> similarity index 100%
> rename from tests/cris/check_movecr.s
> rename to tests/tcg/cris/check_movecr.s
> diff --git a/tests/cris/check_movei.s b/tests/tcg/cris/check_movei.s
> similarity index 100%
> rename from tests/cris/check_movei.s
> rename to tests/tcg/cris/check_movei.s
> diff --git a/tests/cris/check_movemr.s b/tests/tcg/cris/check_movemr.s
> similarity index 100%
> rename from tests/cris/check_movemr.s
> rename to tests/tcg/cris/check_movemr.s
> diff --git a/tests/cris/check_movemrv32.s b/tests/tcg/cris/check_movemrv32.s
> similarity index 100%
> rename from tests/cris/check_movemrv32.s
> rename to tests/tcg/cris/check_movemrv32.s
> diff --git a/tests/cris/check_moveq.c b/tests/tcg/cris/check_moveq.c
> similarity index 100%
> rename from tests/cris/check_moveq.c
> rename to tests/tcg/cris/check_moveq.c
> diff --git a/tests/cris/check_mover.s b/tests/tcg/cris/check_mover.s
> similarity index 100%
> rename from tests/cris/check_mover.s
> rename to tests/tcg/cris/check_mover.s
> diff --git a/tests/cris/check_moverm.s b/tests/tcg/cris/check_moverm.s
> similarity index 100%
> rename from tests/cris/check_moverm.s
> rename to tests/tcg/cris/check_moverm.s
> diff --git a/tests/cris/check_movmp.s b/tests/tcg/cris/check_movmp.s
> similarity index 100%
> rename from tests/cris/check_movmp.s
> rename to tests/tcg/cris/check_movmp.s
> diff --git a/tests/cris/check_movpmv32.s b/tests/tcg/cris/check_movpmv32.s
> similarity index 100%
> rename from tests/cris/check_movpmv32.s
> rename to tests/tcg/cris/check_movpmv32.s
> diff --git a/tests/cris/check_movpr.s b/tests/tcg/cris/check_movpr.s
> similarity index 100%
> rename from tests/cris/check_movpr.s
> rename to tests/tcg/cris/check_movpr.s
> diff --git a/tests/cris/check_movprv32.s b/tests/tcg/cris/check_movprv32.s
> similarity index 100%
> rename from tests/cris/check_movprv32.s
> rename to tests/tcg/cris/check_movprv32.s
> diff --git a/tests/cris/check_movscr.s b/tests/tcg/cris/check_movscr.s
> similarity index 100%
> rename from tests/cris/check_movscr.s
> rename to tests/tcg/cris/check_movscr.s
> diff --git a/tests/cris/check_movsm.s b/tests/tcg/cris/check_movsm.s
> similarity index 100%
> rename from tests/cris/check_movsm.s
> rename to tests/tcg/cris/check_movsm.s
> diff --git a/tests/cris/check_movsr.s b/tests/tcg/cris/check_movsr.s
> similarity index 100%
> rename from tests/cris/check_movsr.s
> rename to tests/tcg/cris/check_movsr.s
> diff --git a/tests/cris/check_movucr.s b/tests/tcg/cris/check_movucr.s
> similarity index 100%
> rename from tests/cris/check_movucr.s
> rename to tests/tcg/cris/check_movucr.s
> diff --git a/tests/cris/check_movum.s b/tests/tcg/cris/check_movum.s
> similarity index 100%
> rename from tests/cris/check_movum.s
> rename to tests/tcg/cris/check_movum.s
> diff --git a/tests/cris/check_movur.s b/tests/tcg/cris/check_movur.s
> similarity index 100%
> rename from tests/cris/check_movur.s
> rename to tests/tcg/cris/check_movur.s
> diff --git a/tests/cris/check_mulv32.s b/tests/tcg/cris/check_mulv32.s
> similarity index 100%
> rename from tests/cris/check_mulv32.s
> rename to tests/tcg/cris/check_mulv32.s
> diff --git a/tests/cris/check_mulx.s b/tests/tcg/cris/check_mulx.s
> similarity index 100%
> rename from tests/cris/check_mulx.s
> rename to tests/tcg/cris/check_mulx.s
> diff --git a/tests/cris/check_neg.s b/tests/tcg/cris/check_neg.s
> similarity index 100%
> rename from tests/cris/check_neg.s
> rename to tests/tcg/cris/check_neg.s
> diff --git a/tests/cris/check_not.s b/tests/tcg/cris/check_not.s
> similarity index 100%
> rename from tests/cris/check_not.s
> rename to tests/tcg/cris/check_not.s
> diff --git a/tests/cris/check_openpf1.c b/tests/tcg/cris/check_openpf1.c
> similarity index 100%
> rename from tests/cris/check_openpf1.c
> rename to tests/tcg/cris/check_openpf1.c
> diff --git a/tests/cris/check_openpf2.c b/tests/tcg/cris/check_openpf2.c
> similarity index 100%
> rename from tests/cris/check_openpf2.c
> rename to tests/tcg/cris/check_openpf2.c
> diff --git a/tests/cris/check_openpf3.c b/tests/tcg/cris/check_openpf3.c
> similarity index 100%
> rename from tests/cris/check_openpf3.c
> rename to tests/tcg/cris/check_openpf3.c
> diff --git a/tests/cris/check_openpf4.c b/tests/tcg/cris/check_openpf4.c
> similarity index 100%
> rename from tests/cris/check_openpf4.c
> rename to tests/tcg/cris/check_openpf4.c
> diff --git a/tests/cris/check_openpf5.c b/tests/tcg/cris/check_openpf5.c
> similarity index 100%
> rename from tests/cris/check_openpf5.c
> rename to tests/tcg/cris/check_openpf5.c
> diff --git a/tests/cris/check_orc.s b/tests/tcg/cris/check_orc.s
> similarity index 100%
> rename from tests/cris/check_orc.s
> rename to tests/tcg/cris/check_orc.s
> diff --git a/tests/cris/check_orm.s b/tests/tcg/cris/check_orm.s
> similarity index 100%
> rename from tests/cris/check_orm.s
> rename to tests/tcg/cris/check_orm.s
> diff --git a/tests/cris/check_orq.s b/tests/tcg/cris/check_orq.s
> similarity index 100%
> rename from tests/cris/check_orq.s
> rename to tests/tcg/cris/check_orq.s
> diff --git a/tests/cris/check_orr.s b/tests/tcg/cris/check_orr.s
> similarity index 100%
> rename from tests/cris/check_orr.s
> rename to tests/tcg/cris/check_orr.s
> diff --git a/tests/cris/check_ret.s b/tests/tcg/cris/check_ret.s
> similarity index 100%
> rename from tests/cris/check_ret.s
> rename to tests/tcg/cris/check_ret.s
> diff --git a/tests/cris/check_scc.s b/tests/tcg/cris/check_scc.s
> similarity index 100%
> rename from tests/cris/check_scc.s
> rename to tests/tcg/cris/check_scc.s
> diff --git a/tests/cris/check_settls1.c b/tests/tcg/cris/check_settls1.c
> similarity index 100%
> rename from tests/cris/check_settls1.c
> rename to tests/tcg/cris/check_settls1.c
> diff --git a/tests/cris/check_sigalrm.c b/tests/tcg/cris/check_sigalrm.c
> similarity index 100%
> rename from tests/cris/check_sigalrm.c
> rename to tests/tcg/cris/check_sigalrm.c
> diff --git a/tests/cris/check_stat1.c b/tests/tcg/cris/check_stat1.c
> similarity index 100%
> rename from tests/cris/check_stat1.c
> rename to tests/tcg/cris/check_stat1.c
> diff --git a/tests/cris/check_stat2.c b/tests/tcg/cris/check_stat2.c
> similarity index 100%
> rename from tests/cris/check_stat2.c
> rename to tests/tcg/cris/check_stat2.c
> diff --git a/tests/cris/check_stat3.c b/tests/tcg/cris/check_stat3.c
> similarity index 100%
> rename from tests/cris/check_stat3.c
> rename to tests/tcg/cris/check_stat3.c
> diff --git a/tests/cris/check_stat4.c b/tests/tcg/cris/check_stat4.c
> similarity index 100%
> rename from tests/cris/check_stat4.c
> rename to tests/tcg/cris/check_stat4.c
> diff --git a/tests/cris/check_subc.s b/tests/tcg/cris/check_subc.s
> similarity index 100%
> rename from tests/cris/check_subc.s
> rename to tests/tcg/cris/check_subc.s
> diff --git a/tests/cris/check_subm.s b/tests/tcg/cris/check_subm.s
> similarity index 100%
> rename from tests/cris/check_subm.s
> rename to tests/tcg/cris/check_subm.s
> diff --git a/tests/cris/check_subq.s b/tests/tcg/cris/check_subq.s
> similarity index 100%
> rename from tests/cris/check_subq.s
> rename to tests/tcg/cris/check_subq.s
> diff --git a/tests/cris/check_subr.s b/tests/tcg/cris/check_subr.s
> similarity index 100%
> rename from tests/cris/check_subr.s
> rename to tests/tcg/cris/check_subr.s
> diff --git a/tests/cris/check_swap.c b/tests/tcg/cris/check_swap.c
> similarity index 100%
> rename from tests/cris/check_swap.c
> rename to tests/tcg/cris/check_swap.c
> diff --git a/tests/cris/check_time1.c b/tests/tcg/cris/check_time1.c
> similarity index 100%
> rename from tests/cris/check_time1.c
> rename to tests/tcg/cris/check_time1.c
> diff --git a/tests/cris/check_time2.c b/tests/tcg/cris/check_time2.c
> similarity index 100%
> rename from tests/cris/check_time2.c
> rename to tests/tcg/cris/check_time2.c
> diff --git a/tests/cris/check_xarith.s b/tests/tcg/cris/check_xarith.s
> similarity index 100%
> rename from tests/cris/check_xarith.s
> rename to tests/tcg/cris/check_xarith.s
> diff --git a/tests/cris/crisutils.h b/tests/tcg/cris/crisutils.h
> similarity index 100%
> rename from tests/cris/crisutils.h
> rename to tests/tcg/cris/crisutils.h
> diff --git a/tests/cris/crt.s b/tests/tcg/cris/crt.s
> similarity index 100%
> rename from tests/cris/crt.s
> rename to tests/tcg/cris/crt.s
> diff --git a/tests/cris/sys.c b/tests/tcg/cris/sys.c
> similarity index 100%
> rename from tests/cris/sys.c
> rename to tests/tcg/cris/sys.c
> diff --git a/tests/cris/sys.h b/tests/tcg/cris/sys.h
> similarity index 100%
> rename from tests/cris/sys.h
> rename to tests/tcg/cris/sys.h
> diff --git a/tests/cris/testutils.inc b/tests/tcg/cris/testutils.inc
> similarity index 100%
> rename from tests/cris/testutils.inc
> rename to tests/tcg/cris/testutils.inc
> diff --git a/tests/hello-arm.c b/tests/tcg/hello-arm.c
> similarity index 100%
> rename from tests/hello-arm.c
> rename to tests/tcg/hello-arm.c
> diff --git a/tests/hello-i386.c b/tests/tcg/hello-i386.c
> similarity index 100%
> rename from tests/hello-i386.c
> rename to tests/tcg/hello-i386.c
> diff --git a/tests/hello-mips.c b/tests/tcg/hello-mips.c
> similarity index 100%
> rename from tests/hello-mips.c
> rename to tests/tcg/hello-mips.c
> diff --git a/tests/linux-test.c b/tests/tcg/linux-test.c
> similarity index 100%
> rename from tests/linux-test.c
> rename to tests/tcg/linux-test.c
> diff --git a/tests/lm32/Makefile b/tests/tcg/lm32/Makefile
> similarity index 100%
> rename from tests/lm32/Makefile
> rename to tests/tcg/lm32/Makefile
> diff --git a/tests/lm32/crt.S b/tests/tcg/lm32/crt.S
> similarity index 100%
> rename from tests/lm32/crt.S
> rename to tests/tcg/lm32/crt.S
> diff --git a/tests/lm32/linker.ld b/tests/tcg/lm32/linker.ld
> similarity index 100%
> rename from tests/lm32/linker.ld
> rename to tests/tcg/lm32/linker.ld
> diff --git a/tests/lm32/macros.inc b/tests/tcg/lm32/macros.inc
> similarity index 100%
> rename from tests/lm32/macros.inc
> rename to tests/tcg/lm32/macros.inc
> diff --git a/tests/lm32/test_add.S b/tests/tcg/lm32/test_add.S
> similarity index 100%
> rename from tests/lm32/test_add.S
> rename to tests/tcg/lm32/test_add.S
> diff --git a/tests/lm32/test_addi.S b/tests/tcg/lm32/test_addi.S
> similarity index 100%
> rename from tests/lm32/test_addi.S
> rename to tests/tcg/lm32/test_addi.S
> diff --git a/tests/lm32/test_and.S b/tests/tcg/lm32/test_and.S
> similarity index 100%
> rename from tests/lm32/test_and.S
> rename to tests/tcg/lm32/test_and.S
> diff --git a/tests/lm32/test_andhi.S b/tests/tcg/lm32/test_andhi.S
> similarity index 100%
> rename from tests/lm32/test_andhi.S
> rename to tests/tcg/lm32/test_andhi.S
> diff --git a/tests/lm32/test_andi.S b/tests/tcg/lm32/test_andi.S
> similarity index 100%
> rename from tests/lm32/test_andi.S
> rename to tests/tcg/lm32/test_andi.S
> diff --git a/tests/lm32/test_b.S b/tests/tcg/lm32/test_b.S
> similarity index 100%
> rename from tests/lm32/test_b.S
> rename to tests/tcg/lm32/test_b.S
> diff --git a/tests/lm32/test_be.S b/tests/tcg/lm32/test_be.S
> similarity index 100%
> rename from tests/lm32/test_be.S
> rename to tests/tcg/lm32/test_be.S
> diff --git a/tests/lm32/test_bg.S b/tests/tcg/lm32/test_bg.S
> similarity index 100%
> rename from tests/lm32/test_bg.S
> rename to tests/tcg/lm32/test_bg.S
> diff --git a/tests/lm32/test_bge.S b/tests/tcg/lm32/test_bge.S
> similarity index 100%
> rename from tests/lm32/test_bge.S
> rename to tests/tcg/lm32/test_bge.S
> diff --git a/tests/lm32/test_bgeu.S b/tests/tcg/lm32/test_bgeu.S
> similarity index 100%
> rename from tests/lm32/test_bgeu.S
> rename to tests/tcg/lm32/test_bgeu.S
> diff --git a/tests/lm32/test_bgu.S b/tests/tcg/lm32/test_bgu.S
> similarity index 100%
> rename from tests/lm32/test_bgu.S
> rename to tests/tcg/lm32/test_bgu.S
> diff --git a/tests/lm32/test_bi.S b/tests/tcg/lm32/test_bi.S
> similarity index 100%
> rename from tests/lm32/test_bi.S
> rename to tests/tcg/lm32/test_bi.S
> diff --git a/tests/lm32/test_bne.S b/tests/tcg/lm32/test_bne.S
> similarity index 100%
> rename from tests/lm32/test_bne.S
> rename to tests/tcg/lm32/test_bne.S
> diff --git a/tests/lm32/test_break.S b/tests/tcg/lm32/test_break.S
> similarity index 100%
> rename from tests/lm32/test_break.S
> rename to tests/tcg/lm32/test_break.S
> diff --git a/tests/lm32/test_bret.S b/tests/tcg/lm32/test_bret.S
> similarity index 100%
> rename from tests/lm32/test_bret.S
> rename to tests/tcg/lm32/test_bret.S
> diff --git a/tests/lm32/test_call.S b/tests/tcg/lm32/test_call.S
> similarity index 100%
> rename from tests/lm32/test_call.S
> rename to tests/tcg/lm32/test_call.S
> diff --git a/tests/lm32/test_calli.S b/tests/tcg/lm32/test_calli.S
> similarity index 100%
> rename from tests/lm32/test_calli.S
> rename to tests/tcg/lm32/test_calli.S
> diff --git a/tests/lm32/test_cmpe.S b/tests/tcg/lm32/test_cmpe.S
> similarity index 100%
> rename from tests/lm32/test_cmpe.S
> rename to tests/tcg/lm32/test_cmpe.S
> diff --git a/tests/lm32/test_cmpei.S b/tests/tcg/lm32/test_cmpei.S
> similarity index 100%
> rename from tests/lm32/test_cmpei.S
> rename to tests/tcg/lm32/test_cmpei.S
> diff --git a/tests/lm32/test_cmpg.S b/tests/tcg/lm32/test_cmpg.S
> similarity index 100%
> rename from tests/lm32/test_cmpg.S
> rename to tests/tcg/lm32/test_cmpg.S
> diff --git a/tests/lm32/test_cmpge.S b/tests/tcg/lm32/test_cmpge.S
> similarity index 100%
> rename from tests/lm32/test_cmpge.S
> rename to tests/tcg/lm32/test_cmpge.S
> diff --git a/tests/lm32/test_cmpgei.S b/tests/tcg/lm32/test_cmpgei.S
> similarity index 100%
> rename from tests/lm32/test_cmpgei.S
> rename to tests/tcg/lm32/test_cmpgei.S
> diff --git a/tests/lm32/test_cmpgeu.S b/tests/tcg/lm32/test_cmpgeu.S
> similarity index 100%
> rename from tests/lm32/test_cmpgeu.S
> rename to tests/tcg/lm32/test_cmpgeu.S
> diff --git a/tests/lm32/test_cmpgeui.S b/tests/tcg/lm32/test_cmpgeui.S
> similarity index 100%
> rename from tests/lm32/test_cmpgeui.S
> rename to tests/tcg/lm32/test_cmpgeui.S
> diff --git a/tests/lm32/test_cmpgi.S b/tests/tcg/lm32/test_cmpgi.S
> similarity index 100%
> rename from tests/lm32/test_cmpgi.S
> rename to tests/tcg/lm32/test_cmpgi.S
> diff --git a/tests/lm32/test_cmpgu.S b/tests/tcg/lm32/test_cmpgu.S
> similarity index 100%
> rename from tests/lm32/test_cmpgu.S
> rename to tests/tcg/lm32/test_cmpgu.S
> diff --git a/tests/lm32/test_cmpgui.S b/tests/tcg/lm32/test_cmpgui.S
> similarity index 100%
> rename from tests/lm32/test_cmpgui.S
> rename to tests/tcg/lm32/test_cmpgui.S
> diff --git a/tests/lm32/test_cmpne.S b/tests/tcg/lm32/test_cmpne.S
> similarity index 100%
> rename from tests/lm32/test_cmpne.S
> rename to tests/tcg/lm32/test_cmpne.S
> diff --git a/tests/lm32/test_cmpnei.S b/tests/tcg/lm32/test_cmpnei.S
> similarity index 100%
> rename from tests/lm32/test_cmpnei.S
> rename to tests/tcg/lm32/test_cmpnei.S
> diff --git a/tests/lm32/test_divu.S b/tests/tcg/lm32/test_divu.S
> similarity index 100%
> rename from tests/lm32/test_divu.S
> rename to tests/tcg/lm32/test_divu.S
> diff --git a/tests/lm32/test_eret.S b/tests/tcg/lm32/test_eret.S
> similarity index 100%
> rename from tests/lm32/test_eret.S
> rename to tests/tcg/lm32/test_eret.S
> diff --git a/tests/lm32/test_lb.S b/tests/tcg/lm32/test_lb.S
> similarity index 100%
> rename from tests/lm32/test_lb.S
> rename to tests/tcg/lm32/test_lb.S
> diff --git a/tests/lm32/test_lbu.S b/tests/tcg/lm32/test_lbu.S
> similarity index 100%
> rename from tests/lm32/test_lbu.S
> rename to tests/tcg/lm32/test_lbu.S
> diff --git a/tests/lm32/test_lh.S b/tests/tcg/lm32/test_lh.S
> similarity index 100%
> rename from tests/lm32/test_lh.S
> rename to tests/tcg/lm32/test_lh.S
> diff --git a/tests/lm32/test_lhu.S b/tests/tcg/lm32/test_lhu.S
> similarity index 100%
> rename from tests/lm32/test_lhu.S
> rename to tests/tcg/lm32/test_lhu.S
> diff --git a/tests/lm32/test_lw.S b/tests/tcg/lm32/test_lw.S
> similarity index 100%
> rename from tests/lm32/test_lw.S
> rename to tests/tcg/lm32/test_lw.S
> diff --git a/tests/lm32/test_modu.S b/tests/tcg/lm32/test_modu.S
> similarity index 100%
> rename from tests/lm32/test_modu.S
> rename to tests/tcg/lm32/test_modu.S
> diff --git a/tests/lm32/test_mul.S b/tests/tcg/lm32/test_mul.S
> similarity index 100%
> rename from tests/lm32/test_mul.S
> rename to tests/tcg/lm32/test_mul.S
> diff --git a/tests/lm32/test_muli.S b/tests/tcg/lm32/test_muli.S
> similarity index 100%
> rename from tests/lm32/test_muli.S
> rename to tests/tcg/lm32/test_muli.S
> diff --git a/tests/lm32/test_nor.S b/tests/tcg/lm32/test_nor.S
> similarity index 100%
> rename from tests/lm32/test_nor.S
> rename to tests/tcg/lm32/test_nor.S
> diff --git a/tests/lm32/test_nori.S b/tests/tcg/lm32/test_nori.S
> similarity index 100%
> rename from tests/lm32/test_nori.S
> rename to tests/tcg/lm32/test_nori.S
> diff --git a/tests/lm32/test_or.S b/tests/tcg/lm32/test_or.S
> similarity index 100%
> rename from tests/lm32/test_or.S
> rename to tests/tcg/lm32/test_or.S
> diff --git a/tests/lm32/test_orhi.S b/tests/tcg/lm32/test_orhi.S
> similarity index 100%
> rename from tests/lm32/test_orhi.S
> rename to tests/tcg/lm32/test_orhi.S
> diff --git a/tests/lm32/test_ori.S b/tests/tcg/lm32/test_ori.S
> similarity index 100%
> rename from tests/lm32/test_ori.S
> rename to tests/tcg/lm32/test_ori.S
> diff --git a/tests/lm32/test_ret.S b/tests/tcg/lm32/test_ret.S
> similarity index 100%
> rename from tests/lm32/test_ret.S
> rename to tests/tcg/lm32/test_ret.S
> diff --git a/tests/lm32/test_sb.S b/tests/tcg/lm32/test_sb.S
> similarity index 100%
> rename from tests/lm32/test_sb.S
> rename to tests/tcg/lm32/test_sb.S
> diff --git a/tests/lm32/test_scall.S b/tests/tcg/lm32/test_scall.S
> similarity index 100%
> rename from tests/lm32/test_scall.S
> rename to tests/tcg/lm32/test_scall.S
> diff --git a/tests/lm32/test_sextb.S b/tests/tcg/lm32/test_sextb.S
> similarity index 100%
> rename from tests/lm32/test_sextb.S
> rename to tests/tcg/lm32/test_sextb.S
> diff --git a/tests/lm32/test_sexth.S b/tests/tcg/lm32/test_sexth.S
> similarity index 100%
> rename from tests/lm32/test_sexth.S
> rename to tests/tcg/lm32/test_sexth.S
> diff --git a/tests/lm32/test_sh.S b/tests/tcg/lm32/test_sh.S
> similarity index 100%
> rename from tests/lm32/test_sh.S
> rename to tests/tcg/lm32/test_sh.S
> diff --git a/tests/lm32/test_sl.S b/tests/tcg/lm32/test_sl.S
> similarity index 100%
> rename from tests/lm32/test_sl.S
> rename to tests/tcg/lm32/test_sl.S
> diff --git a/tests/lm32/test_sli.S b/tests/tcg/lm32/test_sli.S
> similarity index 100%
> rename from tests/lm32/test_sli.S
> rename to tests/tcg/lm32/test_sli.S
> diff --git a/tests/lm32/test_sr.S b/tests/tcg/lm32/test_sr.S
> similarity index 100%
> rename from tests/lm32/test_sr.S
> rename to tests/tcg/lm32/test_sr.S
> diff --git a/tests/lm32/test_sri.S b/tests/tcg/lm32/test_sri.S
> similarity index 100%
> rename from tests/lm32/test_sri.S
> rename to tests/tcg/lm32/test_sri.S
> diff --git a/tests/lm32/test_sru.S b/tests/tcg/lm32/test_sru.S
> similarity index 100%
> rename from tests/lm32/test_sru.S
> rename to tests/tcg/lm32/test_sru.S
> diff --git a/tests/lm32/test_srui.S b/tests/tcg/lm32/test_srui.S
> similarity index 100%
> rename from tests/lm32/test_srui.S
> rename to tests/tcg/lm32/test_srui.S
> diff --git a/tests/lm32/test_sub.S b/tests/tcg/lm32/test_sub.S
> similarity index 100%
> rename from tests/lm32/test_sub.S
> rename to tests/tcg/lm32/test_sub.S
> diff --git a/tests/lm32/test_sw.S b/tests/tcg/lm32/test_sw.S
> similarity index 100%
> rename from tests/lm32/test_sw.S
> rename to tests/tcg/lm32/test_sw.S
> diff --git a/tests/lm32/test_xnor.S b/tests/tcg/lm32/test_xnor.S
> similarity index 100%
> rename from tests/lm32/test_xnor.S
> rename to tests/tcg/lm32/test_xnor.S
> diff --git a/tests/lm32/test_xnori.S b/tests/tcg/lm32/test_xnori.S
> similarity index 100%
> rename from tests/lm32/test_xnori.S
> rename to tests/tcg/lm32/test_xnori.S
> diff --git a/tests/lm32/test_xor.S b/tests/tcg/lm32/test_xor.S
> similarity index 100%
> rename from tests/lm32/test_xor.S
> rename to tests/tcg/lm32/test_xor.S
> diff --git a/tests/lm32/test_xori.S b/tests/tcg/lm32/test_xori.S
> similarity index 100%
> rename from tests/lm32/test_xori.S
> rename to tests/tcg/lm32/test_xori.S
> diff --git a/tests/pi_10.com b/tests/tcg/pi_10.com
> similarity index 100%
> rename from tests/pi_10.com
> rename to tests/tcg/pi_10.com
> diff --git a/tests/runcom.c b/tests/tcg/runcom.c
> similarity index 100%
> rename from tests/runcom.c
> rename to tests/tcg/runcom.c
> diff --git a/tests/sha1.c b/tests/tcg/sha1.c
> similarity index 100%
> rename from tests/sha1.c
> rename to tests/tcg/sha1.c
> diff --git a/tests/test-arm-iwmmxt.s b/tests/tcg/test-arm-iwmmxt.s
> similarity index 100%
> rename from tests/test-arm-iwmmxt.s
> rename to tests/tcg/test-arm-iwmmxt.s
> diff --git a/tests/test-i386-code16.S b/tests/tcg/test-i386-code16.S
> similarity index 100%
> rename from tests/test-i386-code16.S
> rename to tests/tcg/test-i386-code16.S
> diff --git a/tests/test-i386-muldiv.h b/tests/tcg/test-i386-muldiv.h
> similarity index 100%
> rename from tests/test-i386-muldiv.h
> rename to tests/tcg/test-i386-muldiv.h
> diff --git a/tests/test-i386-shift.h b/tests/tcg/test-i386-shift.h
> similarity index 100%
> rename from tests/test-i386-shift.h
> rename to tests/tcg/test-i386-shift.h
> diff --git a/tests/test-i386-ssse3.c b/tests/tcg/test-i386-ssse3.c
> similarity index 100%
> rename from tests/test-i386-ssse3.c
> rename to tests/tcg/test-i386-ssse3.c
> diff --git a/tests/test-i386-vm86.S b/tests/tcg/test-i386-vm86.S
> similarity index 100%
> rename from tests/test-i386-vm86.S
> rename to tests/tcg/test-i386-vm86.S
> diff --git a/tests/test-i386.c b/tests/tcg/test-i386.c
> similarity index 100%
> rename from tests/test-i386.c
> rename to tests/tcg/test-i386.c
> diff --git a/tests/test-i386.h b/tests/tcg/test-i386.h
> similarity index 100%
> rename from tests/test-i386.h
> rename to tests/tcg/test-i386.h
> diff --git a/tests/test-mmap.c b/tests/tcg/test-mmap.c
> similarity index 100%
> rename from tests/test-mmap.c
> rename to tests/tcg/test-mmap.c
> diff --git a/tests/test_path.c b/tests/tcg/test_path.c
> similarity index 100%
> rename from tests/test_path.c
> rename to tests/tcg/test_path.c
> diff --git a/tests/testthread.c b/tests/tcg/testthread.c
> similarity index 100%
> rename from tests/testthread.c
> rename to tests/tcg/testthread.c
> diff --git a/tests/xtensa/Makefile b/tests/tcg/xtensa/Makefile
> similarity index 100%
> rename from tests/xtensa/Makefile
> rename to tests/tcg/xtensa/Makefile
> diff --git a/tests/xtensa/crt.S b/tests/tcg/xtensa/crt.S
> similarity index 100%
> rename from tests/xtensa/crt.S
> rename to tests/tcg/xtensa/crt.S
> diff --git a/tests/xtensa/linker.ld b/tests/tcg/xtensa/linker.ld
> similarity index 100%
> rename from tests/xtensa/linker.ld
> rename to tests/tcg/xtensa/linker.ld
> diff --git a/tests/xtensa/macros.inc b/tests/tcg/xtensa/macros.inc
> similarity index 100%
> rename from tests/xtensa/macros.inc
> rename to tests/tcg/xtensa/macros.inc
> diff --git a/tests/xtensa/test_b.S b/tests/tcg/xtensa/test_b.S
> similarity index 100%
> rename from tests/xtensa/test_b.S
> rename to tests/tcg/xtensa/test_b.S
> diff --git a/tests/xtensa/test_bi.S b/tests/tcg/xtensa/test_bi.S
> similarity index 100%
> rename from tests/xtensa/test_bi.S
> rename to tests/tcg/xtensa/test_bi.S
> diff --git a/tests/xtensa/test_boolean.S b/tests/tcg/xtensa/test_boolean.S
> similarity index 100%
> rename from tests/xtensa/test_boolean.S
> rename to tests/tcg/xtensa/test_boolean.S
> diff --git a/tests/xtensa/test_bz.S b/tests/tcg/xtensa/test_bz.S
> similarity index 100%
> rename from tests/xtensa/test_bz.S
> rename to tests/tcg/xtensa/test_bz.S
> diff --git a/tests/xtensa/test_clamps.S b/tests/tcg/xtensa/test_clamps.S
> similarity index 100%
> rename from tests/xtensa/test_clamps.S
> rename to tests/tcg/xtensa/test_clamps.S
> diff --git a/tests/xtensa/test_fail.S b/tests/tcg/xtensa/test_fail.S
> similarity index 100%
> rename from tests/xtensa/test_fail.S
> rename to tests/tcg/xtensa/test_fail.S
> diff --git a/tests/xtensa/test_interrupt.S b/tests/tcg/xtensa/test_interrupt.S
> similarity index 100%
> rename from tests/xtensa/test_interrupt.S
> rename to tests/tcg/xtensa/test_interrupt.S
> diff --git a/tests/xtensa/test_loop.S b/tests/tcg/xtensa/test_loop.S
> similarity index 100%
> rename from tests/xtensa/test_loop.S
> rename to tests/tcg/xtensa/test_loop.S
> diff --git a/tests/xtensa/test_mac16.S b/tests/tcg/xtensa/test_mac16.S
> similarity index 100%
> rename from tests/xtensa/test_mac16.S
> rename to tests/tcg/xtensa/test_mac16.S
> diff --git a/tests/xtensa/test_max.S b/tests/tcg/xtensa/test_max.S
> similarity index 100%
> rename from tests/xtensa/test_max.S
> rename to tests/tcg/xtensa/test_max.S
> diff --git a/tests/xtensa/test_min.S b/tests/tcg/xtensa/test_min.S
> similarity index 100%
> rename from tests/xtensa/test_min.S
> rename to tests/tcg/xtensa/test_min.S
> diff --git a/tests/xtensa/test_mmu.S b/tests/tcg/xtensa/test_mmu.S
> similarity index 100%
> rename from tests/xtensa/test_mmu.S
> rename to tests/tcg/xtensa/test_mmu.S
> diff --git a/tests/xtensa/test_mul16.S b/tests/tcg/xtensa/test_mul16.S
> similarity index 100%
> rename from tests/xtensa/test_mul16.S
> rename to tests/tcg/xtensa/test_mul16.S
> diff --git a/tests/xtensa/test_mul32.S b/tests/tcg/xtensa/test_mul32.S
> similarity index 100%
> rename from tests/xtensa/test_mul32.S
> rename to tests/tcg/xtensa/test_mul32.S
> diff --git a/tests/xtensa/test_nsa.S b/tests/tcg/xtensa/test_nsa.S
> similarity index 100%
> rename from tests/xtensa/test_nsa.S
> rename to tests/tcg/xtensa/test_nsa.S
> diff --git a/tests/xtensa/test_pipeline.S b/tests/tcg/xtensa/test_pipeline.S
> similarity index 100%
> rename from tests/xtensa/test_pipeline.S
> rename to tests/tcg/xtensa/test_pipeline.S
> diff --git a/tests/xtensa/test_quo.S b/tests/tcg/xtensa/test_quo.S
> similarity index 100%
> rename from tests/xtensa/test_quo.S
> rename to tests/tcg/xtensa/test_quo.S
> diff --git a/tests/xtensa/test_rem.S b/tests/tcg/xtensa/test_rem.S
> similarity index 100%
> rename from tests/xtensa/test_rem.S
> rename to tests/tcg/xtensa/test_rem.S
> diff --git a/tests/xtensa/test_rst0.S b/tests/tcg/xtensa/test_rst0.S
> similarity index 100%
> rename from tests/xtensa/test_rst0.S
> rename to tests/tcg/xtensa/test_rst0.S
> diff --git a/tests/xtensa/test_sar.S b/tests/tcg/xtensa/test_sar.S
> similarity index 100%
> rename from tests/xtensa/test_sar.S
> rename to tests/tcg/xtensa/test_sar.S
> diff --git a/tests/xtensa/test_sext.S b/tests/tcg/xtensa/test_sext.S
> similarity index 100%
> rename from tests/xtensa/test_sext.S
> rename to tests/tcg/xtensa/test_sext.S
> diff --git a/tests/xtensa/test_shift.S b/tests/tcg/xtensa/test_shift.S
> similarity index 100%
> rename from tests/xtensa/test_shift.S
> rename to tests/tcg/xtensa/test_shift.S
> diff --git a/tests/xtensa/test_timer.S b/tests/tcg/xtensa/test_timer.S
> similarity index 100%
> rename from tests/xtensa/test_timer.S
> rename to tests/tcg/xtensa/test_timer.S
> diff --git a/tests/xtensa/test_windowed.S b/tests/tcg/xtensa/test_windowed.S
> similarity index 100%
> rename from tests/xtensa/test_windowed.S
> rename to tests/tcg/xtensa/test_windowed.S
> diff --git a/tests/xtensa/vectors.S b/tests/tcg/xtensa/vectors.S
> similarity index 100%
> rename from tests/xtensa/vectors.S
> rename to tests/tcg/xtensa/vectors.S

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Qemu-devel] --enable-check-utests gone, you may have to re-run configure (was: [PATCH 10/15] test: eliminate libcheck tests and have make check use gtester)
  2012-01-10 19:10 ` [Qemu-devel] [PATCH 10/15] test: eliminate libcheck tests and have make check use gtester Anthony Liguori
  2012-01-12 12:17   ` Eduardo Habkost
@ 2012-01-13 10:58   ` Markus Armbruster
  1 sibling, 0 replies; 25+ messages in thread
From: Markus Armbruster @ 2012-01-13 10:58 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel

Deserves more prominent notice, so here goes:

Anthony Liguori <aliguori@us.ibm.com> writes:

[...]
> @@ -733,10 +732,6 @@ for opt do
>    ;;
>    --enable-fdt) fdt="yes"
>    ;;
> -  --disable-check-utests) check_utests="no"
> -  ;;
> -  --enable-check-utests) check_utests="yes"
> -  ;;
>    --disable-nptl) nptl="no"
>    ;;
>    --enable-nptl) nptl="yes"

Just drop the option from your configure command line.

[...]

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2012-01-13 10:58 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-10 19:10 [Qemu-devel] [PATCH 01/15] tests: mv tests/* -> tests/tcg Anthony Liguori
2012-01-10 19:10 ` [Qemu-devel] [PATCH 02/15] build: split unit test builds to a separate makefile fragment Anthony Liguori
2012-01-10 19:10 ` [Qemu-devel] [PATCH 03/15] check-qdict: convert to gtest Anthony Liguori
2012-01-10 19:10 ` [Qemu-devel] [PATCH 04/15] check-qfloat: " Anthony Liguori
2012-01-10 19:10 ` [Qemu-devel] [PATCH 05/15] check-qint: " Anthony Liguori
2012-01-10 19:10 ` [Qemu-devel] [PATCH 06/15] check-qstring: " Anthony Liguori
2012-01-10 19:10 ` [Qemu-devel] [PATCH 07/15] check-qlist: " Anthony Liguori
2012-01-10 19:10 ` [Qemu-devel] [PATCH 08/15] check-qjson: " Anthony Liguori
2012-01-10 19:10 ` [Qemu-devel] [PATCH 09/15] check-qjson: enable disabled tests Anthony Liguori
2012-01-10 19:10 ` [Qemu-devel] [PATCH 10/15] test: eliminate libcheck tests and have make check use gtester Anthony Liguori
2012-01-12 12:17   ` Eduardo Habkost
2012-01-13 10:58   ` [Qemu-devel] --enable-check-utests gone, you may have to re-run configure (was: [PATCH 10/15] test: eliminate libcheck tests and have make check use gtester) Markus Armbruster
2012-01-10 19:10 ` [Qemu-devel] [PATCH 11/15] qtest: add test framework Anthony Liguori
2012-01-10 19:10 ` [Qemu-devel] [PATCH 12/15] qtest: add support for target-i386 -M pc Anthony Liguori
2012-01-10 19:56   ` Paolo Bonzini
2012-01-11 19:44     ` Anthony Liguori
2012-01-12  9:25       ` Paolo Bonzini
2012-01-10 19:10 ` [Qemu-devel] [PATCH 13/15] qtest: add C version of test infrastructure Anthony Liguori
2012-01-10 19:10 ` [Qemu-devel] [PATCH 14/15] make: add check targets based on gtester Anthony Liguori
2012-01-10 19:10 ` [Qemu-devel] [PATCH 15/15] qtest: add rtc-test test-case Anthony Liguori
2012-01-10 19:59   ` Paolo Bonzini
2012-01-11 17:06     ` Anthony Liguori
2012-01-11 19:27       ` Paolo Bonzini
2012-01-10 22:35 ` [Qemu-devel] [PATCH 01/15] tests: mv tests/* -> tests/tcg Andreas Färber
2012-01-12 16:53 ` Anthony Liguori

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.