lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20131202132603.7dd7c0a6@gandalf.local.home>
Date:	Mon, 2 Dec 2013 13:26:03 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Satoru Takeuchi <satoru.takeuchi@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ktest: Make the signal to terminate the console
 configurable.

On Sun, 01 Dec 2013 07:57:58 +0900
Satoru Takeuchi <satoru.takeuchi@...il.com> wrote:

>  Currently ktest send SIGINT to terminate the console.
>  However, there are consoles which doesn't exit by this signal, for example,
>  in my case, "virsh console <guest OS>". In such case, ktest is blocked in
>  close_console(). It prevents to automate tests.
> 
> This patch adds new option CLOSE_CONSOLE_SIGNAL which mean the
> signal to terminate the console. Since its default value is "INT",
> the original behavior isn't changed.

Thanks! I'll add this to my 3.14 queue

-- Steve

> 
> Signed-off-by: Satoru Takeuchi <satoru.takeuchi@...il.com>
> Cc: Steven Rostedt <rostedt@...dmis.org>
> 
> ---
>  tools/testing/ktest/ktest.pl | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
> index 999eab1..4e5ee67 100755
> --- a/tools/testing/ktest/ktest.pl
> +++ b/tools/testing/ktest/ktest.pl
> @@ -25,6 +25,7 @@ my %default = (
>      "TEST_TYPE"			=> "build",
>      "BUILD_TYPE"		=> "randconfig",
>      "MAKE_CMD"			=> "make",
> +    "CLOSE_CONSOLE_SIGNAL"	=> "INT",
>      "TIMEOUT"			=> 120,
>      "TMP_DIR"			=> "/tmp/ktest/\${MACHINE}",
>      "SLEEP_TIME"		=> 60,	# sleep time between tests
> @@ -163,6 +164,7 @@ my $timeout;
>  my $booted_timeout;
>  my $detect_triplefault;
>  my $console;
> +my $close_console_signal;
>  my $reboot_success_line;
>  my $success_line;
>  my $stop_after_success;
> @@ -285,6 +287,7 @@ my %option_map = (
>      "TIMEOUT"			=> \$timeout,
>      "BOOTED_TIMEOUT"		=> \$booted_timeout,
>      "CONSOLE"			=> \$console,
> +    "CLOSE_CONSOLE_SIGNAL"	=> \$close_console_signal,
>      "DETECT_TRIPLE_FAULT"	=> \$detect_triplefault,
>      "SUCCESS_LINE"		=> \$success_line,
>      "REBOOT_SUCCESS_LINE"	=> \$reboot_success_line,
> @@ -1296,7 +1299,7 @@ sub close_console {
>      my ($fp, $pid) = @_;
>  
>      doprint "kill child process $pid\n";
> -    kill 2, $pid;
> +    kill $close_console_signal, $pid;
>  
>      print "closing!\n";
>      close($fp);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ