We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e71582 commit 6d573a0Copy full SHA for 6d573a0
tools/testing/selftests/kmod/kmod.sh
@@ -505,18 +505,23 @@ function test_num()
505
fi
506
}
507
508
-function get_test_count()
+function get_test_data()
509
{
510
test_num $1
511
- TEST_DATA=$(echo $ALL_TESTS | awk '{print $'$1'}')
+ local field_num=$(echo $1 | sed 's/^0*//')
512
+ echo $ALL_TESTS | awk '{print $'$field_num'}'
513
+}
514
+
515
+function get_test_count()
516
+{
517
+ TEST_DATA=$(get_test_data $1)
518
LAST_TWO=${TEST_DATA#*:*}
519
echo ${LAST_TWO%:*}
520
521
522
function get_test_enabled()
523
- test_num $1
524
525
echo ${TEST_DATA#*:*:}
526
527
0 commit comments