[Toybox] [PATCH] killall.test, pidof.test: deflake.

enh enh at google.com
Thu Sep 19 07:45:41 PDT 2019


On Thu, Sep 19, 2019 at 7:37 AM Rob Landley <rob at landley.net> wrote:
>
> On 9/16/19 3:17 PM, enh via Toybox wrote:
> > Rarely (but these tests now get run often), it seems like we catch the
> > shell between its fork and exec of sleep, which counts as false
> > positives for killall/pidof. Since we don't actually need to sleep, just
> > have the shell script spin instead.
>
> What's the failure here? The fork but not yet exec means we think the shell has
> done a (subshell) or backgrounded& something, so we killed two instances of the
> test. Ok. This is bad how? Isn't killall supposed to kill all? (What test
> actually fails?)

the test is checking the list of pids (so we can tell it's actually
doing anything), so there's an unexpected extra entry.

> If we're not running in a sufficiently controlled environment theoretically two
> instances of the test _suite_ could be running at the same time. I'm confused...
>
> Rob



More information about the Toybox mailing list