bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tests: use our new timeout program


From: Jim Meyering
Subject: Re: [PATCH] tests: use our new timeout program
Date: Thu, 02 Oct 2008 07:17:33 +0200

Pádraig Brady <address@hidden> wrote:
> Jim Meyering wrote:
>> I suspended a 'make check' run, and when I resumed it I was not
>> surprised to see this particular test fail.
>> Then I kicked myself for not thinking to use coreutils' own
>> new timeout program before this.
>
> I presume you mean suspended the machine here, rather than
> suspended the job? If just suspending the job, timeout will
> still fail as the alarm will keep counting down in the kernel
> (and will be sent to timeout when it's running again).

Ahh.  Thanks for the reminder.

> I.E. timeout currently doesn't handle a SIGSTOP or SIGTSTP specially,
> as I was thinking it should count down system running time rather
> than job running time, as that is dependent on many factors.
> Is this correct?

IMHO, that's the right default.
However, this use case suggests that an option to make
timeout count job-running-time would be a welcome feature.

> Using timeout is a better solution in any case,
> as it will terminate the rm command more quickly.
>
> thanks,
> Pádraig.
>
> p.s. don't all posix shells support $((..))

As far as I know, yes.

> I.E. $(($(date +%s) - start) rather than using $(expr $(date +%s) - $start)
> I.E. if we're relying on $() shouldn't we also use $(()) ?

Yes. that's more readable.
I'm slowly getting used to being able to assume a POSIX shell.
I'd welcome a patch to update everything.
I wonder if it's worth adding a test for this to m4/posix-shell.m4.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]