On Thu, Apr 19, 2012 at 20:27, Blue Swirl <blauwir...@gmail.com> wrote: > Add simple m48t59 qtests, enable test only for Sparc32 > and Sparc64. On PPC, the device is behind PCI bus. > > Signed-off-by: Blue Swirl <blauwir...@gmail.com> > --- > tests/Makefile | 3 + > tests/m48t59-test.c | 259 > +++++++++++++++++++++++++++++++++++++++++++++++++++
Even with these simple tests, I got pretty nice test coverage: Function 'm48t59_set_addr' Lines executed:0.00% of 4 Function 'm48t59_toggle_lock' Lines executed:0.00% of 4 Function 'do_qemu_init_m48t59_register_types' Lines executed:100.00% of 1 Function 'm48t59_register_types' Lines executed:100.00% of 4 Function 'm48t59_init_class_isa1' Lines executed:100.00% of 8 Function 'm48t59_class_init' Lines executed:100.00% of 7 Function 'm48t59_reset_common' Lines executed:100.00% of 8 Function 'm48t59_reset_isa' Lines executed:100.00% of 5 Function 'm48t59_reset_sysbus' Lines executed:100.00% of 5 Function 'm48t59_init_common' Lines executed:100.00% of 9 Function 'm48t59_init_isa1' Lines executed:100.00% of 6 Function 'watchdog_cb' Lines executed:100.00% of 10 Function 'alarm_cb' Lines executed:93.94% of 33 Function 'set_alarm' Lines executed:100.00% of 7 Function 'set_time' Lines executed:100.00% of 4 Function 'm48t59_init1' Lines executed:100.00% of 8 Function 'm48t59_init_isa' Lines executed:100.00% of 12 Function 'm48t59_init' Lines executed:87.50% of 16 Function 'set_up_watchdog' Lines executed:100.00% of 9 Function 'm48t59_read' Lines executed:94.12% of 34 Function 'nvram_readl' Lines executed:0.00% of 7 Function 'nvram_readw' Lines executed:0.00% of 5 Function 'nvram_readb' Lines executed:100.00% of 4 Function 'NVRAM_readb' Lines executed:85.71% of 7 Function 'm48t59_write' Lines executed:97.44% of 78 Function 'nvram_writel' Lines executed:0.00% of 7 Function 'nvram_writew' Lines executed:0.00% of 5 Function 'nvram_writeb' Lines executed:100.00% of 4 Function 'NVRAM_writeb' Lines executed:100.00% of 12 File '/src/qemu/hw/m48t59.c' Lines executed:87.19% of 320 /src/qemu/hw/m48t59.c:creating 'm48t59.c.gcov' File '/src/qemu/qemu-timer.h' Lines executed:100.00% of 1 /src/qemu/qemu-timer.h:creating 'qemu-timer.h.gcov' File '/src/qemu/qemu-common.h' Lines executed:100.00% of 2 /src/qemu/qemu-common.h:creating 'qemu-common.h.gcov'