]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: kmod: fix handling test numbers above 9
authorEric Biggers <ebiggers@google.com>
Fri, 10 Apr 2020 21:33:53 +0000 (14:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 10 Apr 2020 22:36:22 +0000 (15:36 -0700)
commite4c3becc34a7bfbf6bbb54f0b2a7cdfc15b5f278
tree00a23959e5669c3690e437d6fb4495087c3be692
parent561f77febbd9db3299d4fa9730dc5fd4fd12ac29
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 <ebiggers@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Luis Chamberlain <mcgrof@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jeff Vander Stoep <jeffv@google.com>
Cc: Jessica Yu <jeyu@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: NeilBrown <neilb@suse.com>
Link: http://lkml.kernel.org/r/20200318230515.171692-5-ebiggers@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
tools/testing/selftests/kmod/kmod.sh