File 0007-test-watchdog-include-pre-timeout-in-timeout-setting.patch of Package systemd-v237-testsuite
From f3f64e5538e60988737755b8578faf1f0d3ec104 Mon Sep 17 00:00:00 2001
From: Sergio Lindo Mansilla <slindomansilla@suse.com>
Date: Mon, 18 Jun 2018 13:41:29 +0200
Subject: [PATCH 07/11] test-watchdog: include pre-timeout in timeout setting
from bsc#1042933 comment#24
Documentation/watchdog/watchdog-api.txt:
"Some watchdog timers can be set to have a trigger go off before the
actual time they will reset the system. This can be done with an NMI,
interrupt, or other mechanism. This allows Linux to record useful
information (like panic information and kernel coredumps) before it
resets."
Hpwdt implements the pretimeout feature. For Proliant systems the length of
time for the pre-timeout is 9 seconds. That is 9 seconds before the ASR would
reset the system, an NMI is sent to it. Receipt of the NMI allows hpwdt to
initiate a crash dump.
---
src/test/test-watchdog.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/test/test-watchdog.c b/src/test/test-watchdog.c
index ffcf408f5..47ee61da6 100644
--- a/src/test/test-watchdog.c
+++ b/src/test/test-watchdog.c
@@ -37,7 +37,7 @@ int main(int argc, char *argv[]) {
r = getenv_bool("SYSTEMD_SLOW_TESTS");
slow = r >= 0 ? r : SYSTEMD_SLOW_TESTS_DEFAULT;
- t = slow ? 10 * USEC_PER_SEC : 1 * USEC_PER_SEC;
+ t = slow ? 30 * USEC_PER_SEC : 1 * USEC_PER_SEC;
count = slow ? 5 : 3;
r = watchdog_set_timeout(&t);
@@ -52,7 +52,7 @@ int main(int argc, char *argv[]) {
if (r < 0)
log_warning_errno(r, "Failed to ping watchdog: %m");
- usleep(t/2);
+ usleep(t/6);
}
watchdog_close(true);
--
2.13.7