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

pkhuong / kismet-cache / 6207687088
99%

Build:
DEFAULT BRANCH: main
Ran 16 Sep 2023 01:35PM UTC
Jobs 1
Files 10
Run time 2s
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

16 Sep 2023 01:33PM UTC coverage: 98.852% (-0.02%) from 98.869%
6207687088

push

github

pkhuong
stack: check close(2) before publishing NamedTempFile to cache

Close *can* fail for real I/O reasons, and while it would be ideal
to always fsync:

1. that's an (opt-out) option
2. it can still be nice to detect post-fsync failures
3. with NFS close-to-open consistency, closing is the most reliable
   way to make the file's contents globally visible.

In general, Kismet works on paths, not files, so there's not much
we can do about closing (or not) the underlying File object before
publishing it.

For `NamedTempFile`s though, we get both a file and a path!  We can
extract the file, make sure it's ready for publication (world readable,
fsync-ed if necessary, and then closed) before passing the `TempPath`
to Kismet's usual path-based machinery.

This `TempPath` is what keeps the temporary file path alive, so everything
will still be cleaned up on error, even though the file descriptor
itself is long gone.

Of course, Rust doesn't yet have an `Error`-ful `File::close`, so we
roll our own with libc...

65 of 65 new or added lines in 1 file covered. (100.0%)

3703 of 3746 relevant lines covered (98.85%)

346.35 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6207687088.1 16 Sep 2023 01:35PM UTC 0
98.85
GitHub Action Run
Source Files on build 6207687088
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #6207687088
  • eecff358 on github
  • Prev Build on main (#6134500243)
  • Next Build on main (#6461524775)
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