All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Lawrence <joe.lawrence@redhat.com>
To: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>,
	live-patching@vger.kernel.org, linux-kselftest@vger.kernel.org
Cc: shuah@kernel.org
Subject: Re: [PATCH] selftests/livepatch: add test skip handling
Date: Mon, 15 Jul 2019 10:09:58 -0400	[thread overview]
Message-ID: <b675ce40-40c8-69aa-0767-dc1af9fc7797@redhat.com> (raw)
In-Reply-To: <9de46fed-785c-d5c4-8a76-205674bd0912@linux.vnet.ibm.com>

On 7/15/19 2:50 AM, Kamalesh Babulal wrote:
> On 7/14/19 7:58 PM, Joe Lawrence wrote:
>> Before running a livpeatch self-test, first verify that we've built and
>> installed the livepatch self-test kernel modules by running a 'modprobe
>> --dry-run'.  This should catch a few environment issues, including
>> !CONFIG_LIVEPATCH and !CONFIG_TEST_LIVEPATCH.  In these cases, exit
>> gracefully with test-skip status rather than test-fail status.
>>
>> Reported-by: Jiri Benc <jbenc@redhat.com>
>> Suggested-by: Shuah Khan <shuah@kernel.org>
>> Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
> 
> Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
> 
> [...]
>>
>> +function assert_mod() {
>> +	local mod="$1"
>> +
>> +	if ! modprobe --dry-run "$mod" &>/dev/null ; then
> 
> Just a preference comment, shorter version 'modprobe -q -n'
> can be used here.
> 

Hi Kamalesh,

Re: command line options: my preference has been to use the long form 
command switches inside scripts as they are more likely to be self 
documenting than their short counterparts.  e.g. I could have guessed 
that -q is --quiet, but not that -n is --dry-run.

Re: --quiet vs. command redirection: Another detail I don't have a 
strong opinion about.  I guess I very slightly prefer the redirect so I 
don't have to research various modprobe versions to determine if --quiet 
is universally supported (it probably is).

In both cases, I'll defer to whatever reviewers think is more 
readable/conventional for the self-tests.

-- Joe

  reply	other threads:[~2019-07-15 14:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-14 14:28 [PATCH] selftests/livepatch: add test skip handling Joe Lawrence
2019-07-14 14:33 ` Joe Lawrence
2019-07-15 11:17   ` Miroslav Benes
2019-07-19 22:11   ` shuah
2019-07-20  2:51     ` Joe Lawrence
2019-07-20 11:26       ` shuah
2019-07-15  6:50 ` Kamalesh Babulal
2019-07-15 14:09   ` Joe Lawrence [this message]
2019-07-16 13:13 ` Petr Mladek

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=b675ce40-40c8-69aa-0767-dc1af9fc7797@redhat.com \
    --to=joe.lawrence@redhat.com \
    --cc=kamalesh@linux.vnet.ibm.com \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=shuah@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.