From: Ruediger Meier <sweet_f_a@gmx.de>
To: Karel Zak <kzak@redhat.com>
Cc: Bernhard Voelker <mail@bernhard-voelker.de>, util-linux@vger.kernel.org
Subject: Re: [PATCH] tests: wait for flock background process
Date: Thu, 3 Nov 2016 08:57:09 +0200 [thread overview]
Message-ID: <201611030757.09823.sweet_f_a@gmx.de> (raw)
In-Reply-To: <20161102230828.n2rlorlyf4rwjiqc@ws.net.home>
On Thursday 03 November 2016, Karel Zak wrote:
> On Wed, Nov 02, 2016 at 11:11:42PM +0100, Bernhard Voelker wrote:
> > On 11/02/2016 04:51 PM, Karel Zak wrote:
> > >> +timeout 1s bash -c "while [ \$(ps --ppid $pid |wc -l) -lt 2 ];
> > >> do sleep 0.1 ;done" \
> > >
> > > is "0.1" portable? :-)
> >
> > if one has timeout from coreutils, then it's likely that she also
> > has sleep from there. Thus said, I'd rather worry about
> > portability of using timeout rather than the "0.1" (if sleep fails,
> > then nobody will care anyway). ;-)
>
> Good point... I have added check for "timeout".
BTW we have already a lot more coreutils and other GNU dependencies in
our tests, inclusive timeout and sleep for floats.
AFAIR for v2.28 I had fixed all GNU deps for configure/make but for the
test-suite it was too painful. The OSX build on travis needs for the
tests at least GNU readlink, seq, truncate, find, xargs, tar and sed.
The Linux-only tests have even more coreutils deps.
To replace sleep for floats, we could check and use usleep(1) from
sysvinit. Or we could even add usleep to util-linux as we did with
other sysvinit commands.
cu,
Rudi
next prev parent reply other threads:[~2016-11-03 6:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-02 14:31 [PATCH] tests: wait for flock background process Ruediger Meier
2016-11-02 15:51 ` Karel Zak
2016-11-02 22:11 ` Bernhard Voelker
2016-11-02 23:08 ` Karel Zak
2016-11-03 6:57 ` Ruediger Meier [this message]
2016-11-03 12:09 ` Pádraig Brady
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201611030757.09823.sweet_f_a@gmx.de \
--to=sweet_f_a@gmx.de \
--cc=kzak@redhat.com \
--cc=mail@bernhard-voelker.de \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox