From 45dcdb9da632b5a5e7639707e12b1b17029c5a1e Mon Sep 17 00:00:00 2001 From: Paulo Alcantara Date: Sun, 28 Jun 2015 14:58:57 -0300 Subject: tests: add testcase for TCO watchdog emulation This patch adds a testcase that covers the following: 1) TCO default values 2) first and second TCO timeout 3) watch and validate ticks counter through TCO_RLD register 4) maximum supported TCO timeout (0x3ff) 5) watchdog actions (pause/reset/shutdown/none) upon second TCO timeout 6) set and get of TCO control and status bits MST: The test does not pass yet, so it's disabled by default. Signed-off-by: Paulo Alcantara Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/Makefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/Makefile') diff --git a/tests/Makefile b/tests/Makefile index eff5e11..52ae178 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -152,6 +152,7 @@ check-qtest-i386-y += tests/i440fx-test$(EXESUF) check-qtest-i386-y += tests/fw_cfg-test$(EXESUF) check-qtest-i386-y += tests/drive_del-test$(EXESUF) check-qtest-i386-y += tests/wdt_ib700-test$(EXESUF) +#check-qtest-i386-y += tests/tco-test$(EXESUF) gcov-files-i386-y += hw/watchdog/watchdog.c hw/watchdog/wdt_ib700.c check-qtest-i386-y += $(check-qtest-pci-y) gcov-files-i386-y += $(gcov-files-pci-y) @@ -370,6 +371,7 @@ tests/eepro100-test$(EXESUF): tests/eepro100-test.o tests/vmxnet3-test$(EXESUF): tests/vmxnet3-test.o tests/ne2000-test$(EXESUF): tests/ne2000-test.o tests/wdt_ib700-test$(EXESUF): tests/wdt_ib700-test.o +tests/tco-test$(EXESUF): tests/tco-test.o $(libqos-pc-obj-y) tests/virtio-balloon-test$(EXESUF): tests/virtio-balloon-test.o tests/virtio-blk-test$(EXESUF): tests/virtio-blk-test.o $(libqos-virtio-obj-y) tests/virtio-net-test$(EXESUF): tests/virtio-net-test.o $(libqos-pc-obj-y) -- cgit v1.1 From c4fc82bf1ad088a84ccedf779f6aa928e4fadb5f Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Wed, 8 Jul 2015 10:06:15 +0300 Subject: tco-test: fix up config accesses and re-enable The mistake that made the test fail was that it tried to use a BAR address as an offset for config accesses to LPC. Config accesses don't need a BAR, and LPC does not have one. Don't attempt to map it. With this change applied, TCO test passes, so re-enable it. Signed-off-by: Michael S. Tsirkin --- tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/Makefile') diff --git a/tests/Makefile b/tests/Makefile index 52ae178..ef1e981 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -152,7 +152,7 @@ check-qtest-i386-y += tests/i440fx-test$(EXESUF) check-qtest-i386-y += tests/fw_cfg-test$(EXESUF) check-qtest-i386-y += tests/drive_del-test$(EXESUF) check-qtest-i386-y += tests/wdt_ib700-test$(EXESUF) -#check-qtest-i386-y += tests/tco-test$(EXESUF) +check-qtest-i386-y += tests/tco-test$(EXESUF) gcov-files-i386-y += hw/watchdog/watchdog.c hw/watchdog/wdt_ib700.c check-qtest-i386-y += $(check-qtest-pci-y) gcov-files-i386-y += $(gcov-files-pci-y) -- cgit v1.1