selftests: kmod: fix handling test numbers above 9

get_test_count() and get_test_enabled() were broken for test numbers
above 9 due to awk interpreting a field specification like '$0010' as
octal rather than decimal.  Fix it by stripping the leading zeroes.

Signed-off-by: Eric Biggers <>
Signed-off-by: Andrew Morton <>
Acked-by: Luis Chamberlain <>
Cc: Alexei Starovoitov <>
Cc: Greg Kroah-Hartman <>
Cc: Jeff Vander Stoep <>
Cc: Jessica Yu <>
Cc: Kees Cook <>
Cc: NeilBrown <>
Signed-off-by: Linus Torvalds <>
1 file changed