From 9edb19639554223e25f39eff091a5e4df9497a1d Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Wed, 6 Apr 2022 12:14:51 -0700 Subject: [PATCH] test-runner: fix ctrl-c for UML The TIOCSTTY ioctl was not shared between UML and QEMU which prevented any console input from making it into UML. This fixes that, and now ctrl-c can be used to stop UML test execution. --- tools/runner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/runner.py b/tools/runner.py index 14df63ec..fbdf9ddf 100644 --- a/tools/runner.py +++ b/tools/runner.py @@ -277,6 +277,8 @@ class RunnerAbstract: else: os.remove(f) + fcntl.ioctl(STDIN_FILENO, TIOCSTTY, 1) + def cleanup_environment(self): rmtree('/tmp/iwd') rmtree('/tmp/certs') @@ -479,8 +481,6 @@ class QemuRunner(RunnerAbstract): super().prepare_environment() - fcntl.ioctl(STDIN_FILENO, TIOCSTTY, 1) - def stop(self): RB_AUTOBOOT = 0x01234567 #