blktests: use patient module remover
Get series with b4
b4 am [email protected]Versions newest first
- v4 Latest2 patches 7 repliesIn review
Changes in v4 from the cover letter
- Rebased onto current blktests master
- Fixed built-in module handling: _patient_rmmod() now checks for the existence of /sys/module/$module_sys/refcnt to detect built-in modules and returns success early (Shinichiro Kawasaki)
- Fixed timeout parameter timing issue: MODPROBE_PATIENT_RM_TIMEOUT_SECONDS is now evaluated dynamically inside _patient_rmmod() rather than at source time, allowing tests to override the timeout value (Shinichiro Kawasaki)
- Preserved SKIP_REASONS logic in _init_null_blk() when modprobe fails, so tests requiring loadable modules are properly skipped rather than failing (Shinichiro Kawasaki)
- Fixed typo in comment: "modprobe -p" -> "modprobe --wait" (Luis Chamberlain)
- Fixed path reference bug: used $module_sys instead of $module for /sys/module path checks (Luis Chamberlain)
- Combined nested while conditions for cleaner code style (Shinichiro Kawasaki)
- Removed redundant $module printing in error messages (Shinichiro Kawasaki)
- Updated to use --wait=TIMEOUT_MSEC syntax (with =) to match the upstream kmod implementation
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | blktests: replace module removal with patient module removalcommon/ common/ common/ +3 more | +145 | 7 replies | |
| 2/2 | tests/srp/rc: replace module removal with patient module removaltests/ | +3 | 0 replies |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Chaitanya Kulkarni |
|---|---|
| 1/2 | R-b |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/2] blktests: use patient module remover
This rebases the patient module remover series onto the current blktests tree and addresses all the feedback from v3 from a long time ago [0]. This came up recently as Swarna noticed the same flaky bug and I got reminded to re-send a new iteraiton.
We now have the modprobe --wait upstream so use that if avaiable.
The patient module remover addresses race conditions where module removal can fail due to userspace temporarily bumping the refcount (e.g., via blkdev_open() calls). If your version of kmod supports modprobe --wait, we use that. Otherwise we implement our own patient module remover.
[0] https://lore.kernel.org/all/[email protected]/T/#u
Changes in v4:
- Rebased onto current blktests master
- Fixed built-in module handling: _patient_rmmod() now checks for the existence of /sys/module/$module_sys/refcnt to detect built-in modules and returns success early (Shinichiro Kawasaki)
- Fixed timeout parameter timing issue: MODPROBE_PATIENT_RM_TIMEOUT_SECONDS is now evaluated dynamically inside _patient_rmmod() rather than at source time, allowing tests to override the timeout value (Shinichiro Kawasaki)
- Preserved SKIP_REASONS logic in _init_null_blk() when modprobe fails, so tests requiring loadable modules are properly skipped rather than failing (Shinichiro Kawasaki)
- Fixed typo in comment: "modprobe -p" -> "modprobe --wait" (Luis Chamberlain)
- Fixed path reference bug: used $module_sys instead of $module for /sys/module path checks (Luis Chamberlain)
- Combined nested while conditions for cleaner code style (Shinichiro Kawasaki)
- Removed redundant $module printing in error messages (Shinichiro Kawasaki)
- Updated to use --wait=TIMEOUT_MSEC syntax (with =) to match the upstream kmod implementation
Luis Chamberlain (2):
blktests: replace module removal with patient module removal tests/srp/rc: replace module removal with patient module removal
common/multipath-over-rdma | 11 +--- common/null_blk | 6 +- common/nvme | 9 +-- common/rc | 126 +++++++++++++++++++++++++++++++++++++ common/scsi_debug | 14 ++--- tests/srp/rc | 19 ++---- 6 files changed, 148 insertions(+), 37 deletions(-)
Signature · 1 line
2.51.0