All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] network/nsf_lib.sh: TCONF on mount (udp/udp6) failure for Linux v5.6+
@ 2020-06-17 15:49 Alexey Kodanev
  2020-06-18  3:15 ` Li Wang
  0 siblings, 1 reply; 8+ messages in thread
From: Alexey Kodanev @ 2020-06-17 15:49 UTC (permalink / raw)
  To: ltp

Most likely support is disabled with NFS_DISABLE_UDP_SUPPORT config
option (default y).
commit b24ee6c64ca7 ("NFS: allow deprecation of NFS UDP protocol")

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
 testcases/network/nfs/nfs_stress/nfs_lib.sh | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/testcases/network/nfs/nfs_stress/nfs_lib.sh b/testcases/network/nfs/nfs_stress/nfs_lib.sh
index e236cd485..1bd057717 100644
--- a/testcases/network/nfs/nfs_stress/nfs_lib.sh
+++ b/testcases/network/nfs/nfs_stress/nfs_lib.sh
@@ -87,11 +87,17 @@ nfs_mount()
 
 	tst_res TINFO "Mounting NFS: $mnt_cmd"
 	if [ -n "$LTP_NETNS" ] && [ -z "$LTP_NFS_NETNS_USE_LO" ]; then
-		tst_rhost_run -s -c "$mnt_cmd"
-		return
+		tst_rhost_run -c "$mnt_cmd"
+	else
+		$mnt_cmd > /dev/null
 	fi
 
-	ROD $mnt_cmd
+	if [ $? -ne 0 ]; then
+		if [ "$type" = "udp" -o "$type" = "udp6" ] && tst_kvcmp -ge 5.6; then
+			tst_brk TCONF "UDP support disabled with the kernel config NFS_DISABLE_UDP_SUPPORT?"
+		fi
+		tst_brk TBROK "mount command failed"
+	fi
 }
 
 nfs_setup()
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [LTP] [PATCH] network/nsf_lib.sh: TCONF on mount (udp/udp6) failure for Linux v5.6+
  2020-06-17 15:49 [LTP] [PATCH] network/nsf_lib.sh: TCONF on mount (udp/udp6) failure for Linux v5.6+ Alexey Kodanev
@ 2020-06-18  3:15 ` Li Wang
  2020-06-18  5:51   ` Petr Vorel
  0 siblings, 1 reply; 8+ messages in thread
From: Li Wang @ 2020-06-18  3:15 UTC (permalink / raw)
  To: ltp

Alexey Kodanev <alexey.kodanev@oracle.com> wrote:

...

--- a/testcases/network/nfs/nfs_stress/nfs_lib.sh
> +++ b/testcases/network/nfs/nfs_stress/nfs_lib.sh
> @@ -87,11 +87,17 @@ nfs_mount()
>
>         tst_res TINFO "Mounting NFS: $mnt_cmd"
>         if [ -n "$LTP_NETNS" ] && [ -z "$LTP_NFS_NETNS_USE_LO" ]; then
> -               tst_rhost_run -s -c "$mnt_cmd"
>

Or, maybe we can have a new function naming as 'tst_kconifg_check' to parse
kernel .config in shell library as well?

i.e
    tst_kconfig_check "NFS_DISABLE_UDP_SUPPORT=y"
    if [$? -qe 0 ]; then
        tst_rhost_run -s -c "$mnt_cmd"
    else
        exit with TCONF ...

What do you think?


> -               return
> +               tst_rhost_run -c "$mnt_cmd"
> +       else
> +               $mnt_cmd > /dev/null
>         fi
>
> -       ROD $mnt_cmd
> +       if [ $? -ne 0 ]; then
> +               if [ "$type" = "udp" -o "$type" = "udp6" ] && tst_kvcmp
> -ge 5.6; then
> +                       tst_brk TCONF "UDP support disabled with the
> kernel config NFS_DISABLE_UDP_SUPPORT?"
> +               fi
> +               tst_brk TBROK "mount command failed"
> +       fi
>  }
>
>  nfs_setup()
> --
> 2.20.1
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
>
>

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20200618/cc395a81/attachment.htm>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [LTP] [PATCH] network/nsf_lib.sh: TCONF on mount (udp/udp6) failure for Linux v5.6+
  2020-06-18  3:15 ` Li Wang
@ 2020-06-18  5:51   ` Petr Vorel
  2020-06-18  9:36     ` Petr Vorel
  0 siblings, 1 reply; 8+ messages in thread
From: Petr Vorel @ 2020-06-18  5:51 UTC (permalink / raw)
  To: ltp

Hi Li, Alexey,

> Alexey Kodanev <alexey.kodanev@oracle.com> wrote:

> ...

> --- a/testcases/network/nfs/nfs_stress/nfs_lib.sh
> > +++ b/testcases/network/nfs/nfs_stress/nfs_lib.sh
> > @@ -87,11 +87,17 @@ nfs_mount()

> >         tst_res TINFO "Mounting NFS: $mnt_cmd"
> >         if [ -n "$LTP_NETNS" ] && [ -z "$LTP_NFS_NETNS_USE_LO" ]; then
> > -               tst_rhost_run -s -c "$mnt_cmd"


> Or, maybe we can have a new function naming as 'tst_kconifg_check' to parse
> kernel .config in shell library as well?
+1, I was thinking about it for a long time.

> i.e
>     tst_kconfig_check "NFS_DISABLE_UDP_SUPPORT=y"
>     if [$? -qe 0 ]; then
>         tst_rhost_run -s -c "$mnt_cmd"
>     else
>         exit with TCONF ...

> What do you think?
And also have NEEDS_KCONFIGS (space separated).

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [LTP] [PATCH] network/nsf_lib.sh: TCONF on mount (udp/udp6) failure for Linux v5.6+
  2020-06-18  5:51   ` Petr Vorel
@ 2020-06-18  9:36     ` Petr Vorel
  2020-06-18 13:24       ` Alexey Kodanev
  0 siblings, 1 reply; 8+ messages in thread
From: Petr Vorel @ 2020-06-18  9:36 UTC (permalink / raw)
  To: ltp

Hi Li, Alexey, Cyril,

Reviewed-by: Petr Vorel <pvorel@suse.cz>

> > > +++ b/testcases/network/nfs/nfs_stress/nfs_lib.sh
> > > @@ -87,11 +87,17 @@ nfs_mount()

> > >         tst_res TINFO "Mounting NFS: $mnt_cmd"
> > >         if [ -n "$LTP_NETNS" ] && [ -z "$LTP_NFS_NETNS_USE_LO" ]; then
> > > -               tst_rhost_run -s -c "$mnt_cmd"


> > Or, maybe we can have a new function naming as 'tst_kconifg_check' to parse
> > kernel .config in shell library as well?
> +1, I was thinking about it for a long time.
Thinking about the balance between base TCONF decision on kernel version vs.
require kernel config to be presented I think for cases like this I'd prefer
kernel version based check (i.e. the original patch).

Requiring kernel config is ok for traditional distros (and even here is
sometimes readable only for root, e.g. Debian/Ubuntu), but it's still rare on
arm (other embedded archs). I guess it'd be nice to have some variable, which
would turn kernel config based requirement into warning.

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [LTP] [PATCH] network/nsf_lib.sh: TCONF on mount (udp/udp6) failure for Linux v5.6+
  2020-06-18  9:36     ` Petr Vorel
@ 2020-06-18 13:24       ` Alexey Kodanev
  2020-06-18 13:49         ` Petr Vorel
  0 siblings, 1 reply; 8+ messages in thread
From: Alexey Kodanev @ 2020-06-18 13:24 UTC (permalink / raw)
  To: ltp

On 18.06.2020 12:36, Petr Vorel wrote:
> Hi Li, Alexey, Cyril,
> 
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> 
>>>> +++ b/testcases/network/nfs/nfs_stress/nfs_lib.sh
>>>> @@ -87,11 +87,17 @@ nfs_mount()
> 
>>>>         tst_res TINFO "Mounting NFS: $mnt_cmd"
>>>>         if [ -n "$LTP_NETNS" ] && [ -z "$LTP_NFS_NETNS_USE_LO" ]; then
>>>> -               tst_rhost_run -s -c "$mnt_cmd"
> 
> 
>>> Or, maybe we can have a new function naming as 'tst_kconifg_check' to parse
>>> kernel .config in shell library as well?
>> +1, I was thinking about it for a long time.
> Thinking about the balance between base TCONF decision on kernel version vs.
> require kernel config to be presented I think for cases like this I'd prefer
> kernel version based check (i.e. the original patch).
> 
> Requiring kernel config is ok for traditional distros (and even here is
> sometimes readable only for root, e.g. Debian/Ubuntu), but it's still rare on
> arm (other embedded archs). I guess it'd be nice to have some variable, which
> would turn kernel config based requirement into warning.
> 

Also the option's name can be renamed in new releases, so the decision
should be made only if the option is found (i.e. if we check without the
the kernel version).

tst_check_kconfig - will be really nice to have. Then, we will tconf
earlier in the setup if this option is found.

What about TCONF_IF_KCONFIG, in addition to NEEDS_KCONFIG?

> Kind regards,
> Petr
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [LTP] [PATCH] network/nsf_lib.sh: TCONF on mount (udp/udp6) failure for Linux v5.6+
  2020-06-18 13:24       ` Alexey Kodanev
@ 2020-06-18 13:49         ` Petr Vorel
  2020-06-19  2:56           ` Li Wang
  2020-06-22 13:34           ` Petr Vorel
  0 siblings, 2 replies; 8+ messages in thread
From: Petr Vorel @ 2020-06-18 13:49 UTC (permalink / raw)
  To: ltp

Hi Li, Alexey, Cyril,

> > Requiring kernel config is ok for traditional distros (and even here is
> > sometimes readable only for root, e.g. Debian/Ubuntu), but it's still rare on
> > arm (other embedded archs). I guess it'd be nice to have some variable, which
> > would turn kernel config based requirement into warning.


> Also the option's name can be renamed in new releases, so the decision
> should be made only if the option is found (i.e. if we check without the
> the kernel version).
FYI (you may have noticed) there was an effort to add boolean OR for C
implementation:
https://patchwork.ozlabs.org/project/ltp/list/?series=149804&state=*

> tst_check_kconfig - will be really nice to have.
+1. Is anybody planning to work on it?

> Then, we will tconf
> earlier in the setup if this option is found.

> What about TCONF_IF_KCONFIG, in addition to NEEDS_KCONFIG?
+1 (+ add it to C as well).

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [LTP] [PATCH] network/nsf_lib.sh: TCONF on mount (udp/udp6) failure for Linux v5.6+
  2020-06-18 13:49         ` Petr Vorel
@ 2020-06-19  2:56           ` Li Wang
  2020-06-22 13:34           ` Petr Vorel
  1 sibling, 0 replies; 8+ messages in thread
From: Li Wang @ 2020-06-19  2:56 UTC (permalink / raw)
  To: ltp

Hi Petr, Alexey,

On Thu, Jun 18, 2020 at 9:49 PM Petr Vorel <pvorel@suse.cz> wrote:

> Hi Li, Alexey, Cyril,
>
> > > Requiring kernel config is ok for traditional distros (and even here is
> > > sometimes readable only for root, e.g. Debian/Ubuntu), but it's still
> rare on
> > > arm (other embedded archs). I guess it'd be nice to have some
> variable, which
> > > would turn kernel config based requirement into warning.
>
>
> > Also the option's name can be renamed in new releases, so the decision
> > should be made only if the option is found (i.e. if we check without the
> > the kernel version).
> FYI (you may have noticed) there was an effort to add boolean OR for C
> implementation:
> https://patchwork.ozlabs.org/project/ltp/list/?series=149804&state=*
>
> > tst_check_kconfig - will be really nice to have.
> +1. Is anybody planning to work on it?
>

I have no plan to work on this, but my pleasure to help review/test
the patch if possible.


>
> > Then, we will tconf
> > earlier in the setup if this option is found.
>
> > What about TCONF_IF_KCONFIG, in addition to NEEDS_KCONFIG?
> +1 (+ add it to C as well).
>
NEEDS_KCONFIG - this is optional to me, my previous thought is
only to have tst_check_kconfig to match the situation we need to
perform some special commands for the kernel with different kconfig,
but it is also acceptable to TCONF in setup phase like what we do in
C library.

TCONF_IF_KCONFIG - And I haven't realized what the TCONF_IF_KCONFIG
the behavior here, maybe needs read code then.

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20200619/ee10551f/attachment.htm>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [LTP] [PATCH] network/nsf_lib.sh: TCONF on mount (udp/udp6) failure for Linux v5.6+
  2020-06-18 13:49         ` Petr Vorel
  2020-06-19  2:56           ` Li Wang
@ 2020-06-22 13:34           ` Petr Vorel
  1 sibling, 0 replies; 8+ messages in thread
From: Petr Vorel @ 2020-06-22 13:34 UTC (permalink / raw)
  To: ltp

Hi all,

> > Also the option's name can be renamed in new releases, so the decision
> > should be made only if the option is found (i.e. if we check without the
> > the kernel version).
> FYI (you may have noticed) there was an effort to add boolean OR for C
> implementation:
> https://patchwork.ozlabs.org/project/ltp/list/?series=149804&state=*

> > tst_check_kconfig - will be really nice to have.
> +1. Is anybody planning to work on it?

https://github.com/linux-test-project/ltp/issues/700
I'll try to implement it in July, unless somebody does it before.

> > Then, we will tconf
> > earlier in the setup if this option is found.

> > What about TCONF_IF_KCONFIG, in addition to NEEDS_KCONFIG?
> +1 (+ add it to C as well).
I'd prefer TWARN_IF_NO_CONFIG, more info in the ticket.

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-06-22 13:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-17 15:49 [LTP] [PATCH] network/nsf_lib.sh: TCONF on mount (udp/udp6) failure for Linux v5.6+ Alexey Kodanev
2020-06-18  3:15 ` Li Wang
2020-06-18  5:51   ` Petr Vorel
2020-06-18  9:36     ` Petr Vorel
2020-06-18 13:24       ` Alexey Kodanev
2020-06-18 13:49         ` Petr Vorel
2020-06-19  2:56           ` Li Wang
2020-06-22 13:34           ` Petr Vorel

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.