From: Joerg Vehlow <lkml@jv-coder.de>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v4] lsmod01: Add kernel module
Date: Tue, 10 Dec 2019 09:04:16 +0100 [thread overview]
Message-ID: <20191210080419.128773-1-lkml@jv-coder.de> (raw)
Now that the naming debate for tst_needs vs. tst_require is done, I post the patch,
that started all of it again.
This patch adds a dummy module to lsmod01, to make the test run successfully,
if no modules are loaded at the time of test execution.
To have no impact on the test requirements, when modules are already loaded,
the root test and module search has to be done conditionally.
Therefor the library had to be extended/modified to add tst_require_root
and tst_require_module.
doc/test-writing-guidelines.txt | 6 ++++-
testcases/commands/.gitignore | 1 +
testcases/commands/lsmod/Makefile | 15 ++++++++++++
testcases/commands/lsmod/lsmod01.sh | 33 ++++++++++++++++++++++++++
testcases/commands/lsmod/ltp_lsmod01.c | 28 ++++++++++++++++++++++
testcases/lib/tst_net.sh | 12 ++--------
testcases/lib/tst_security.sh | 4 ++--
testcases/lib/tst_test.sh | 43 +++++++++++++++++++---------------
8 files changed, 110 insertions(+), 32 deletions(-)
next reply other threads:[~2019-12-10 8:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-10 8:04 Joerg Vehlow [this message]
2019-12-10 8:04 ` [LTP] [PATCH v4 1/3] tst_test.sh: Add tst_require_module command Joerg Vehlow
2019-12-10 8:04 ` [LTP] [PATCH v4 2/3] tst_test.sh: Make public tst_require_root command public Joerg Vehlow
2019-12-10 8:04 ` [LTP] [PATCH v4 3/3] lsmod01: Add kernel module Joerg Vehlow
2020-03-05 13:08 ` Petr Vorel
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=20191210080419.128773-1-lkml@jv-coder.de \
--to=lkml@jv-coder.de \
--cc=ltp@lists.linux.it \
/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