From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 References: <20190306214226.14598-1-tobin@kernel.org> <20190306214226.14598-4-tobin@kernel.org> In-Reply-To: From: Kees Cook Date: Tue, 2 Apr 2019 14:51:41 -0700 Message-ID: Subject: Re: [PATCH v3 3/7] kselftest/lib: Use new shell runner to define tests Content-Type: text/plain; charset="UTF-8" To: "Tobin C. Harding" Cc: Shuah Khan , Jann Horn , Andy Shevchenko , Randy Dunlap , Rasmus Villemoes , Stephen Rothwell , Andy Lutomirski , Daniel Micay , Arnd Bergmann , Miguel Ojeda , "Gustavo A. R. Silva" , Greg Kroah-Hartman , Alexander Shishkin , Kernel Hardening , "open list:KERNEL SELFTEST FRAMEWORK" , LKML List-ID: On Tue, Apr 2, 2019 at 2:45 PM Kees Cook wrote: > > On Wed, Mar 6, 2019 at 1:43 PM Tobin C. Harding wrote: > > [...] > > diff --git a/tools/testing/selftests/lib/prime_numbers.sh b/tools/testing/selftests/lib/prime_numbers.sh > > index 78e7483c8d60..6f782386d897 100755 > > --- a/tools/testing/selftests/lib/prime_numbers.sh > > +++ b/tools/testing/selftests/lib/prime_numbers.sh > > @@ -2,18 +2,17 @@ > > [...] > > -if /sbin/modprobe -q prime_numbers selftest=65536; then > > Here it is! This conversion loses the "selftest=..." argument to modprobe. > > And I think all of these files could be reduced to a single script > that did something like: > > . $path/kselftest_module.sh > > run "strscpy" test_strscpy > run "bitmap" test_bitmap > run "prime numbers" prime_numbers selftest=65536 > > and kselftest_module.sh could define a "trap {...} EXIT" to perform > the reporting of everything that got run. Though I guess if we want separate scripts per module, ignore me on this part. :) -- Kees Cook