Smithay / calloop

A callback-based Event Loop
MIT License
176 stars 34 forks source link

Use pipe fds in insert_source_no_interest test instead of stdin. #108

Closed detly closed 2 years ago

detly commented 2 years ago

Fixes #96 where this test would fail when stdin is closed (eg. by redirecting from /dev/null).

(I copied the lowest-common-denomimator from the ping sources, so it emulated the existing behaviour where we just used a raw fd, but maybe it's worth just using our own Ping source?)

codecov[bot] commented 2 years ago

Codecov Report

Merging #108 (59544ba) into master (1bb9a66) will increase coverage by 0.29%. The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #108      +/-   ##
==========================================
+ Coverage   88.92%   89.22%   +0.29%     
==========================================
  Files          17       17              
  Lines        1698     1698              
==========================================
+ Hits         1510     1515       +5     
+ Misses        188      183       -5     
Flag Coverage Δ
macos-latest 88.71% <ø> (+0.35%) :arrow_up:
ubuntu-latest 87.43% <ø> (+0.20%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/loop_logic.rs 89.78% <ø> (+0.85%) :arrow_up:
src/sources/generic.rs 84.74% <0.00%> (+5.08%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1bb9a66...59544ba. Read the comment docs.

elinorbgr commented 2 years ago

Thanks!