summaryrefslogtreecommitdiff
path: root/runner/executor.c
diff options
context:
space:
mode:
Diffstat (limited to 'runner/executor.c')
-rw-r--r--runner/executor.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/runner/executor.c b/runner/executor.c
index 1a00237f..2bb82827 100644
--- a/runner/executor.c
+++ b/runner/executor.c
@@ -638,6 +638,25 @@ static const char *get_cmdline(pid_t pid, char *buf, ssize_t len)
return buf;
}
+static bool sysrq(char cmd)
+{
+ bool success = false;
+ int fd;
+
+ fd = open("/proc/sysrq-trigger", O_WRONLY);
+ if (fd >= 0) {
+ success = write(fd, &cmd, 1) == 1;
+ close(fd);
+ }
+
+ return success;
+}
+
+static void show_kernel_task_state(void)
+{
+ sysrq('t');
+}
+
/*
* Returns:
* =0 - Success
@@ -728,6 +747,8 @@ static int monitor_output(pid_t child,
switch (killed) {
case 0:
+ show_kernel_task_state();
+
if (settings->log_level >= LOG_LEVEL_NORMAL) {
outf("Timeout. Killing the current test with SIGQUIT.\n");
fflush(stdout);