[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] tests: make a long running test responsive to Ctrl-C
From: |
Jim Meyering |
Subject: |
Re: [PATCH] tests: make a long running test responsive to Ctrl-C |
Date: |
Fri, 9 Oct 2015 20:40:15 -0700 |
On Fri, Oct 9, 2015 at 8:07 PM, Pádraig Brady <address@hidden> wrote:
> * tests/misc/sort-compress-hang.sh: Use --foreground with the
> timeout(1) command (noting the caveats), to run the sort command
> in the foreground program group, and thus be responsive to Ctrl-C.
> This very_expensive_ test takes over a minute on a i3-2310M,
> with RAM backed /tmp.
> ---
> tests/misc/sort-compress-hang.sh | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/tests/misc/sort-compress-hang.sh
> b/tests/misc/sort-compress-hang.sh
> index dc101fe..4013d12 100755
> --- a/tests/misc/sort-compress-hang.sh
> +++ b/tests/misc/sort-compress-hang.sh
> @@ -35,7 +35,11 @@ tac exp > in || fail=1
> # 'sort' could be running slowly on an overburdened machine.
> # On a circa-2010 Linux server using NFS, a successful test completes
> # in about 170 seconds, so specify 1700 seconds as a safety margin.
> -timeout 1700 sort --compress-program=./compress -S 1k in > out || fail=1
> +# Note --foreground will not kill any of the "compress" sub processes,
> +# assuming they're well beahved and exit in a timely manner, but will
Looks fine, modulo a comment typo: s/beahved/behaved/