linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Naresh Kamboju <naresh.kamboju@linaro.org>
To: "Tobin C. Harding" <tobin@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>, Kees Cook <keescook@chromium.org>,
	Jann Horn <jannh@google.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Andy Lutomirski <luto@amacapital.net>,
	Daniel Micay <danielmicay@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	kernel-hardening@lists.openwall.com,
	"open list:KERNEL SELFTEST FRAMEWORK" 
	<linux-kselftest@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 2/6] kselftest: Add test runner creation script
Date: Wed, 30 Oct 2019 18:15:22 +0530	[thread overview]
Message-ID: <CA+G9fYsfJpXQvOvHdjtg8z4a89dSStOQZOKa9zMjjQgWKng1aw@mail.gmail.com> (raw)
In-Reply-To: <20190405015859.32755-3-tobin@kernel.org>

Hi Tobin,

On Fri, 5 Apr 2019 at 07:30, Tobin C. Harding <tobin@kernel.org> wrote:
>
> Currently if we wish to use kselftest to run tests within a kernel
> module we write a small script to load/unload and do error reporting.
> There are a bunch of these under tools/testing/selftests/lib/ that are
> all identical except for the test name.  We can reduce code duplication
> and improve maintainability if we have one version of this.  However
> kselftest requires an executable for each test.  We can move all the
> script logic to a central script then have each individual test script
> call the main script.
>
> Oneliner to call kselftest_module.sh courtesy of Kees, thanks!
>
> Add test runner creation script.  Convert
> tools/testing/selftests/lib/*.sh to use new test creation script.
>
> Testing
> -------
>
> Configure kselftests for lib/ then build and boot kernel.  Then run
> kselftests as follows:
>
>   $ cd /path/to/kernel/tree
>   $ sudo make O=$output_path -C tools/testing/selftests TARGETS="lib" run_tests

We are missing "kselftest_module.sh" file when we do "make install"
and followed by generating a tar file "gen_kselftest_tar.sh" and
copying that on to target device and running tests by using
"run_kselftest.sh" script file on the target.

Could you install the supporting script file "kselftest_module.sh" ?

Error log,
-------------
# selftests lib printf.sh
lib: printf.sh_ #
# ./printf.sh line 4 ./../kselftest_module.sh No such file or directory
line: 4_./../kselftest_module.sh #
[FAIL] 1 selftests lib printf.sh # exit=127
selftests: lib_printf.sh [FAIL]
# selftests lib bitmap.sh
lib: bitmap.sh_ #
# ./bitmap.sh line 3 ./../kselftest_module.sh No such file or directory
line: 3_./../kselftest_module.sh #
[FAIL] 2 selftests lib bitmap.sh # exit=127
selftests: lib_bitmap.sh [FAIL]
# selftests lib prime_numbers.sh
lib: prime_numbers.sh_ #
# ./prime_numbers.sh line 4 ./../kselftest_module.sh No such file or directory
line: 4_./../kselftest_module.sh #
[FAIL] 3 selftests lib prime_numbers.sh # exit=127
selftests: lib_prime_numbers.sh [FAIL]
# selftests lib strscpy.sh
lib: strscpy.sh_ #
# ./strscpy.sh line 3 ./../kselftest_module.sh No such file or directory
line: 3_./../kselftest_module.sh #
[FAIL] 4 selftests lib strscpy.sh # exit=127
selftests: lib_strscpy.sh [FAIL]

- Naresh

  reply	other threads:[~2019-10-30 12:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-05  1:58 [PATCH v4 0/6] lib/string: Add strscpy_pad() function Tobin C. Harding
2019-04-05  1:58 ` [PATCH v4 1/6] lib/test_printf: Add empty module_exit function Tobin C. Harding
2019-04-05  1:58 ` [PATCH v4 2/6] kselftest: Add test runner creation script Tobin C. Harding
2019-10-30 12:45   ` Naresh Kamboju [this message]
2019-10-30 19:16     ` Kees Cook
2019-04-05  1:58 ` [PATCH v4 3/6] kselftest: Add test module framework header Tobin C. Harding
2019-04-05  1:58 ` [PATCH v4 4/6] lib: Use new kselftest header Tobin C. Harding
2019-04-05  1:58 ` [PATCH v4 5/6] lib/string: Add strscpy_pad() function Tobin C. Harding
2019-04-05  1:58 ` [PATCH v4 6/6] lib: Add test module for strscpy_pad Tobin C. Harding
2019-04-07 21:45 ` [PATCH v4 0/6] lib/string: Add strscpy_pad() function Tobin C. Harding
2019-04-08 14:08 ` shuah
2019-04-08 14:59   ` Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+G9fYsfJpXQvOvHdjtg8z4a89dSStOQZOKa9zMjjQgWKng1aw@mail.gmail.com \
    --to=naresh.kamboju@linaro.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=danielmicay@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gustavo@embeddedor.com \
    --cc=jannh@google.com \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=luto@amacapital.net \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=rdunlap@infradead.org \
    --cc=sfr@canb.auug.org.au \
    --cc=shuah@kernel.org \
    --cc=tobin@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).