On Jan 07, 2025 / 14:19, Li Zhijian wrote: > (Most of the this cover letter was generated by the chatgpt) > Hello, > > This patch series aims to enhance the efficiency and clarity of the > requires() by optimizing the way module driver and remove unnecessary '&&' > > Here's a brief summary of each patch included in this series: > > 1. **Patch 1/4: common/rc: Test `have_driver` before checking its driver parameter** > - This patch optimizes the `_have_module_param()` function by first > verifying the presence of a driver with `_have_driver()`. This change reduces > unnecessary checks and error logs when a driver is not available, improving > test efficiency. > > 2. **Patch 2/4: tests, common: Get rid of `_have_null_blk`** > - The `_have_null_blk` function has been removed since it duplicates the > functionality of `_have_driver null_blk`. This helps streamline the > codebase by eliminating redundancy. > > 3. **Patch 3/4: common, new, tests: Get rid of `_have_scsi_debug`** > - Similar to the previous patch, `_have_scsi_debug` was also redundant. > This patch removes it to ensure consistency and reduce code complexity. > > 4. **Patch 4/4: tests: Remove unnecessary '&&' in `requires()` functions** > - This patch refactors `requires()` functions to evaluate conditions > independently. The change aims to improve diagnostic clarity by displaying > all unmet conditions and their respective skip reasons. > > These changes should collectively improve the test scripts' readability > and efficiency, making module checks faster and less error-prone. > Please review the patches and provide feedback. Hi Li, thanks for the patches. I'm all for the 1st and 4th patches, but rather reluctant to agree with the 2nd and 3rd patches. IMO, "_have_null_blk" and "_have_scsi_debug" are not so bad since they need less types, and a bit more comfortable to read than "_have_driver scsi_debug/null_blk". I already applied the 1st patch (thanks!). If you agree with my comment above, rework for the 4th patch will be appreciated.