Re: [PATCH] testsuite: handle busybox's timeout

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

 



On Fri, Jun 15, 2018 at 11:53:14AM -0700, Josh Triplett wrote:
> On Fri, Jun 15, 2018 at 06:31:39PM +0200, Luc Van Oostenryck wrote:
> > The busybox version of timeout(1) requires that the duration
> > is given via a '-t' option.
> > 
> > However, the GNU coreutils' version has no such option and simply
> > take the duration as its first argument.
> > 
> > Fix the test-suite script to detect which version is used and pass
> > the duration accordingly.
> > 
> > Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
> 
> Rather than detecting the version, how about looking at `timeout --help`
> for '-t\>' or '-k\>' ?

Yes, that would be better (however, IIRC, the support for --help in
busybox is optional).
 
> (Or, for that matter, teaching busybox to know better. At some point,
> especially for commands unspecified by POSIX, I think it'd make sense to
> just treat deficiencies as bugs.)

Yes, I agree, however:
* I doubt such a change would be accepted because it would be
  an incompatible changes for the users of busybox's timeout(1)
* even if accepted, it would take much time to be in a release
  and then present in distros (but maybe Alpine has a relatively
  short cycle? I dunno).

The whole thing annoys me a little bit and I'm wondering if it wouldn't
be better to not use the timeout command and cook something in pure
POSIX shell instead.

-- Luc
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux