In some cases we may need to check multiple sysfs values for tests. If this happens, create the ability to pass in multiple arguments to _require_test_dev_sysfs() instead of having to call the function multiple times. Signed-off-by: John Pittman --- common/rc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/common/rc b/common/rc index b76a856..f09ba8b 100644 --- a/common/rc +++ b/common/rc @@ -326,11 +326,14 @@ _test_dev_is_rotational() { } _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 + local attr ret=0 + for attr in "$@"; do + if [[ ! -e "${TEST_DEV_SYSFS}/$attr" ]]; then + SKIP_REASONS+=("${TEST_DEV} does not have sysfs attribute $attr") + ret=1 + fi + done + return $ret } _require_test_dev_is_rotational() { -- 2.51.1