Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: detect loop devices with deleted files as an invariant #14568

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zyga
Copy link
Contributor

@zyga zyga commented Oct 2, 2024

When a loop device is created with a given backing file, the file itself may be deleted. The kernel keeps the reference to the file alive but it also adjusts the name of the file to have the suffix " (deleted)".

We should not have loop devices with this property across tests. They might indicate that a mount sticks around and leaks through a reference somehow, or that the low-level loop-back utilities are buggy.

When a loop device is created with a given backing file, the file itself
may be deleted. The kernel keeps the reference to the file alive but it
also adjusts the name of the file to have the suffix " (deleted)".

We should not have loop devices with this property across tests.
They might indicate that a mount sticks around and leaks through a
reference somehow, or that the low-level loop-back utilities are buggy.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
@zyga zyga force-pushed the tweak/deleted-loop-invariant branch from 4daf969 to 346c55e Compare October 2, 2024 13:14
Copy link

codecov bot commented Oct 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.87%. Comparing base (ac897ee) to head (346c55e).
Report is 47 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #14568      +/-   ##
==========================================
+ Coverage   78.85%   78.87%   +0.01%     
==========================================
  Files        1079     1083       +4     
  Lines      145615   146105     +490     
==========================================
+ Hits       114828   115239     +411     
- Misses      23601    23671      +70     
- Partials     7186     7195       +9     
Flag Coverage Δ
unittests 78.87% <ø> (+0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant