File 0004-test-watchdog-include-pre-timeout-in-timeout-setting.patch of Package systemd-v234-testsuite

From f11fd5ef675183e4d737b97be93ab1d6b63d9102 Mon Sep 17 00:00:00 2001
From: Thomas Blume <thomas.blume@suse.com>
Date: Tue, 22 Jan 2019 11:11:42 +0100
Subject: [PATCH 04/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 e3c19647fc..4c8a11adb8 100644
--- a/src/test/test-watchdog.c
+++ b/src/test/test-watchdog.c
@@ -23,7 +23,7 @@
 #include "watchdog.h"
 
 int main(int argc, char *argv[]) {
-        usec_t t = 10 * USEC_PER_SEC;
+        usec_t t = 30 * USEC_PER_SEC;
         unsigned i;
         int r;
 
@@ -40,7 +40,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.16.4

openSUSE Build Service is sponsored by