Page MenuHomeFreeBSD

procstat/tests: Fix flakiness by waiting for program to start
ClosedPublic

Authored by jilles on Sep 4 2019, 2:00 PM.
Tags
None
Referenced Files
F132916753: D21519.id61650.diff
Tue, Oct 21, 4:10 AM
F132916750: D21519.id.diff
Tue, Oct 21, 4:10 AM
F132916747: D21519.id61646.diff
Tue, Oct 21, 4:10 AM
F132916741: D21519.id61645.diff
Tue, Oct 21, 4:10 AM
F132874078: D21519.diff
Mon, Oct 20, 5:49 PM
Unknown Object (File)
Mon, Oct 20, 6:44 AM
Unknown Object (File)
Sun, Oct 12, 6:21 AM
Unknown Object (File)
Mon, Sep 29, 11:05 AM
Subscribers

Details

Summary

Some of the procstat tests start a program "while1" and examine the process
using procstat, but did not wait properly for it to start (kill -0 will
succeed immediately after the child process has been created).

Instead, have "while1" write something when it starts, and use a fifo to
wait for that.

PR: 233587, 233588

Test Plan

sh -c 'while kyua test; do :; done'
and let it continue for a while

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 26273
Build 24759: arc lint + arc unit

Event Timeline

Remove no longer used variable MAX_TRIES

Thank you for fixing my flaky test (and for teaching me a new tidbit about shell support)!

This revision is now accepted and ready to land.Sep 4 2019, 2:20 PM