mbox series

[blktests,v4,0/6] fix module check issues

Message ID 20220823001154.114624-1-shinichiro.kawasaki@wdc.com (mailing list archive)
Headers show
Series fix module check issues | expand

Message

Shinichiro Kawasaki Aug. 23, 2022, 12:11 a.m. UTC
Current blktests have unexpected test case failures caused by module
availability checks. This series addresses two issues related to module check
and fix the failures.

The first issue is caused by module load by _have_driver(). When this helper
function checks the specified module (or driver) is available, it loads the
module using modprobe command. It leaves the module loaded and affects following
test cases. The first patch addresses this issue. The second patch avoids side
affects of the first patch on nbd test cases.

The second issue is in _have_modules(). Recently, _have_driver() helper function
was introduced to provide similar but different feature from _have_modules().
However, it turned out that _have_modules() is not working as expected and does
exactly same check as _have_driver(). The third patch fixes _have_modules() to
work as expected. This change makes block/001 and srp test group skipped.
Following two patches adjust skip conditions not to skip the test cases.

The last patch is an additional clean up to change _have_modules() to
_have_module() to make its usage consistent with _have_driver().

Changes from v3:
* Dropped 4th patch and added new 6th patch
* Added Reviewed-by tags

Changes from v2:
* 1st patch: kept single bracket style
* 3rd patch: replaced find -or option with -o
* 4th patch: adjusted to the 1st patch change
* 6th patch: simplified _have_drivers() arguments

Changes from v1:
* 1st patch: added Reviewed-by tag
* 4th patch: added changes in new test cases

Shin'ichiro Kawasaki (6):
  common/rc: avoid module load in _have_driver()
  nbd/rc: load nbd module explicitly
  common/rc: ensure modules are loadable in _have_modules()
  block/001: use _have_driver() in place of _have_modules()
  srp/rc: allow test with built-in sd_mod and sg drivers
  common,tests: replace _have_modules() with _have_module()

 common/rc          | 40 ++++++++++++++++++++++++----------------
 common/scsi_debug  |  2 +-
 tests/block/001    |  4 +++-
 tests/nbd/004      |  2 +-
 tests/nbd/rc       | 12 ++++++++++--
 tests/nvmeof-mp/rc | 32 +++++++++++++++-----------------
 tests/srp/015      |  2 +-
 tests/srp/rc       | 45 +++++++++++++++++++++------------------------
 tests/zbd/010      |  2 +-
 9 files changed, 77 insertions(+), 64 deletions(-)

Comments

Shinichiro Kawasaki Aug. 30, 2022, midnight UTC | #1
On Aug 23, 2022 / 09:11, Shin'ichiro Kawasaki wrote:
> Current blktests have unexpected test case failures caused by module
> availability checks. This series addresses two issues related to module check
> and fix the failures.
> 
> The first issue is caused by module load by _have_driver(). When this helper
> function checks the specified module (or driver) is available, it loads the
> module using modprobe command. It leaves the module loaded and affects following
> test cases. The first patch addresses this issue. The second patch avoids side
> affects of the first patch on nbd test cases.
> 
> The second issue is in _have_modules(). Recently, _have_driver() helper function
> was introduced to provide similar but different feature from _have_modules().
> However, it turned out that _have_modules() is not working as expected and does
> exactly same check as _have_driver(). The third patch fixes _have_modules() to
> work as expected. This change makes block/001 and srp test group skipped.
> Following two patches adjust skip conditions not to skip the test cases.
> 
> The last patch is an additional clean up to change _have_modules() to
> _have_module() to make its usage consistent with _have_driver().

I've applied this series to the upstream. Thanks for the reviews.