lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 30 Jul 2022 14:28:48 +0200
From:   Jiri Pirko <jiri@...dia.com>
To:     Vikas Gupta <vikas.gupta@...adcom.com>
Cc:     dsahern@...nel.org, stephen@...workplumber.org, kuba@...nel.org,
        netdev@...r.kernel.org, edumazet@...gle.com,
        michael.chan@...adcom.com, andrew.gospodarek@...adcom.com
Subject: Re: [PATCH iproute2-next v4 3/3] devlink : update man page and
 bash-completion for new commands

Fri, Jul 29, 2022 at 12:18:21PM CEST, vikas.gupta@...adcom.com wrote:
>Update the man page for newly added selftests commands.
>Examples:
> devlink dev selftests run pci/0000:03:00.0 id flash
> devlink dev selftests show pci/0000:03:00.0
>
>Signed-off-by: Vikas Gupta <vikas.gupta@...adcom.com>
>---
> bash-completion/devlink | 21 +++++++++++++++++-
> man/man8/devlink-dev.8  | 48 +++++++++++++++++++++++++++++++++++++++++

I don't think there is a separate patchset needed for this. Just squash
to the previous one.


> 2 files changed, 68 insertions(+), 1 deletion(-)
>
>diff --git a/bash-completion/devlink b/bash-completion/devlink
>index 361be9fe..608a60d0 100644
>--- a/bash-completion/devlink
>+++ b/bash-completion/devlink
>@@ -262,6 +262,25 @@ _devlink_dev_flash()
>      esac
> }
> 
>+# Completion for devlink dev selftests
>+_devlink_dev_selftests()
>+{
>+    case "$cword" in
>+        3)
>+            COMPREPLY=( $( compgen -W "show run" -- "$cur" ) )
>+            return
>+            ;;
>+        4)
>+            _devlink_direct_complete "dev"
>+            return
>+            ;;
>+        5)
>+            COMPREPLY=( $( compgen -W "id" -- "$cur" ) )
>+            return
>+            ;;

Another tab should list available selftests for device.



>+    esac
>+}
>+
> # Completion for devlink dev
> _devlink_dev()
> {
>@@ -274,7 +293,7 @@ _devlink_dev()
>             fi
>             return
>             ;;
>-        eswitch|param)
>+        eswitch|param|selftests)
>             _devlink_dev_$command
>             return
>             ;;
>diff --git a/man/man8/devlink-dev.8 b/man/man8/devlink-dev.8
>index 6906e509..5a06682a 100644
>--- a/man/man8/devlink-dev.8
>+++ b/man/man8/devlink-dev.8
>@@ -85,6 +85,20 @@ devlink-dev \- devlink device configuration
> .I ID
> ]
> 
>+.ti -8
>+.B devlink dev selftests show
>+[
>+.I DEV
>+]
>+
>+.ti -8
>+.B devlink dev selftests run
>+.I DEV
>+[
>+.B id
>+.RI "{ " TESTNAME " }"
>+]
>+
> .SH "DESCRIPTION"
> .SS devlink dev show - display devlink device attributes
> 
>@@ -249,6 +263,30 @@ should match the component names from
> .B "devlink dev info"
> and may be driver-dependent.
> 
>+.SS devlink dev selftests show - shows supported selftests on devlink device.
>+
>+.PP
>+.I "DEV"
>+- specifies the devlink device.
>+If this argument is omitted all selftests for devlink devices are listed.
>+
>+.SS devlink dev selftests run - runs selftests on devlink device.
>+
>+.PP
>+.I "DEV"
>+- specifies the devlink device to execute selftests.
>+
>+.B id
>+{
>+.RI { " ID " }
>+}
>+- The value of
>+.I ID
>+should match the selftests shown in

You can specify multiple ids, can't you? If not, you should and you
should describe it here.


>+.B "devlink dev selftests show".
>+to execute a selftest on the devlink device.
>+If this argument is omitted all selftets supported by devlink devices are executed.

s/selftets/selftests/


>+
> .SH "EXAMPLES"
> .PP
> devlink dev show
>@@ -296,6 +334,16 @@ Flashing 100%
> .br
> Flashing done
> .RE
>+.PP
>+devlink dev selftests show pci/0000:01:00.0
>+.RS 4
>+Shows the supported selftests by the devlink device.
>+.RE
>+.PP
>+devlink dev selftests run pci/0000:01:00.0 id flash
>+.RS 4
>+Perform a flash test on the devlink device.
>+.RE
> 
> .SH SEE ALSO
> .BR devlink (8),
>-- 
>2.31.1
>



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ