• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

SanDisk-Open-Source / desmod / 70
98%

Build:
DEFAULT BRANCH: master
Ran 23 Jan 2017 07:42PM UTC
Jobs 6
Files 16
Run time 4min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
70

push

travis-ci

jpgrayson
Repair race between py.test and progress thread

In multi-factor simulations (i.e. when using simulate_many()), there is a
progress thread that consumes progress information from the various
simulation processes and prints a progress display to stderr. The progress
thread is a daemon thread, so the strategy was to not join with it and
instead allow it to be auto-terminated, if necessary, when the main thread
terminated.

However, this strategy is exposed to a race condition with py.test. The
problem is that py.test wraps sys.stderr and may close sys.stderr before
the progress thread (which uses sys.stderr) is done with it. In a regular
environment, sys.stderr is not explicitly closed and is thus always
available to the progress thread.

A two-fold strategy is employed to repair this race opportunity. First, we
now attempt to join the progress thread. This join is done with a short, 1
second timeout so as to not allow the main thread to get stuck indefinitely
if the progress thread is blocked waiting for the progress queue.

Second, we put some safety rails in _consume_multi_display_simple(). This
is the particular display function affected by py.test closing stderr. We
avoid extra isatty() calls (because those fail when the file is closed) as
well as testing fd.closed before writing to it.

1168 of 1470 relevant lines covered (79.46%)

4.76 hits per line

Jobs
ID Job ID Ran Files Coverage
1 70.1 23 Jan 2017 07:42PM UTC 0
79.32
Travis Job 70.1
3 70.3 23 Jan 2017 07:42PM UTC 0
79.39
Travis Job 70.3
4 70.4 23 Jan 2017 07:42PM UTC 0
79.32
Travis Job 70.4
5 70.5 23 Jan 2017 07:42PM UTC 0
79.32
Travis Job 70.5
6 70.6 23 Jan 2017 07:43PM UTC 0
79.39
Travis Job 70.6
7 70.7 23 Jan 2017 07:47PM UTC 0
79.05
Travis Job 70.7
Source Files on build 70
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #70
  • 4cb47145 on github
  • Prev Build on master (#69)
  • Next Build on master (#71)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc