The test case block/005 requires TEST_DEV to have the queue/scheduler sysfs attribute. However, kernel no longer provides the attribute since version 6.5. Add the helper function _require_test_dev_sysfs to check the requirement. Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx> --- common/rc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/rc b/common/rc index 52d1602..caaa49c 100644 --- a/common/rc +++ b/common/rc @@ -256,6 +256,14 @@ _test_dev_is_rotational() { [[ $(cat "${TEST_DEV_SYSFS}/queue/rotational") -ne 0 ]] } +_require_test_dev_sysfs() { + if [[ ! -e "${TEST_DEV_SYSFS}/$1" ]]; then + SKIP_REASONS+=("${TEST_DEV} does not have sysfs attribute $1") + return 1 + fi + return 0 +} + _require_test_dev_is_rotational() { if ! _test_dev_is_rotational; then SKIP_REASONS+=("$TEST_DEV is not rotational") -- 2.40.1