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 2/2] nfs: Detect disabled UDP
Date: Tue, 10 Mar 2020 17:44:41 +0100	[thread overview]
Message-ID: <20200310164441.GC29541@dell5510> (raw)
In-Reply-To: <21baaca8-7c4e-7c11-2ff3-d10cf3e492e5@oracle.com>

Hi Alexey,

> > +	tst_rhost_run -c "grep -q '^[[:space:]]*udp[[:space:]]*=[[:space:]]*y' /etc/nfs.conf $config"

> Looks like the pattern doesn't detect when udp enabled by
> default and the config has commented default values,
> i.e. '# udp=y'.

> grep '^[# ]*udp *= *y' /etc/nfs.conf $config
Correct, this should be covered.
I'll send v2 with your much simpler regex, although I hoped we'd have something
error prone than just relying on content of config files. But IMHO checking
nfs-utils version cannot be easily done:

1) exportfs (which we require) does not print version (could be checked in
strings $(which exportfs), but we don't want unnecessary string dependency).
2) checking nfsstat (which will be probably presented on the server and even we
don't require it's presented, via if tst_cmd_available nfsstat && ...) can be
done, but we probably don't want to bother to parse it's version (UDP was
disabled in fbd7623d, which was in added in 2.1.2-rc2 and actually released in 2.2.1).

Kind regards,
Petr

  reply	other threads:[~2020-03-10 16:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-05 19:27 [LTP] [PATCH 1/2] nfs_lib: Unify testing on netns Petr Vorel
2020-03-05 19:27 ` [LTP] [PATCH 2/2] nfs: Detect disabled UDP Petr Vorel
2020-03-10 13:34   ` Alexey Kodanev
2020-03-10 16:44     ` Petr Vorel [this message]
2020-03-10 13:01 ` [LTP] [PATCH 1/2] nfs_lib: Unify testing on netns Alexey Kodanev
2020-03-10 15:46   ` Petr Vorel
2020-03-11 14:35     ` Alexey Kodanev

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=20200310164441.GC29541@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