public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v4 3/3] lsmod01: Add kernel module
Date: Thu, 5 Mar 2020 14:08:48 +0100	[thread overview]
Message-ID: <20200305130848.GA24788@dell5510> (raw)
In-Reply-To: <20191210080419.128773-4-lkml@jv-coder.de>

Hi Joerg,

patchset merged, with tiny style changes.
Sorry for the delay with reviewing it.

...
> +module_inserted=0
We prefer in the shell library empty over 0.

> +
> +setup()
> +{
> +	if [ -z "$(cat /proc/modules)"  ]; then
> +		tst_res TINFO "Loading dummy kernel module"
> +		tst_require_module "ltp_lsmod01.ko"
> +		tst_require_root
> +		tst_require_cmds insmod
> +		insmod "$TST_MODPATH"
> +		if [ $? -ne 0 ]; then
> +			tst_res TBROK "insmod failed"
> +			return
> +		fi
> +
> +		module_inserted=1
> +	fi
> +}
> +
> +cleanup()
> +{
> +	if [ $module_inserted -ne 0 ]; then
> +		tst_res TINFO "Unloading dummy kernel module"
> +		rmmod ltp_lsmod01
> +		if [ $? -ne 0 ]; then
> +			tst_res TWARN "rmmod failed"
> +		fi
> +		module_inserted=0
This is not needed, thus omitted.

Kind regards,
Petr

      reply	other threads:[~2020-03-05 13:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-10  8:04 [LTP] [PATCH v4] lsmod01: Add kernel module Joerg Vehlow
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 [this message]

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=20200305130848.GA24788@dell5510 \
    --to=pvorel@suse.cz \
    --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