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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 16 Jan 2018 09:59:18 +0200
From:   Ido Schimmel <idosch@...sch.org>
To:     David Ahern <dsahern@...il.com>
Cc:     Jiri Pirko <jiri@...nulli.us>, Ido Schimmel <idosch@...lanox.com>,
        netdev@...r.kernel.org, linux-kselftest@...r.kernel.org,
        davem@...emloft.net, shuah@...nel.org, nikolay@...ulusnetworks.com,
        roopa@...ulusnetworks.com, andy@...yhouse.net, jiri@...lanox.com,
        mlxsw@...lanox.com, saeedm@...lanox.com, tariqt@...lanox.com,
        jhs@...atatu.com, lucasb@...atatu.com, f.fainelli@...il.com,
        vivien.didelot@...oirfairelinux.com, andrew@...n.ch,
        jakub.kicinski@...ronome.com, simon.horman@...ronome.com
Subject: Re: [RFC PATCH net-next 00/12] selftests: forwarding: Add VRF-based
 tests

On Mon, Jan 15, 2018 at 04:48:25PM -0700, David Ahern wrote:
> On 1/15/18 4:17 PM, Jiri Pirko wrote:
> >> A couple of feature requests:
> >> 1. an option to pause on any error to allow inspection of the setup
> > 
> > Good idea. Should be easy to add.
> 
> Here is a snippet from my vrf test script:
> 
> PAUSE_ON_FAIL=no
> -p option sets PAUSE_ON_FAIL=yes
> 
> log_test()
> {
>         local rc=$1
>         local expected=$2
>         local msg="$3"
> 
>         if [ ${rc} -eq ${expected} ]; then
>                 nsuccess=$((nsuccess+1))
>                 printf "\n    TEST: %-80s  [ OK ]\n" "${msg}"
>         else
>                 nfail=$((nfail+1))
>                 printf "\n    TEST: %-80s  [FAIL]\n" "${msg}"
>                 if [ "${PAUSE_ON_FAIL}" = "yes" ]; then
>                         echo
>                         echo "hit enter to continue, 'q' to quit"
>                         read a
>                         [ "$a" = "q" ] && exit 1
>                 fi
>         fi
> }

Nice. Will add.

[...]

> >> 2. an option to configure the system and leave it in that state (ie,
> >> don't trap exit and run cleanup). By extension, an option is needed to
> >> do cleanup only.
> > 
> > Checkout the last patch. It has "noprepare" and "nocleanup" options.
> > So I guess you imagine something like that, but generic?
> > 
> 
> Sure that is one way.

I think we can do something similar to your 'PAUSE_ON_FAIL' option. At
the end of the run the system is supposed to be configured as it was in
the beginning of the test, so we can have the trap wait for user to hit
'c' for cleanup if the option is set. By default it will run cleanup.

> Something else I have found useful is to not redirect stdout/stderr from
> the commands and to have tags that can be grep'ed to provide a summary.
> I run my VRF test script as:
> 
> $ run-test.sh 2>&1 | tee vrf-results.txt | grep TEST

Good idea. Will change.

Powered by blists - more mailing lists