Skip to content

Commit

Permalink
watchdog.cfg: support for a 'TCO' watchdog
Browse files Browse the repository at this point in the history
The Q35 machine type chipset comes with unconditional
support for a 'TCO' watchdog

Signed-off-by: Yiqian Wei <yiwei@redhat.com>
  • Loading branch information
yiqianwei committed Nov 2, 2023
1 parent 674bf8a commit f58f356
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 35 deletions.
73 changes: 39 additions & 34 deletions qemu/tests/cfg/watchdog.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
only s390x
watchdog_device_type = diag288
module_check_cmd = "lsmod | grep diag288"
-itco:
required_qemu = [8.0.0,)
only q35
watchdog_device_type = itco
module_check_cmd = "lsmod | grep iTCO_wdt"
variants:
- boot_with_watchdog:
test_type = guest_boot_with_watchdog
Expand Down Expand Up @@ -67,40 +72,40 @@
no ppc64, ppc64le, s390x
migration_protocol = rdma
- hotplug_unplug_watchdog_device:
only i6300esb
no RHEL.4 RHEL.5
no q35
del watchdog_device_type
plug_watchdog_device = i6300esb
watchdog_action = pause
test_type = hotplug_unplug_watchdog_device
only i6300esb
no RHEL.4 RHEL.5
no q35
del watchdog_device_type
plug_watchdog_device = i6300esb
watchdog_action = pause
test_type = hotplug_unplug_watchdog_device
- stop_cont_test:
test_type = stop_cont_test
trigger_cmd = `command -v python python3 | head -1` -c "open('/dev/watchdog', 'w').close()"
watchdog_action = debug
response_timeout = 40
test_type = stop_cont_test
trigger_cmd = `command -v python python3 | head -1` -c "open('/dev/watchdog', 'w').close()"
watchdog_action = debug
response_timeout = 40
- watchdog_test_suit:
test_type = watchdog_test_suit
watchdog_action = pause
watchdog_test_lib = "watchdog/watchdog-test-framework"
test_type = watchdog_test_suit
watchdog_action = pause
watchdog_test_lib = "watchdog/watchdog-test-framework"
- heartbeat_test:
only i6300esb
test_type = heartbeat_test
del_module_cmd = "modprobe -r i6300esb"
reload_module_cmd = "modprobe i6300esb heartbeat=%s"
trigger_cmd = `command -v python python3 | head -1` -c "open('/dev/watchdog', 'w')"
watchdog_action = pause
dmesg_cmd = dmesg -c
variants:
- valid:
heartbeat = random_value
- invalid_1:
heartbeat = -1
- invalid_0:
heartbeat = 0
- invalid_min:
heartbeat = -2147483648
- invalid_max:
heartbeat = 2147483647
- invalid_excp:
heartbeat = 4294967296
only i6300esb
test_type = heartbeat_test
del_module_cmd = "modprobe -r i6300esb"
reload_module_cmd = "modprobe i6300esb heartbeat=%s"
trigger_cmd = `command -v python python3 | head -1` -c "open('/dev/watchdog', 'w')"
watchdog_action = pause
dmesg_cmd = dmesg -c
variants:
- valid:
heartbeat = random_value
- invalid_1:
heartbeat = -1
- invalid_0:
heartbeat = 0
- invalid_min:
heartbeat = -2147483648
- invalid_max:
heartbeat = 2147483647
- invalid_excp:
heartbeat = 4294967296
6 changes: 5 additions & 1 deletion qemu/tests/watchdog.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,11 @@ def heartbeat_test():

# main procedure
test_type = params.get("test_type")
check_watchdog_support()
watchdog_device_type = params.get("watchdog_device_type")
if watchdog_device_type == "itco":
pass
else:
check_watchdog_support()

error_context.context("'%s' test starting ... " % test_type, test.log.info)
error_context.context("Boot VM with WDT(Device:'%s', Action:'%s'),"
Expand Down

0 comments on commit f58f356

Please sign in to comment.